diff options
author | Jesse Pretorius <jesse.pretorius@rackspace.co.uk> | 2018-05-25 18:43:46 +0100 |
---|---|---|
committer | Monty Taylor <mordred@redhat.com> | 2018-05-25 10:43:46 -0700 |
commit | 1579178f2dad37d618b6e5ced9e0b9586a16c426 (patch) | |
tree | bc9c5fb87f107d5f21becaa1d8bd364d3f720af6 /lib | |
parent | f53a29f39218c5fd1d53b07733ffbe79d574aa5b (diff) | |
download | ansible-1579178f2dad37d618b6e5ced9e0b9586a16c426.tar.gz |
os_project_access: clean up some things (#40464)
* os_project_access: correct example tasks
The example task does not work. Fix it so that it does.
* os_project_access: Remove unused function
The _get_allowed_projects function is not used anywhere,
so we can remove it and be free of nova_client for this
module.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/modules/cloud/openstack/os_project_access.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/ansible/modules/cloud/openstack/os_project_access.py b/lib/ansible/modules/cloud/openstack/os_project_access.py index de0c8fbde2..9d44146c29 100644 --- a/lib/ansible/modules/cloud/openstack/os_project_access.py +++ b/lib/ansible/modules/cloud/openstack/os_project_access.py @@ -57,7 +57,7 @@ requirements: EXAMPLES = ''' - name: "Enable access to tiny flavor to your tenant." - os_project_Access: + os_project_access: cloud: mycloud state: present target_project_id: f0f1f2f3f4f5f67f8f9e0e1 @@ -66,7 +66,7 @@ EXAMPLES = ''' - name: "Disable access to the given flavor to project" - os_project_Access: + os_project_access: cloud: mycloud state: absent target_project_id: f0f1f2f3f4f5f67f8f9e0e1 @@ -104,13 +104,6 @@ from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.openstack import openstack_full_argument_spec, openstack_module_kwargs -def _get_allowed_projects(cloud, flavor_id): - return [x.tenant_id - for x - in cloud.nova_client.flavor_access.list(flavor=flavor_id) - ] - - def main(): argument_spec = openstack_full_argument_spec( state=dict(required=False, default='present', |