Skip to content

Commit e75be1d

Browse files
authored
Provision Bug Fix (#163)
2 parents 16a9ead + 82f36e5 commit e75be1d

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

plugins/modules/provision_workflow_manager.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,7 @@ def __init__(self, module):
631631
self.re_provision_wireless_device = []
632632
self.enable_application_telemetry = []
633633
self.disable_application_telemetry = []
634+
self.assigned_device_to_site = []
634635

635636
def validate_input(self, state=None):
636637
"""
@@ -2464,6 +2465,7 @@ def provision_bulk_wired_device(self):
24642465
device_ip, site_name
24652466
)
24662467
)
2468+
self.assigned_device_to_site.append(device_ip)
24672469

24682470
continue
24692471

@@ -3707,22 +3709,16 @@ def process_individual_feature_template(self, template_index, feature_template):
37073709
self.log(error_message, "ERROR")
37083710
raise
37093711

3710-
additional_identifiers_payload = self._process_additional_identifiers(
3711-
normalized_params["additional_identifiers"], feature_template_id)
3712-
3713-
# Perform template metadata validation (non-blocking)
3714-
self._validate_template_metadata_requirements(
3715-
feature_template_id, additional_identifiers_payload)
3716-
3717-
# Build final template entry
37183712
template_entry = {
37193713
"featureTemplateId": feature_template_id,
37203714
"attributes": normalized_params["attributes"] if normalized_params["attributes"] else {}
37213715
}
37223716

3723-
if additional_identifiers_payload:
3724-
template_entry["additionalIdentifiers"] = additional_identifiers_payload
3717+
# Only include additionalIdentifiers if user actually provided something
3718+
if normalized_params["additional_identifiers"]:
3719+
template_entry["additionalIdentifiers"] = normalized_params["additional_identifiers"]
37253720

3721+
# Include excludedAttributes if provided
37263722
if normalized_params["excluded_attributes"]:
37273723
template_entry["excludedAttributes"] = normalized_params["excluded_attributes"]
37283724

@@ -4220,6 +4216,12 @@ def update_device_provisioning_messages(self):
42204216
)
42214217
result_msg_list_changed.append(msg)
42224218

4219+
if self.assigned_device_to_site:
4220+
msg = "Device(s) '{0}' assigned to site successfully.".format(
4221+
"', '".join(self.assigned_device_to_site)
4222+
)
4223+
result_msg_list_changed.append(msg)
4224+
42234225
if self.device_deleted:
42244226
msg = "Device(s) '{0}' deleted successfully.".format(
42254227
"', '".join(self.device_deleted)

0 commit comments

Comments
 (0)