diff --git a/plugins/modules/site_workflow_manager.py b/plugins/modules/site_workflow_manager.py index 2a7119b9a7..0a7967bfdd 100644 --- a/plugins/modules/site_workflow_manager.py +++ b/plugins/modules/site_workflow_manager.py @@ -1312,8 +1312,8 @@ def validate_site_input_data(self, config, state): units_of_measure)) self.log("Invalid 'units_of_measure': {0}. Expected 'feet' or 'meters'.".format(units_of_measure), "ERROR") else: - errormsg.append("units_of_measure should not be None or empty") - self.log("Missing 'units_of_measure' in floor entry.", "ERROR") + site[site_type]["units_of_measure"] = "feet" + self.log("Default value assigned for units_of_measure: feet.", "INFO") upload_floor_image_path = site.get(site_type, {}).get("upload_floor_image_path") if upload_floor_image_path: diff --git a/tests/integration/ccc_site_workflow_manager/vars/vars_site_workflow_manager.yml b/tests/integration/ccc_site_workflow_manager/vars/vars_site_workflow_manager.yml index edb5d3e047..a945434917 100644 --- a/tests/integration/ccc_site_workflow_manager/vars/vars_site_workflow_manager.yml +++ b/tests/integration/ccc_site_workflow_manager/vars/vars_site_workflow_manager.yml @@ -138,16 +138,11 @@ floorNumber: 1 - delete_a_site: - - type: 'floor' + - type: 'area' site: - floor: - name: cherry - parentName: Global/japan3/blossom - rfModel: Cubes And Walled Offices - width: 177 - length: 171 - height: 10 - floorNumber: 1 + area: + name: japan3 + parentName: Global - type: 'building' site: @@ -155,12 +150,17 @@ name: blossom address: 1234 Elm Street parentName: Global/japan3 - latitude: 37.358 - longitude: -121.846 + latitude: 37.385 + longitude: -121.845 country: India - - type: 'area' + - type: 'floor' site: - area: - name: japan3 - parentName: Global + floor: + name: cherry + parentName: Global/japan3/blossom + rfModel: Cubes And Walled Offices + width: 105 + length: 105 + height: 10 + floorNumber: 1 \ No newline at end of file