Skip to content

Commit 6fd768e

Browse files
committed
Corrected comments; display object array index in validation messages
1 parent ee5256b commit 6fd768e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

core/src/main/python/wlsdeploy/tool/extract/domain_resource_extractor.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ def __init__(self, model, model_context, logger):
6666
return
6767

6868
def extract(self):
69-
"""
70-
Deploy resource model elements at the domain level, including multi-tenant elements.
71-
"""
7269
_method_name = 'extract'
7370

7471
resource_file = self._model_context.get_domain_resource_file()
@@ -111,7 +108,7 @@ def _process_object(self, model_dict, schema_folder, target_dict, schema_path):
111108
:param model_dict: the source model dictionary
112109
:param schema_folder: the schema for this folder
113110
:param target_dict: the target dictionary for the domain resource file.
114-
:param schema_path: the path of schema elements (no multi-element names), used for supported check
111+
:param schema_path: the path of schema elements, used for supported check
115112
"""
116113
folder_properties = schema_folder["properties"]
117114

@@ -146,7 +143,7 @@ def _process_object_array(self, model_value, item_info, schema_path):
146143
Process an array of objects.
147144
:param model_value: the model contents for a folder
148145
:param item_info: describes the contents of the sub-folder for each element
149-
:param schema_path: the path of schema elements (no multi-element names), used for supported check
146+
:param schema_path: the path of schema elements, used for supported check
150147
"""
151148
child_list = list()
152149
for object_map in model_value:

core/src/main/python/wlsdeploy/tool/validate/kubernetes_validator.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,19 @@ def _validate_object_array(self, model_value, property_map, schema_path, model_p
105105
Validate the contents of this object array.
106106
:param model_value: the model contents for a folder
107107
:param property_map: describes the contents of the sub-folder for each element
108-
:param schema_path: the path of schema elements (no multi-element names), used for supported check
109-
:param model_path: the path of model elements (including multi-element names), used for logging
108+
:param schema_path: the path of schema elements (no array indices), used for supported check
109+
:param model_path: the path of model elements (including array indices), used for logging
110110
"""
111111
_method_name = '_validate_object_array'
112112
if not isinstance(model_value, list):
113113
self._logger.severe("WLSDPLY-05040", model_path, class_name=self._class_name, method_name=_method_name)
114114
return
115115

116+
index = 0
116117
for name_map in model_value:
117-
self.validate_folder(name_map, property_map, schema_path, model_path)
118+
index_path = '%s[%s]' % (model_path, index)
119+
self.validate_folder(name_map, property_map, schema_path, index_path)
120+
index += 1
118121

119122
def _validate_simple_map(self, model_value, property_name, model_path):
120123
_method_name = '_validate_simple_map'

0 commit comments

Comments
 (0)