diff options
author | Valerii Ponomarov <vponomar@redhat.com> | 2019-03-04 22:11:28 +0530 |
---|---|---|
committer | Valerii Ponomarov <vponomar@redhat.com> | 2019-03-04 22:18:48 +0530 |
commit | 2193f97854b1203a48f5149a6c4efb6d3d002f8f (patch) | |
tree | e8ae95075cf30047cd0d6b55f2c540140f0a9baa /deployment/inventory | |
parent | 51f7ed84d87783bde8cd2f73a265987df55697d8 (diff) |
[Deployment] Fix vmware resource pool and folder module utils
Following modules:
- deployment/playbooks/library/vmware_folder.py
- deployment/playbooks/library/vmware_resource_pool.py
Were broken by '2035d7e6' commit with pep8 fixes.
It was broken due to the change of the import module logic which led to
the absence of required modules imports.
So, fix it by using 'expected' import approach - importing
functions directly, not modules.
Change-Id: Ib1f9db410a8aa0171fea0e7017e29148167baf65
Diffstat (limited to 'deployment/inventory')
-rwxr-xr-x | deployment/inventory/vsphere/vms/vmware_inventory.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/deployment/inventory/vsphere/vms/vmware_inventory.py b/deployment/inventory/vsphere/vms/vmware_inventory.py index 59cea196..cdb6bd13 100755 --- a/deployment/inventory/vsphere/vms/vmware_inventory.py +++ b/deployment/inventory/vsphere/vms/vmware_inventory.py @@ -191,7 +191,7 @@ class VMWareInventory(object): # apply defaults for k, v in defaults['vmware'].items(): if not config.has_option('vmware', k): - config.set('vmware', k, str(v)) + config.set('vmware', k, str(v)) # where is the cache? self.cache_dir = os.path.expanduser(config.get('vmware', 'cache_path')) @@ -263,7 +263,7 @@ class VMWareInventory(object): if hasattr(ssl, 'SSLContext'): # older ssl libs do not have an SSLContext method: - # context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) + # context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) # AttributeError: 'module' object has no attribute 'SSLContext' # older pyvmomi version also do not have an sslcontext kwarg: # https://github.com/vmware/pyvmomi/commit/92c1de5056be7c5390ac2a28eb08ad939a4b7cdd |