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

Misc improvements:

- added object factory method for emulated datacenters
parent 583fd6c1
No related branches found
No related tags found
1 merge request!54Release 2.0.0
...@@ -20,6 +20,7 @@ from common.tools.object_factory.ConfigRule import json_config_rule_set ...@@ -20,6 +20,7 @@ from common.tools.object_factory.ConfigRule import json_config_rule_set
DEVICE_DISABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_DISABLED DEVICE_DISABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_DISABLED
DEVICE_EMUDC_TYPE = DeviceTypeEnum.EMULATED_DATACENTER.value
DEVICE_EMUOLS_TYPE = DeviceTypeEnum.EMULATED_OPTICAL_LINE_SYSTEM.value DEVICE_EMUOLS_TYPE = DeviceTypeEnum.EMULATED_OPTICAL_LINE_SYSTEM.value
DEVICE_EMUPR_TYPE = DeviceTypeEnum.EMULATED_PACKET_ROUTER.value DEVICE_EMUPR_TYPE = DeviceTypeEnum.EMULATED_PACKET_ROUTER.value
DEVICE_EMU_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_UNDEFINED] DEVICE_EMU_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_UNDEFINED]
...@@ -71,6 +72,14 @@ def json_device_emulated_tapi_disabled( ...@@ -71,6 +72,14 @@ def json_device_emulated_tapi_disabled(
device_uuid, DEVICE_EMUOLS_TYPE, DEVICE_DISABLED, endpoints=endpoints, config_rules=config_rules, device_uuid, DEVICE_EMUOLS_TYPE, DEVICE_DISABLED, endpoints=endpoints, config_rules=config_rules,
drivers=drivers) drivers=drivers)
def json_device_emulated_datacenter_disabled(
device_uuid : str, endpoints : List[Dict] = [], config_rules : List[Dict] = [],
drivers : List[Dict] = DEVICE_EMU_DRIVERS
):
return json_device(
device_uuid, DEVICE_EMUDC_TYPE, DEVICE_DISABLED, endpoints=endpoints, config_rules=config_rules,
drivers=drivers)
def json_device_packetrouter_disabled( def json_device_packetrouter_disabled(
device_uuid : str, endpoints : List[Dict] = [], config_rules : List[Dict] = [], device_uuid : str, endpoints : List[Dict] = [], config_rules : List[Dict] = [],
drivers : List[Dict] = DEVICE_PR_DRIVERS drivers : List[Dict] = DEVICE_PR_DRIVERS
......
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