group optional attribute added in configuration manager
@@ -39,7 +39,7 @@ _logger = logger.setup(__name__)
_valid_type_strings = sorted(['boolean', 'integer', 'float', 'string', 'IPv4', 'IPv6', 'X509 certificate', 'password',
'JSON', 'URL', 'enumeration', 'script', 'code', 'northTask', 'ACL'])
_optional_items = sorted(['readonly', 'order', 'length', 'maximum', 'minimum', 'rule', 'deprecated', 'displayName',
- 'validity', 'mandatory'])
+ 'validity', 'mandatory', 'group'])
RESERVED_CATG = ['South', 'North', 'General', 'Advanced', 'Utilities', 'rest_api', 'Security', 'service', 'SCHEDULER',
'SMNTR', 'PURGE_READ', 'Notifications']
@@ -263,7 +263,8 @@ class ConfigurationManager(ConfigurationManagerSingleton):
.format(category_name, item_name, type(item_val)))
optional_item_entries = {'readonly': 0, 'order': 0, 'length': 0, 'maximum': 0, 'minimum': 0,
- 'deprecated': 0, 'displayName': 0, 'rule': 0, 'validity': 0, 'mandatory': 0}
+ 'deprecated': 0, 'displayName': 0, 'rule': 0, 'validity': 0, 'mandatory': 0,
+ 'group': 0}
expected_item_entries = {'description': 0, 'default': 0, 'type': 0}
if require_entry_value:
@@ -327,7 +328,7 @@ class ConfigurationManager(ConfigurationManagerSingleton):
entry_val)) is False:
raise ValueError('For {} category, entry value must be an integer or float for item name '
'{}; got {}'.format(category_name, entry_name, type(entry_val)))
- elif entry_name == 'rule' or entry_name == 'displayName' or entry_name == 'validity':
+ elif entry_name in ('displayName', 'group', 'rule', 'validity'):
if not isinstance(entry_val, str):
raise ValueError('For {} category, entry value must be string for item name {}; got {}'
.format(category_name, entry_name, type(entry_val)))
@@ -975,7 +976,7 @@ class ConfigurationManager(ConfigurationManagerSingleton):
new_value_entry)) is False:
raise ValueError('For {} category, entry value must be an integer or float for optional item '
'{}; got {}'.format(category_name, optional_entry_name, type(new_value_entry)))
- elif optional_entry_name == 'rule' or optional_entry_name == 'displayName' or optional_entry_name == 'validity':
+ elif optional_entry_name in ('displayName', 'group', 'rule', 'validity'):
if not isinstance(new_value_entry, str):
raise ValueError('For {} category, entry value must be string for optional item {}; got {}'
.format(category_name, optional_entry_name, type(new_value_entry)))
