From 1296e935c1863d0f5ad7f284b5d3fa060a5de597 Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Mon, 5 May 2025 20:07:40 +0300 Subject: [PATCH] fix: remove hardcoded service settings after pathcomp bug fix --- .../p4_fabric_tna_acl_service_handler.py | 51 ++---------- .../p4_fabric_tna_int_service_handler.py | 40 ++-------- ...p4_fabric_tna_l2_simple_service_handler.py | 64 ++------------- .../p4_fabric_tna_l3_service_handler.py | 80 ++----------------- .../descriptors/service-create-acl.json | 6 +- .../descriptors/service-create-int.json | 14 ++-- .../descriptors/service-create-l2-simple.json | 10 +-- .../descriptors/service-create-l3.json | 18 ++--- .../p4-fabric-tna/descriptors/topology.json | 34 ++++---- ...witch-three-port-chassis-config-phy.pb.txt | 3 +- 10 files changed, 64 insertions(+), 256 deletions(-) diff --git a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py index 53c4e7c86..b57086a29 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py @@ -335,56 +335,15 @@ class P4FabricACLServiceHandler(_ServiceHandler): self.__settings = self.__settings_handler.get('/settings') LOGGER.info("{} with settings: {}".format(self.__service_label, self.__settings)) except Exception as ex: - self.__settings = {} - LOGGER.error("Failed to parse service settings: {}".format(ex)) - - def _default_settings(self): - acl = [ - { - PORT_ID: 1, - TRN_PORT_DST: 8080, - ACTION: ACTION_DROP - } - ] - - switch_info = { - "p4-sw1": { - ARCH: TARGET_ARCH_V1MODEL, - DPID: 1, - ACL: acl - } - } - self.__settings = { - SWITCH_INFO: switch_info - } - - # port_map = { - # "p4-sw1": { - # "port-1": { - # PORT_ID: 1, - # ACL: [ - # { - # IPV4_SRC: "10.158.72.11", - # IPV4_PREFIX_LEN: 32, - # ACTION: ACTION_DROP - # }, - # { - # TRN_PORT_DST: 8080, - # ACTION: ACTION_DROP - # } - # ] - # } - # } - # } + LOGGER.error("Failed to retrieve service settings: {}".format(ex)) + raise Exception(ex) def _parse_settings(self): - #TODO: Pass settings in a correct way try: - self.__switch_info = self.__settings[SWITCH_INFO] + self.__switch_info = self.__settings.value[SWITCH_INFO] except Exception as ex: - LOGGER.error("Failed to parse settings: {}".format(ex)) - self._default_settings() #TODO: Remove when bug is fixed - self.__switch_info = self.__settings[SWITCH_INFO] + LOGGER.error("Failed to parse service settings: {}".format(ex)) + raise Exception(ex) assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" for switch_name, switch_info in self.__switch_info.items(): diff --git a/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py index efdac5fea..dd19c4f89 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py @@ -305,43 +305,15 @@ class P4FabricINTServiceHandler(_ServiceHandler): self.__settings = self.__settings_handler.get('/settings') LOGGER.info("{} with settings: {}".format(self.__service_label, self.__settings)) except Exception as ex: - self.__settings = {} - LOGGER.error("Failed to parse service settings: {}".format(ex)) - - def _default_settings(self): - switch_info = { - "p4-sw1": { - ARCH: TARGET_ARCH_V1MODEL, - DPID: 1, - MAC: "fa:16:3e:93:8c:c0", - IP: "10.10.10.120", - PORT_INT: { - PORT_ID: 3, - PORT_TYPE: "host" - }, - RECIRCULATION_PORT_LIST: RECIRCULATION_PORTS_V1MODEL, - INT_REPORT_MIRROR_ID_LIST: INT_REPORT_MIRROR_ID_LIST_V1MODEL - } - } - int_collector_info = { - MAC: "fa:16:3e:fb:cf:96", - IP: "10.10.10.41", - PORT: 32766, - VLAN_ID: 4094 - } - self.__settings = { - SWITCH_INFO: switch_info, - INT_COLLECTOR_INFO: int_collector_info - } + LOGGER.error("Failed to retrieve service settings: {}".format(ex)) + raise Exception(ex) def _parse_settings(self): - #TODO: Pass settings in a correct way try: - self.__switch_info = self.__settings[SWITCH_INFO] + self.__switch_info = self.__settings.value[SWITCH_INFO] except Exception as ex: - LOGGER.error("Failed to parse settings: {}".format(ex)) - self._default_settings() #TODO: Remove when bug is fixed - self.__switch_info = self.__settings[SWITCH_INFO] + LOGGER.error("Failed to parse service settings: {}".format(ex)) + raise Exception(ex) assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" for switch_name, switch_info in self.__switch_info.items(): @@ -364,7 +336,7 @@ class P4FabricINTServiceHandler(_ServiceHandler): switch_info[INT_REPORT_MIRROR_ID_LIST] = INT_REPORT_MIRROR_ID_LIST_V1MODEL assert isinstance(switch_info[RECIRCULATION_PORT_LIST], list), "Switch {} - Recirculation ports must be described as a list".format(switch_name) - self.__int_collector_info = self.__settings[INT_COLLECTOR_INFO] + self.__int_collector_info = self.__settings.value[INT_COLLECTOR_INFO] assert isinstance(self.__int_collector_info, dict), "INT collector info object must be a map with mac, ip, port, and vlan_id keys)" self.__int_collector_mac = self.__int_collector_info[MAC] diff --git a/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py index c25fb087c..8d4aaf081 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py @@ -318,69 +318,15 @@ class P4FabricL2SimpleServiceHandler(_ServiceHandler): self.__settings = self.__settings_handler.get('/settings') LOGGER.info("{} with settings: {}".format(self.__service_label, self.__settings)) except Exception as ex: - self.__settings = {} - LOGGER.error("Failed to parse service settings: {}".format(ex)) - - def _default_settings(self): - port_list = [ - { - PORT_ID: 1, - PORT_TYPE: "host", - VLAN_ID: 4094 - }, - { - PORT_ID: 2, - PORT_TYPE: "host", - VLAN_ID: 4094 - }, - ] - fwd_list = [ - { - PORT_ID: 1, - HOST_MAC: "fa:16:3e:75:9c:e5" - }, - { - PORT_ID: 2, - HOST_MAC: "fa:16:3e:e2:af:28" - } - ] - switch_info = { - "p4-sw1": { - ARCH: TARGET_ARCH_V1MODEL, - DPID: 1, - PORT_LIST: port_list, - FORWARDING_LIST: fwd_list - } - } - self.__settings = { - SWITCH_INFO: switch_info - } - - # port_map = { - # "p4-sw1": { - # "port-1": { - # PORT_ID: 1, - # PORT_TYPE: PORT_TYPE_HOST, - # VLAN_ID: 4094, - # FORWARDING_LIST: ["fa:16:3e:75:9c:e5"] - # }, - # "port-2": { - # PORT_ID: 2, - # PORT_TYPE: PORT_TYPE_HOST, - # VLAN_ID: 4094, - # FORWARDING_LIST: ["fa:16:3e:e2:af:28"] - # } - # } - # } + LOGGER.error("Failed to retrieve service settings: {}".format(ex)) + raise Exception(ex) def _parse_settings(self): - #TODO: Pass settings in a correct way try: - self.__switch_info = self.__settings[SWITCH_INFO] + self.__switch_info = self.__settings.value[SWITCH_INFO] except Exception as ex: - LOGGER.error("Failed to parse settings: {}".format(ex)) - self._default_settings() #TODO: Remove when bug is fixed - self.__switch_info = self.__settings[SWITCH_INFO] + LOGGER.error("Failed to parse service settings: {}".format(ex)) + raise Exception(ex) assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" for switch_name, switch_info in self.__switch_info.items(): diff --git a/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py index ed5dd25bd..4b013328e 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py @@ -316,85 +316,15 @@ class P4FabricL3ServiceHandler(_ServiceHandler): self.__settings = self.__settings_handler.get('/settings') LOGGER.info("{} with settings: {}".format(self.__service_label, self.__settings)) except Exception as ex: - self.__settings = {} - LOGGER.error("Failed to parse service settings: {}".format(ex)) - - def _default_settings(self): - port_list = [ - { - PORT_ID: 1, - PORT_TYPE: "host" - }, - { - PORT_ID: 2, - PORT_TYPE: "host" - }, - ] - routing_list = [ - { - PORT_ID: 1, - IPV4_DST: "10.158.72.11", - IPV4_PREFIX_LEN: 32, - MAC_SRC: "fa:16:3e:e2:af:28", - MAC_DST: "fa:16:3e:75:9c:e5" - }, - { - PORT_ID: 2, - IPV4_DST: "172.16.10.9", - IPV4_PREFIX_LEN: 32, - MAC_SRC: "fa:16:3e:75:9c:e5", - MAC_DST: "fa:16:3e:e2:af:28" - } - ] - switch_info = { - "p4-sw1": { - ARCH: TARGET_ARCH_V1MODEL, - DPID: 1, - PORT_LIST: port_list, - ROUTING_LIST: routing_list - } - } - self.__settings = { - SWITCH_INFO: switch_info - } - - # port_map = { - # "p4-sw1": { - # "port-1": { - # PORT_ID: 1, - # PORT_TYPE: PORT_TYPE_HOST, - # ROUTING_LIST: [ - # { - # IPV4_DST: "10.158.72.11", - # IPV4_PREFIX_LEN: 32, - # MAC_SRC: "fa:16:3e:e2:af:28", - # MAC_DST: "fa:16:3e:75:9c:e5" - # } - # ] - # }, - # "port-2": { - # PORT_ID: 2, - # PORT_TYPE: PORT_TYPE_HOST, - # ROUTING_LIST: [ - # { - # IPV4_DST: "172.16.10.9", - # IPV4_PREFIX_LEN: 32, - # MAC_SRC: "fa:16:3e:75:9c:e5", - # MAC_DST: "fa:16:3e:e2:af:28" - # } - # ] - # } - # } - # } + LOGGER.error("Failed to retrieve service settings: {}".format(ex)) + raise Exception(ex) def _parse_settings(self): - #TODO: Pass settings in a correct way try: - self.__switch_info = self.__settings[SWITCH_INFO] + self.__switch_info = self.__settings.value[SWITCH_INFO] except Exception as ex: - LOGGER.error("Failed to parse settings: {}".format(ex)) - self._default_settings() #TODO: Remove when bug is fixed - self.__switch_info = self.__settings[SWITCH_INFO] + LOGGER.error("Failed to parse service settings: {}".format(ex)) + raise Exception(ex) assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" for switch_name, switch_info in self.__switch_info.items(): diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-acl.json b/src/tests/p4-fabric-tna/descriptors/service-create-acl.json index a0383f472..2ec9c6674 100644 --- a/src/tests/p4-fabric-tna/descriptors/service-create-acl.json +++ b/src/tests/p4-fabric-tna/descriptors/service-create-acl.json @@ -9,11 +9,11 @@ "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, "service_endpoint_ids": [ { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"} }, { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"} } ], @@ -25,7 +25,7 @@ "resource_key": "/settings", "resource_value": { "switch_info": { - "p4-sw1": { + "sw1": { "arch": "v1model", "dpid": 1, "acl": [ diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-int.json b/src/tests/p4-fabric-tna/descriptors/service-create-int.json index 98956b959..785468f68 100644 --- a/src/tests/p4-fabric-tna/descriptors/service-create-int.json +++ b/src/tests/p4-fabric-tna/descriptors/service-create-int.json @@ -9,11 +9,11 @@ "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, "service_endpoint_ids": [ { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"} }, { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"} } ], @@ -25,11 +25,11 @@ "resource_key": "/settings", "resource_value": { "switch_info": { - "p4-sw1": { + "sw1": { "arch": "v1model", "dpid": 1, - "mac": "fa:16:3e:93:8c:c0", - "ip": "10.10.10.120", + "mac": "ee:ee:8c:6c:f3:2c", + "ip": "192.168.5.139", "int_port": { "port_id": 3, "port_type": "host" @@ -37,8 +37,8 @@ } }, "int_collector_info": { - "mac": "fa:16:3e:fb:cf:96", - "ip": "10.10.10.41", + "mac": "46:e4:58:c6:74:53", + "ip": "192.168.5.137", "port": 32766, "vlan_id": 4094 } diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json b/src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json index 5a659f3d9..05f53d7a6 100644 --- a/src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json +++ b/src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json @@ -9,11 +9,11 @@ "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, "service_endpoint_ids": [ { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"} }, { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"} } ], @@ -25,7 +25,7 @@ "resource_key": "/settings", "resource_value": { "switch_info": { - "p4-sw1": { + "sw1": { "arch": "v1model", "dpid": 1, "port_list": [ @@ -43,11 +43,11 @@ "fwd_list": [ { "port_id": 1, - "host_mac": "fa:16:3e:75:9c:e5" + "host_mac": "00:00:00:00:00:01" }, { "port_id": 2, - "host_mac": "fa:16:3e:e2:af:28" + "host_mac": "00:00:00:00:00:02" } ] } diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-l3.json b/src/tests/p4-fabric-tna/descriptors/service-create-l3.json index 7d8153e7a..4a016f255 100644 --- a/src/tests/p4-fabric-tna/descriptors/service-create-l3.json +++ b/src/tests/p4-fabric-tna/descriptors/service-create-l3.json @@ -9,11 +9,11 @@ "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, "service_endpoint_ids": [ { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"} }, { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"} } ], @@ -25,7 +25,7 @@ "resource_key": "/settings", "resource_value": { "switch_info": { - "p4-sw1": { + "sw1": { "arch": "v1model", "dpid": 1, "port_list": [ @@ -41,17 +41,17 @@ "routing_list": [ { "port_id": 1, - "ipv4_dst": "10.158.72.11", + "ipv4_dst": "10.0.0.1", "ipv4_prefix_len": 32, - "mac_src": "fa:16:3e:e2:af:28", - "mac_dst": "fa:16:3e:75:9c:e5" + "mac_src": "00:00:00:00:00:02", + "mac_dst": "00:00:00:00:00:01" }, { "port_id": 2, - "ipv4_dst": "172.16.10.9", + "ipv4_dst": "10.0.0.2", "ipv4_prefix_len": 32, - "mac_src": "fa:16:3e:75:9c:e5", - "mac_dst": "fa:16:3e:e2:af:28" + "mac_src": "00:00:00:00:00:01", + "mac_dst": "00:00:00:00:00:02" } ] } diff --git a/src/tests/p4-fabric-tna/descriptors/topology.json b/src/tests/p4-fabric-tna/descriptors/topology.json index 30e1f5e9a..908faaa7d 100644 --- a/src/tests/p4-fabric-tna/descriptors/topology.json +++ b/src/tests/p4-fabric-tna/descriptors/topology.json @@ -11,11 +11,11 @@ "device_id": {"device_uuid": {"uuid": "tfs-sdn-controller"}}, "name": "tfs-sdn-controller", "device_type": "teraflowsdn", - "device_drivers": ["DEVICEDRIVER_IETF_L3VPN"], + "device_drivers": ["DEVICEDRIVER_IETF_L2VPN"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.10.10.41"}}, - {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8002"}}, + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "192.168.5.137"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8003"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { "endpoints": [{"uuid": "mgmt", "name": "mgmt", "type": "mgmt-int"}], "scheme": "http", "username": "admin", "password": "admin", "import_topology": "topology" @@ -51,18 +51,18 @@ } }, { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "device_type": "p4-switch", "device_drivers": ["DEVICEDRIVER_P4"], "device_operational_status": "DEVICEOPERATIONALSTATUS_DISABLED", - "name": "p4-sw1", + "name": "sw1", "device_config": { "config_rules": [ - {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.10.10.120"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "192.168.5.139"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "50001"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { "id": 1, - "name": "p4-sw1", + "name": "sw1", "vendor": "Open Networking Foundation", "hw_ver": "BMv2 simple_switch", "sw_ver": "Stratum", @@ -81,32 +81,32 @@ ], "links": [ { - "link_id": {"link_uuid": {"uuid": "p4-sw1/1==edge-net/eth1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "1"}}, + "link_id": {"link_uuid": {"uuid": "sw1/1==edge-net/eth1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"}}, {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { - "link_id": {"link_uuid": {"uuid": "edge-net/eth1==p4-sw1/1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + "link_id": {"link_uuid": {"uuid": "edge-net/eth1==sw1/1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "1"}} + {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"}} ] }, { - "link_id": {"link_uuid": {"uuid": "p4-sw1/2==corporate-net/eth1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "2"}}, + "link_id": {"link_uuid": {"uuid": "sw1/2==corporate-net/eth1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"}}, {"device_id": {"device_uuid": {"uuid": "corporate-net"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { - "link_id": {"link_uuid": {"uuid": "corporate-net/eth1==p4-sw1/2"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + "link_id": {"link_uuid": {"uuid": "corporate-net/eth1==sw1/2"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "corporate-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "2"}} + {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"}} ] }, { - "link_id": {"link_uuid": {"uuid": "p4-sw1/3==tfs-sdn-controller/mgmt"}}, "link_type": "LINKTYPE_MANAGEMENT", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "3"}}, + "link_id": {"link_uuid": {"uuid": "sw1/3==tfs-sdn-controller/mgmt"}}, "link_type": "LINKTYPE_MANAGEMENT", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "3"}}, {"device_id": {"device_uuid": {"uuid": "tfs-sdn-controller"}}, "endpoint_uuid": {"uuid": "mgmt"}} ] } diff --git a/src/tests/p4-fabric-tna/topology/p4-switch-three-port-chassis-config-phy.pb.txt b/src/tests/p4-fabric-tna/topology/p4-switch-three-port-chassis-config-phy.pb.txt index 038d36269..bc13f29d9 100644 --- a/src/tests/p4-fabric-tna/topology/p4-switch-three-port-chassis-config-phy.pb.txt +++ b/src/tests/p4-fabric-tna/topology/p4-switch-three-port-chassis-config-phy.pb.txt @@ -18,10 +18,11 @@ description: "Chassis configuration for a single Stratum bmv2 switch with 3 ports" chassis { platform: PLT_P4_SOFT_SWITCH - name: "bmv2-switch" + name: "sw1" } nodes { id: 1 + name: "sw1 node 1" slot: 1 index: 1 } -- GitLab