Skip to content
Snippets Groups Projects
Commit 44310b65 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'develop' of https://gitlab.com/teraflow-h2020/controller into...

Merge branch 'develop' of https://gitlab.com/teraflow-h2020/controller into feat/ecoc22-dc-interconnect-disjoint
parents 8a11726e defad037
No related branches found
No related tags found
2 merge requests!54Release 2.0.0,!4Compute component:
......@@ -86,6 +86,15 @@ def test_device_emulated_add_correct(
driver : _Driver = driver_instance_cache.get(DEVICE_EMU_UUID) # we know the driver exists now
assert driver is not None
device_data = context_client.GetDevice(DeviceId(**DEVICE_EMU_ID))
config_rules = [
(ConfigActionEnum.Name(config_rule.action), config_rule.custom.resource_key, config_rule.custom.resource_value)
for config_rule in device_data.device_config.config_rules
if config_rule.WhichOneof('config_rule') == 'custom'
]
LOGGER.info('device_data.device_config.config_rules = \n{:s}'.format(
'\n'.join(['{:s} {:s} = {:s}'.format(*config_rule) for config_rule in config_rules])))
def test_device_emulated_get(
context_client : ContextClient, # pylint: disable=redefined-outer-name
......
......@@ -88,8 +88,9 @@ def test_device_openconfig_add_correct(
device_data = context_client.GetDevice(DeviceId(**DEVICE_OC_ID))
config_rules = [
(ConfigActionEnum.Name(config_rule.action), config_rule.resource_key, config_rule.resource_value)
(ConfigActionEnum.Name(config_rule.action), config_rule.custom.resource_key, config_rule.custom.resource_value)
for config_rule in device_data.device_config.config_rules
if config_rule.WhichOneof('config_rule') == 'custom'
]
LOGGER.info('device_data.device_config.config_rules = \n{:s}'.format(
'\n'.join(['{:s} {:s} = {:s}'.format(*config_rule) for config_rule in config_rules])))
......@@ -135,8 +136,9 @@ def test_device_openconfig_configure(
device_data = context_client.GetDevice(DeviceId(**DEVICE_OC_ID))
config_rules = [
(ConfigActionEnum.Name(config_rule.action), config_rule.resource_key, config_rule.resource_value)
(ConfigActionEnum.Name(config_rule.action), config_rule.custom.resource_key, config_rule.custom.resource_value)
for config_rule in device_data.device_config.config_rules
if config_rule.WhichOneof('config_rule') == 'custom'
]
LOGGER.info('device_data.device_config.config_rules = \n{:s}'.format(
'\n'.join(['{:s} {:s} = {:s}'.format(*config_rule) for config_rule in config_rules])))
......@@ -276,7 +278,7 @@ def test_device_openconfig_deconfigure(
device_data = context_client.GetDevice(DeviceId(**DEVICE_OC_ID))
config_rules = [
(ConfigActionEnum.Name(config_rule.action), config_rule.resource_key, config_rule.resource_value)
(ConfigActionEnum.Name(config_rule.action), config_rule.custom.resource_key, config_rule.custom.resource_value)
for config_rule in device_data.device_config.config_rules
if config_rule.WhichOneof('config_rule') == 'custom'
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment