Skip to content

Commit

Permalink
Drop self.params['networks'] + self.params['customization']
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolenz committed May 5, 2024
1 parent 5f318f8 commit 54c346a
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions plugins/modules/guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ class PyVmomiCache(object):
def __init__(self, content, dc_name=None):
self.content = content
self.dc_name = dc_name
self.networks = {}
self.clusters = {}
self.esx_hosts = {}
self.parent_datacenters = {}
Expand Down Expand Up @@ -921,21 +920,6 @@ def deploy_vm(self):
self.configure_encryption_params(vm_obj=vm_obj)
self.configure_resource_alloc_info(vm_obj=vm_obj)

# Find if we need network customizations (find keys in dictionary that requires customizations)
network_changes = False
for nw in self.params['networks']:
for key in nw:
# We don't need customizations for these keys
if key == 'type' and nw['type'] == 'dhcp':
network_changes = True
break
if key not in ('device_type', 'mac', 'name', 'vlan', 'type', 'start_connected', 'dvswitch_name'):
network_changes = True
break

if any(v is not None for v in self.params['customization'].values()) or network_changes or self.params.get('customization_spec') is not None:
self.customize_vm(vm_obj=vm_obj)

clonespec = None
clone_method = None
try:
Expand Down

0 comments on commit 54c346a

Please sign in to comment.