mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Fix undefined variables, basestring usage, and some associated python3 issues
This commit is contained in:
@@ -103,6 +103,9 @@ try:
|
||||
except ImportError:
|
||||
HAS_SHADE = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.openstack import openstack_full_argument_spec, openstack_module_kwargs
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -129,7 +132,7 @@ def main():
|
||||
if name:
|
||||
# Let's suppose user is passing domain ID
|
||||
try:
|
||||
domains = cloud.get_domain(name)
|
||||
domains = opcloud.get_domain(name)
|
||||
except:
|
||||
domains = opcloud.search_domains(filters={'name': name})
|
||||
|
||||
@@ -142,8 +145,6 @@ def main():
|
||||
except shade.OpenStackCloudException as e:
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.openstack import *
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user