From d56e5665474684b6f22512a0845d03963916e075 Mon Sep 17 00:00:00 2001
From: Lluis Gifre <lluis.gifre@cttc.es>
Date: Sun, 11 Sep 2022 16:06:41 +0200
Subject: [PATCH] Misc improvements:

- added object factory method for emulated datacenters
---
 src/common/tools/object_factory/Device.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/common/tools/object_factory/Device.py b/src/common/tools/object_factory/Device.py
index 32baff9ae..d69272346 100644
--- a/src/common/tools/object_factory/Device.py
+++ b/src/common/tools/object_factory/Device.py
@@ -20,6 +20,7 @@ from common.tools.object_factory.ConfigRule import json_config_rule_set
 
 DEVICE_DISABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_DISABLED
 
+DEVICE_EMUDC_TYPE   = DeviceTypeEnum.EMULATED_DATACENTER.value
 DEVICE_EMUOLS_TYPE  = DeviceTypeEnum.EMULATED_OPTICAL_LINE_SYSTEM.value
 DEVICE_EMUPR_TYPE   = DeviceTypeEnum.EMULATED_PACKET_ROUTER.value
 DEVICE_EMU_DRIVERS  = [DeviceDriverEnum.DEVICEDRIVER_UNDEFINED]
@@ -71,6 +72,14 @@ def json_device_emulated_tapi_disabled(
         device_uuid, DEVICE_EMUOLS_TYPE, DEVICE_DISABLED, endpoints=endpoints, config_rules=config_rules,
         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(
         device_uuid : str, endpoints : List[Dict] = [], config_rules : List[Dict] = [],
         drivers : List[Dict] = DEVICE_PR_DRIVERS
-- 
GitLab