diff --git a/src/common/DeviceTypes.py b/src/common/DeviceTypes.py index f692321b4288f34e2269cea7862acf1b75009d15..a237223d5306c3a0342f78a4efb251348e12db23 100644 --- a/src/common/DeviceTypes.py +++ b/src/common/DeviceTypes.py @@ -15,16 +15,20 @@ from enum import Enum class DeviceTypeEnum(Enum): - EMULATED_DATACENTER = 'emu-datacenter' - EMULATED_OPEN_LINE_SYSTEM = 'emu-open-line-system' - EMULATED_PACKET_ROUTER = 'emu-packet-router' - EMULATED_PACKET_SWITCH = 'emu-packet-switch' + EMULATED_DATACENTER = 'emu-datacenter' + EMULATED_MICROVAWE_RADIO_SYSTEM = 'emu-microwave-radio-system' + EMULATED_OPEN_LINE_SYSTEM = 'emu-open-line-system' + EMULATED_OPTICAL_ROADM = 'emu-optical-roadm' + EMULATED_OPTICAL_TRANSPONDER = 'emu-optical-transponder' + EMULATED_P4_SWITCH = 'emu-p4-switch' + EMULATED_PACKET_ROUTER = 'emu-packet-router' + EMULATED_PACKET_SWITCH = 'emu-packet-switch' - DATACENTER = 'datacenter' - MICROVAWE_RADIO_SYSTEM = 'microwave-radio-system' - OPTICAL_ROADM = 'optical-roadm' - OPTICAL_TRANSPONDER = 'optical-transponder' - OPEN_LINE_SYSTEM = 'open-line-system' - PACKET_ROUTER = 'packet-router' - PACKET_SWITCH = 'packet-switch' - P4_SWITCH = 'p4-switch' + DATACENTER = 'datacenter' + MICROVAWE_RADIO_SYSTEM = 'microwave-radio-system' + OPEN_LINE_SYSTEM = 'open-line-system' + OPTICAL_ROADM = 'optical-roadm' + OPTICAL_TRANSPONDER = 'optical-transponder' + P4_SWITCH = 'p4-switch' + PACKET_ROUTER = 'packet-router' + PACKET_SWITCH = 'packet-switch' diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index 821a70418be7d323c5b1279c30a62fd9691e9e3f..5fe786667840916a2cbe780e518102ce1c0858ca 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -26,19 +26,49 @@ from .emulated.EmulatedDriver import EmulatedDriver # pylint: disable=wrong-impo DRIVERS.append( (EmulatedDriver, [ { - # Driver==unspecified & no device type specified => use Emulated - FilterFieldEnum.DRIVER: ORM_DeviceDriverEnum.UNDEFINED, + # Driver==EMULATED, all device types => use Emulated + FilterFieldEnum.DEVICE_TYPE: [ + DeviceTypeEnum.EMULATED_DATACENTER, + DeviceTypeEnum.EMULATED_MICROVAWE_RADIO_SYSTEM, + DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM, + DeviceTypeEnum.EMULATED_OPTICAL_ROADM, + DeviceTypeEnum.EMULATED_OPTICAL_TRANSPONDER, + DeviceTypeEnum.EMULATED_P4_SWITCH, + DeviceTypeEnum.EMULATED_PACKET_ROUTER, + DeviceTypeEnum.EMULATED_PACKET_SWITCH, + + DeviceTypeEnum.DATACENTER, + DeviceTypeEnum.MICROVAWE_RADIO_SYSTEM, + DeviceTypeEnum.OPEN_LINE_SYSTEM, + DeviceTypeEnum.OPTICAL_ROADM, + DeviceTypeEnum.OPTICAL_TRANSPONDER, + DeviceTypeEnum.P4_SWITCH, + DeviceTypeEnum.PACKET_ROUTER, + DeviceTypeEnum.PACKET_SWITCH, + ], + FilterFieldEnum.DRIVER: [ + ORM_DeviceDriverEnum.UNDEFINED, + ], }, { - # Emulated OLS/Packet Router, specifying Undefined/OpenConfig/TAPI Driver => use EmulatedDriver + # Emulated devices, all drivers => use Emulated FilterFieldEnum.DEVICE_TYPE: [ + DeviceTypeEnum.EMULATED_DATACENTER, + DeviceTypeEnum.EMULATED_MICROVAWE_RADIO_SYSTEM, DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM, + DeviceTypeEnum.EMULATED_OPTICAL_ROADM, + DeviceTypeEnum.EMULATED_OPTICAL_TRANSPONDER, + DeviceTypeEnum.EMULATED_P4_SWITCH, DeviceTypeEnum.EMULATED_PACKET_ROUTER, + DeviceTypeEnum.EMULATED_PACKET_SWITCH, ], - FilterFieldEnum.DRIVER : [ + FilterFieldEnum.DRIVER: [ ORM_DeviceDriverEnum.UNDEFINED, ORM_DeviceDriverEnum.OPENCONFIG, - ORM_DeviceDriverEnum.TRANSPORT_API + ORM_DeviceDriverEnum.TRANSPORT_API, + ORM_DeviceDriverEnum.P4, + ORM_DeviceDriverEnum.IETF_NETWORK_TOPOLOGY, + ORM_DeviceDriverEnum.ONF_TR_352, ], } ])) diff --git a/src/webui/service/static/topology_icons/Acknowledgements.txt b/src/webui/service/static/topology_icons/Acknowledgements.txt index 5daab200f87c29f18706e9e07023a45047739df7..ddf7a8d0de921219274135fe71fed683b078a4e7 100644 --- a/src/webui/service/static/topology_icons/Acknowledgements.txt +++ b/src/webui/service/static/topology_icons/Acknowledgements.txt @@ -13,3 +13,9 @@ https://symbols.getvecta.com/stencil_241/281_virtual-layer-switch.29420aff2f.png https://symbols.getvecta.com/stencil_240/102_ibm-tower.2cc133f3d0.png => datacenter.png https://symbols.getvecta.com/stencil_241/133_ibm-tower.995c44696c.png => emu-datacenter.png + +https://symbols.getvecta.com/stencil_240/193_programmable-switch.6d97768882.png => optical-roadm.png +https://symbols.getvecta.com/stencil_241/213_programmable-sw.32d3794d56.png => emu-optical-roadm.png + +https://symbols.getvecta.com/stencil_240/275_wae.c06b769cd7.png => optical-transponder.png +https://symbols.getvecta.com/stencil_241/289_wae.216d930c17.png => emu-optical-transponder.png diff --git a/src/webui/service/static/topology_icons/emu-optical-roadm.png b/src/webui/service/static/topology_icons/emu-optical-roadm.png new file mode 100644 index 0000000000000000000000000000000000000000..d52d71499e3f2b49bdb3f80d8b3c21f9b7350a65 Binary files /dev/null and b/src/webui/service/static/topology_icons/emu-optical-roadm.png differ diff --git a/src/webui/service/static/topology_icons/emu-optical-transponder.png b/src/webui/service/static/topology_icons/emu-optical-transponder.png new file mode 100644 index 0000000000000000000000000000000000000000..43b37859780cff9a99c8890972f457d6ffa97c3d Binary files /dev/null and b/src/webui/service/static/topology_icons/emu-optical-transponder.png differ diff --git a/src/webui/service/static/topology_icons/optical-roadm.png b/src/webui/service/static/topology_icons/optical-roadm.png new file mode 100644 index 0000000000000000000000000000000000000000..2015c839391120f8830d4ca765b1852d9f7bff83 Binary files /dev/null and b/src/webui/service/static/topology_icons/optical-roadm.png differ diff --git a/src/webui/service/static/topology_icons/optical-transponder.png b/src/webui/service/static/topology_icons/optical-transponder.png new file mode 100644 index 0000000000000000000000000000000000000000..cc59281102e6926fe8ff87fc15848485aec177a2 Binary files /dev/null and b/src/webui/service/static/topology_icons/optical-transponder.png differ