Skip to content

Commit a4e3aa1

Browse files
authored
Drop unused HAS_PYVMOMI (#2327)
SUMMARY These modules define HAS_PYVMOMI, but it doesn't look like they use it anywhere. ISSUE TYPE Feature Pull Request COMPONENT NAME vcenter_standard_key_provider vmware_guest vmware_guest_tpm vmware_vm_config_option vmware_vsan_health_info
1 parent 60f2f71 commit a4e3aa1

6 files changed

+7
-12
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
minor_changes:
2+
- vmware_vsan_health_info - Drop unused HAS_PYVMOMI (https://github.com/ansible-collections/community.vmware/pull/2327).
3+
- vmware_guest_tpm - Drop unused HAS_PYVMOMI (https://github.com/ansible-collections/community.vmware/pull/2327).
4+
- vcenter_standard_key_provider - Drop unused HAS_PYVMOMI (https://github.com/ansible-collections/community.vmware/pull/2327).
5+
- vmware_guest - Drop unused HAS_PYVMOMI (https://github.com/ansible-collections/community.vmware/pull/2327).
6+
- vmware_vm_config_option - Drop unused HAS_PYVMOMI (https://github.com/ansible-collections/community.vmware/pull/2327).

plugins/modules/vcenter_standard_key_provider.py

-3
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,8 @@
178178
]
179179
'''
180180

181-
HAS_PYVMOMI = False
182181
try:
183182
from pyVmomi import vim
184-
185-
HAS_PYVMOMI = True
186183
except ImportError:
187184
pass
188185

plugins/modules/vmware_guest.py

-2
Original file line numberDiff line numberDiff line change
@@ -1104,10 +1104,8 @@
11041104
import time
11051105
import string
11061106

1107-
HAS_PYVMOMI = False
11081107
try:
11091108
from pyVmomi import vim, vmodl
1110-
HAS_PYVMOMI = True
11111109
except ImportError:
11121110
pass
11131111

plugins/modules/vmware_guest_tpm.py

-2
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,8 @@
9898
sample: None
9999
'''
100100

101-
HAS_PYVMOMI = False
102101
try:
103102
from pyVmomi import vim
104-
HAS_PYVMOMI = True
105103
except ImportError:
106104
pass
107105

plugins/modules/vmware_vm_config_option.py

-2
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,8 @@
102102
sample: None
103103
'''
104104

105-
HAS_PYVMOMI = False
106105
try:
107106
from pyVmomi import vim
108-
HAS_PYVMOMI = True
109107
except ImportError:
110108
pass
111109

plugins/modules/vmware_vsan_health_info.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,8 @@
107107

108108
try:
109109
from pyVmomi import vmodl, VmomiSupport
110-
HAS_PYVMOMI = True
111110
except ImportError:
112-
PYVMOMI_IMP_ERR = traceback.format_exc()
113-
HAS_PYVMOMI = False
111+
pass
114112

115113
VSANPYTHONSDK_IMP_ERR = None
116114
try:

0 commit comments

Comments
 (0)