Skip to content

Commit

Permalink
review comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
syed-khadeerahmed committed Nov 12, 2024
1 parent e0493d0 commit 57bd584
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/modules/inventory_workflow_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ def provisioned_wired_device(self):

for device_info in provision_wired_list:
device_ip = device_info['device_ip']
site_name = device_info['site_name']
site_name_hierarchy = device_info['site_name']
device_ip_list.append(device_ip)
device_type = "Wired"
resync_retry_count = device_info.get("resync_retry_count", 200)
Expand All @@ -1726,9 +1726,9 @@ def provisioned_wired_device(self):
continue

if self.get_ccc_version_as_integer() <= self.get_ccc_version_as_int_from_str("2.3.5.3"):
self.provision_wired_device_v1(device_ip, site_name, device_type)
self.provision_wired_device_v1(device_ip, site_name_hierarchy, device_type)
else:
self.provision_wired_device_v2(device_ip, site_name)
self.provision_wired_device_v2(device_ip, site_name_hierarchy)

# Handle final provisioning results
self.handle_final_provisioning_result(total_devices, self.provision_count, self.already_provisioned_count, device_ip_list, device_type)
Expand Down Expand Up @@ -1817,7 +1817,7 @@ def provision_wired_device_v1(self, device_ip, site_name_hierarchy, device_type)
except Exception as e:
self.handle_provisioning_exception(device_ip, e, device_type)

def provision_wired_device_v2(self, device_ip, site_name):
def provision_wired_device_v2(self, device_ip, site_name_hierarchy):
"""
Provisions a device for versions > 2.3.5.6.
Parameters:
Expand All @@ -1829,7 +1829,7 @@ def provision_wired_device_v2(self, device_ip, site_name):
It performs the necessary configurations and returns a success status.
"""
try:
site_exist, site_id = self.get_site_id(site_name)
site_exist, site_id = self.get_site_id(site_name_hierarchy)
device_ids = self.get_device_ids([device_ip])
device_id = device_ids[0]

Expand All @@ -1839,7 +1839,7 @@ def provision_wired_device_v2(self, device_ip, site_name):
is_device_assigned_to_site = self.is_device_assigned_to_site(device_id)

if not is_device_assigned_to_site:
self.assign_device_to_site(device_ids, site_name, site_id)
self.assign_device_to_site(device_ids, site_name_hierarchy, site_id)

if not is_device_provisioned:
self.provision_device(provision_params, device_ip)
Expand Down

0 comments on commit 57bd584

Please sign in to comment.