diff --git a/device b/device new file mode 100644 index 0000000000000000000000000000000000000000..758ee9df4bc630c7748769d14e2918df4b495791 --- /dev/null +++ b/device @@ -0,0 +1,220 @@ +[2025-01-15 15:49:41,972] INFO:__main__:Starting... +[2025-01-15 15:49:41,974] DEBUG:monitoring.client.MonitoringClient:Creating channel to monitoringservice:7070... +[2025-01-15 15:49:41,975] DEBUG:monitoring.client.MonitoringClient:Channel created +[2025-01-15 15:49:41,975] DEBUG:device.service.DeviceServiceServicerImpl:Creating Servicer... +[2025-01-15 15:49:41,975] DEBUG:device.service.DeviceServiceServicerImpl:Servicer Created +[2025-01-15 15:49:41,975] DEBUG:device.service.OpenConfigServicer:Creating Servicer... +[2025-01-15 15:49:41,975] DEBUG:device.service.OpenConfigServicer:Servicer Created +[2025-01-15 15:49:41,975] INFO:device.service.DeviceService:Starting Service (tentative endpoint: 0.0.0.0:2020, max_workers: 200)... +[2025-01-15 15:49:41,981] INFO:device.service.DeviceService:Listening on 0.0.0.0:2020... +[2025-01-15 15:49:41,982] DEBUG:device.service.DeviceService:Service started +[2025-01-15 15:49:41,982] INFO:__main__:Pre-loading drivers... +[2025-01-15 15:49:41,982] DEBUG:context.client.ContextClient:Creating channel to 10.152.183.206:1010... +[2025-01-15 15:49:41,983] DEBUG:context.client.ContextClient:Channel created +[2025-01-15 15:49:41,983] DEBUG:context.client.ContextClient:ListDevices request: {} +[2025-01-15 15:49:46,988] INFO:common.tools.client.RetryDecorator:[context.client.ContextClient:ListDevices] Retry 1/15 after 5.000000 seconds... +[2025-01-15 15:49:46,988] DEBUG:common.tools.client.RetryDecorator:[context.client.ContextClient:connect] Running prepare method... +[2025-01-15 15:49:46,989] DEBUG:context.client.ContextClient:ListDevices request: {} +[2025-01-15 15:49:51,997] INFO:common.tools.client.RetryDecorator:[context.client.ContextClient:ListDevices] Retry 2/15 after 5.000000 seconds... +[2025-01-15 15:49:51,997] DEBUG:common.tools.client.RetryDecorator:[context.client.ContextClient:connect] Running prepare method... +[2025-01-15 15:49:51,998] DEBUG:context.client.ContextClient:ListDevices request: {} +[2025-01-15 15:49:52,149] DEBUG:context.client.ContextClient:ListDevices result: {"devices": []} +[2025-01-15 15:50:17,451] DEBUG:device.service.DeviceServiceServicerImpl:AddDevice request: {"components": [], "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h1-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "h1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "emu-client", "name": ""} +[2025-01-15 15:50:17,451] DEBUG:context.client.ContextClient:Creating channel to 10.152.183.206:1010... +[2025-01-15 15:50:17,452] DEBUG:context.client.ContextClient:Channel created +[2025-01-15 15:50:17,453] DEBUG:device.service.DeviceServiceServicerImpl:AddDevice request: {"components": [], "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "RYU"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "openflow-ryu-controller", "name": ""} +[2025-01-15 15:50:17,453] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "h1"}}]}, "include_components": true, "include_config_rules": true, "include_endpoints": true} +[2025-01-15 15:50:17,453] DEBUG:context.client.ContextClient:Creating channel to 10.152.183.206:1010... +[2025-01-15 15:50:17,455] DEBUG:context.client.ContextClient:Channel created +[2025-01-15 15:50:17,455] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "RYU"}}]}, "include_components": true, "include_config_rules": true, "include_endpoints": true} +[2025-01-15 15:50:17,456] DEBUG:device.service.DeviceServiceServicerImpl:AddDevice request: {"components": [], "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h3-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "h3"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "emu-client", "name": ""} +[2025-01-15 15:50:17,457] DEBUG:context.client.ContextClient:Creating channel to 10.152.183.206:1010... +[2025-01-15 15:50:17,457] DEBUG:context.client.ContextClient:Channel created +[2025-01-15 15:50:17,457] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "h3"}}]}, "include_components": true, "include_config_rules": true, "include_endpoints": true} +[2025-01-15 15:50:17,458] DEBUG:device.service.DeviceServiceServicerImpl:AddDevice request: {"components": [], "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h2-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "h2"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "emu-client", "name": ""} +[2025-01-15 15:50:17,458] DEBUG:context.client.ContextClient:Creating channel to 10.152.183.206:1010... +[2025-01-15 15:50:17,459] DEBUG:context.client.ContextClient:Channel created +[2025-01-15 15:50:17,459] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "h2"}}]}, "include_components": true, "include_config_rules": true, "include_endpoints": true} +[2025-01-15 15:50:17,461] DEBUG:device.service.DeviceServiceServicerImpl:AddDevice request: {"components": [], "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h4-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "h4"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "emu-client", "name": ""} +[2025-01-15 15:50:17,462] DEBUG:context.client.ContextClient:Creating channel to 10.152.183.206:1010... +[2025-01-15 15:50:17,463] DEBUG:context.client.ContextClient:Channel created +[2025-01-15 15:50:17,463] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "h4"}}]}, "include_components": true, "include_config_rules": true, "include_endpoints": true} +[2025-01-15 15:50:17,464] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": []} +[2025-01-15 15:50:17,464] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h1-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "h1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "emu-client", "name": ""} +[2025-01-15 15:50:17,472] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": []} +[2025-01-15 15:50:17,473] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h3-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "h3"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "emu-client", "name": ""} +[2025-01-15 15:50:17,517] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "43be2984-467b-56da-a3e6-cfb6f1e8d978"}} +[2025-01-15 15:50:17,517] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "43be2984-467b-56da-a3e6-cfb6f1e8d978"}}]}, "include_components": true, "include_config_rules": true, "include_endpoints": true} +[2025-01-15 15:50:17,533] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": []} +[2025-01-15 15:50:17,533] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h4-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "h4"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "emu-client", "name": ""} +[2025-01-15 15:50:17,534] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": []} +[2025-01-15 15:50:17,534] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "RYU"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "openflow-ryu-controller", "name": ""} +[2025-01-15 15:50:17,552] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "2a79cf95-9c1c-5588-83be-9533d4100b51"}} +[2025-01-15 15:50:17,552] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "2a79cf95-9c1c-5588-83be-9533d4100b51"}}]}, "include_components": true, "include_config_rules": true, "include_endpoints": true} +[2025-01-15 15:50:17,561] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": []} +[2025-01-15 15:50:17,562] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h2-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "h2"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "emu-client", "name": ""} +[2025-01-15 15:50:17,581] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h3-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "43be2984-467b-56da-a3e6-cfb6f1e8d978"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "emu-client", "name": "h3"}]} +[2025-01-15 15:50:17,582] INFO:device.service.driver_api.DriverInstanceCache:Selecting driver for device(43be2984-467b-56da-a3e6-cfb6f1e8d978) with filter_fields({'device_type': 'emu-client', 'driver': [0]})... +[2025-01-15 15:50:17,582] INFO:device.service.driver_api.DriverInstanceCache:Driver(EmulatedDriver) selected for device(43be2984-467b-56da-a3e6-cfb6f1e8d978) with filter_fields({'device_type': 'emu-client', 'driver': [0]})... +[2025-01-15 15:50:17,583] DEBUG:tzlocal:/etc/timezone found, contents: + Etc/UTC + +[2025-01-15 15:50:17,584] DEBUG:tzlocal:/etc/localtime found +[2025-01-15 15:50:17,586] DEBUG:tzlocal:2 found: + {'/etc/timezone': 'Etc/UTC', '/etc/localtime is a symlink to': 'Etc/UTC'} +[2025-01-15 15:50:17,587] DEBUG:device.service.Tools:results_getconfig = [('/endpoints/endpoint[h3-eth0]', {'uuid': 'h3-eth0', 'type': 'copper/internal'}), ('/endpoints/endpoint[int]', {'uuid': 'int', 'type': 'copper/internal'})] +[2025-01-15 15:50:17,589] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h3-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[h3-eth0]", "resource_value": "{\"type\": \"copper/internal\", \"uuid\": \"h3-eth0\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[int]", "resource_value": "{\"type\": \"copper/internal\", \"uuid\": \"int\"}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "43be2984-467b-56da-a3e6-cfb6f1e8d978"}}, "endpoint_uuid": {"uuid": "h3-eth0"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": ""}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "43be2984-467b-56da-a3e6-cfb6f1e8d978"}}, "endpoint_uuid": {"uuid": "int"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": ""}], "device_id": {"device_uuid": {"uuid": "43be2984-467b-56da-a3e6-cfb6f1e8d978"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "emu-client", "name": "h3"} +[2025-01-15 15:50:17,589] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}} +[2025-01-15 15:50:17,590] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}]}, "include_components": true, "include_config_rules": true, "include_endpoints": true} +[2025-01-15 15:50:17,598] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "c929235b-c0bd-5016-9e63-e7eaafaaa792"}} +[2025-01-15 15:50:17,599] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "c929235b-c0bd-5016-9e63-e7eaafaaa792"}}]}, "include_components": true, "include_config_rules": true, "include_endpoints": true} +[2025-01-15 15:50:17,603] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h1-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "2a79cf95-9c1c-5588-83be-9533d4100b51"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "emu-client", "name": "h1"}]} +[2025-01-15 15:50:17,604] INFO:device.service.driver_api.DriverInstanceCache:Selecting driver for device(2a79cf95-9c1c-5588-83be-9533d4100b51) with filter_fields({'device_type': 'emu-client', 'driver': [0]})... +[2025-01-15 15:50:17,604] INFO:device.service.driver_api.DriverInstanceCache:Driver(EmulatedDriver) selected for device(2a79cf95-9c1c-5588-83be-9533d4100b51) with filter_fields({'device_type': 'emu-client', 'driver': [0]})... +[2025-01-15 15:50:17,605] DEBUG:device.service.Tools:results_getconfig = [('/endpoints/endpoint[h1-eth0]', {'uuid': 'h1-eth0', 'type': 'copper/internal'}), ('/endpoints/endpoint[int]', {'uuid': 'int', 'type': 'copper/internal'})] +[2025-01-15 15:50:17,607] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h1-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[h1-eth0]", "resource_value": "{\"type\": \"copper/internal\", \"uuid\": \"h1-eth0\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[int]", "resource_value": "{\"type\": \"copper/internal\", \"uuid\": \"int\"}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "2a79cf95-9c1c-5588-83be-9533d4100b51"}}, "endpoint_uuid": {"uuid": "h1-eth0"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": ""}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "2a79cf95-9c1c-5588-83be-9533d4100b51"}}, "endpoint_uuid": {"uuid": "int"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": ""}], "device_id": {"device_uuid": {"uuid": "2a79cf95-9c1c-5588-83be-9533d4100b51"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "emu-client", "name": "h1"} +[2025-01-15 15:50:17,618] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "53ad149d-c690-52ea-aba9-66a7fd5dbd85"}} +[2025-01-15 15:50:17,618] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "53ad149d-c690-52ea-aba9-66a7fd5dbd85"}}]}, "include_components": true, "include_config_rules": true, "include_endpoints": true} +[2025-01-15 15:50:17,640] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "43be2984-467b-56da-a3e6-cfb6f1e8d978"}} +[2025-01-15 15:50:17,641] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "43be2984-467b-56da-a3e6-cfb6f1e8d978"}}]}, "include_components": false, "include_config_rules": false, "include_endpoints": true} +[2025-01-15 15:50:17,641] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "openflow-ryu-controller", "name": "RYU"}]} +[2025-01-15 15:50:17,642] INFO:device.service.driver_api.DriverInstanceCache:Selecting driver for device(b2ed9526-554d-5a79-9dc9-33e00faecef1) with filter_fields({'device_type': 'openflow-ryu-controller', 'driver': [13]})... +[2025-01-15 15:50:17,642] INFO:device.service.driver_api.DriverInstanceCache:Driver(OpenFlowDriver) selected for device(b2ed9526-554d-5a79-9dc9-33e00faecef1) with filter_fields({'device_type': 'openflow-ryu-controller', 'driver': [13]})... +[2025-01-15 15:50:17,642] INFO:device.service.drivers.OpenFlow.TfsApiClient:self_devices_urlhttp://10.1.7.197:8080/v1.0/topology/switches +[2025-01-15 15:50:17,644] DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 10.1.7.197:8080 +[2025-01-15 15:50:17,647] DEBUG:urllib3.connectionpool:http://10.1.7.197:8080 "GET / HTTP/1.1" 200 306 +[2025-01-15 15:50:17,647] INFO:device.service.drivers.OpenFlow.OpenFlowDriver:resource_key:['__endpoints__'] +[2025-01-15 15:50:17,648] INFO:device.service.drivers.OpenFlow.OpenFlowDriver:resource_key:__endpoints__ +[2025-01-15 15:50:17,648] DEBUG:device.service.drivers.OpenFlow.TfsApiClient:[get_devices_endpoints] begin +[2025-01-15 15:50:17,649] DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 10.1.7.197:8080 +[2025-01-15 15:50:17,652] DEBUG:urllib3.connectionpool:http://10.1.7.197:8080 "GET /v1.0/topology/switches HTTP/1.1" 200 1661 +[2025-01-15 15:50:17,652] INFO:device.service.drivers.OpenFlow.TfsApiClient:[get_devices_endpoints] json_reply_switches=[{"dpid": "0000000000000001", "ports": [{"dpid": "0000000000000001", "port_no": "00000001", "hw_addr": "82:52:b9:9f:7d:b6", "name": "s1-eth1"}, {"dpid": "0000000000000001", "port_no": "00000002", "hw_addr": "be:1c:08:bc:fb:fa", "name": "s1-eth2"}]}, {"dpid": "0000000000000004", "ports": [{"dpid": "0000000000000004", "port_no": "00000001", "hw_addr": "52:32:f8:50:c5:77", "name": "s4-eth1"}, {"dpid": "0000000000000004", "port_no": "00000002", "hw_addr": "8a:bb:c9:b2:79:ba", "name": "s4-eth2"}]}, {"dpid": "0000000000000003", "ports": [{"dpid": "0000000000000003", "port_no": "00000001", "hw_addr": "46:0e:0d:04:58:28", "name": "s3-eth1"}, {"dpid": "0000000000000003", "port_no": "00000002", "hw_addr": "02:bb:8c:18:e0:24", "name": "s3-eth2"}]}, {"dpid": "0000000000000002", "ports": [{"dpid": "0000000000000002", "port_no": "00000001", "hw_addr": "6e:b4:7e:ea:22:2a", "name": "s2-eth1"}, {"dpid": "0000000000000002", "port_no": "00000004", "hw_addr": "ea:43:e4:a5:2c:7f", "name": "s2-eth4"}, {"dpid": "0000000000000002", "port_no": "00000002", "hw_addr": "da:d2:dd:5f:e0:9e", "name": "s2-eth2"}, {"dpid": "0000000000000002", "port_no": "00000003", "hw_addr": "d6:9e:c2:9f:2b:e2", "name": "s2-eth3"}]}, {"dpid": "0000000000000005", "ports": [{"dpid": "0000000000000005", "port_no": "00000004", "hw_addr": "b2:3b:fa:f9:89:91", "name": "s5-eth4"}, {"dpid": "0000000000000005", "port_no": "00000001", "hw_addr": "66:be:8c:28:47:67", "name": "s5-eth1"}, {"dpid": "0000000000000005", "port_no": "00000002", "hw_addr": "62:86:c3:2e:09:c0", "name": "s5-eth2"}, {"dpid": "0000000000000005", "port_no": "00000003", "hw_addr": "0e:b5:83:92:2d:2e", "name": "s5-eth3"}]}] +[2025-01-15 15:50:17,654] DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 10.1.7.197:8080 +[2025-01-15 15:50:17,656] DEBUG:urllib3.connectionpool:http://10.1.7.197:8080 "GET /v1.0/topology/links HTTP/1.1" 200 2240 +[2025-01-15 15:50:17,657] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000003', 's3-eth2'), ('0000000000000004', 's4-eth1')] +[2025-01-15 15:50:17,657] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000004', 's4-eth1'), ('0000000000000003', 's3-eth2')] +[2025-01-15 15:50:17,657] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000005', 's5-eth1'), ('0000000000000004', 's4-eth2')] +[2025-01-15 15:50:17,657] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000005', 's5-eth2'), ('0000000000000001', 's1-eth2')] +[2025-01-15 15:50:17,657] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000002', 's2-eth2'), ('0000000000000003', 's3-eth1')] +[2025-01-15 15:50:17,657] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000002', 's2-eth1'), ('0000000000000001', 's1-eth1')] +[2025-01-15 15:50:17,657] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000001', 's1-eth1'), ('0000000000000002', 's2-eth1')] +[2025-01-15 15:50:17,657] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000003', 's3-eth1'), ('0000000000000002', 's2-eth2')] +[2025-01-15 15:50:17,657] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000001', 's1-eth2'), ('0000000000000005', 's5-eth2')] +[2025-01-15 15:50:17,657] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000004', 's4-eth2'), ('0000000000000005', 's5-eth1')] +[2025-01-15 15:50:17,657] DEBUG:device.service.drivers.OpenFlow.TfsApiClient:[get_devices_endpoints] topology; returning +[2025-01-15 15:50:17,658] DEBUG:device.service.Tools:results_getconfig = [('/devices/device[0000000000000001]', {'uuid': '0000000000000001', 'name': '0000000000000001', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000001]', {'uuid': '0000000000000001', 'name': '0000000000000001', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000004]', {'uuid': '0000000000000004', 'name': '0000000000000004', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000004]', {'uuid': '0000000000000004', 'name': '0000000000000004', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000003]', {'uuid': '0000000000000003', 'name': '0000000000000003', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000003]', {'uuid': '0000000000000003', 'name': '0000000000000003', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000002]', {'uuid': '0000000000000002', 'name': '0000000000000002', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000002]', {'uuid': '0000000000000002', 'name': '0000000000000002', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000002]', {'uuid': '0000000000000002', 'name': '0000000000000002', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000002]', {'uuid': '0000000000000002', 'name': '0000000000000002', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000005]', {'uuid': '0000000000000005', 'name': '0000000000000005', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000005]', {'uuid': '0000000000000005', 'name': '0000000000000005', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000005]', {'uuid': '0000000000000005', 'name': '0000000000000005', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/devices/device[0000000000000005]', {'uuid': '0000000000000005', 'name': '0000000000000005', 'type': 'packet-switch', 'status': 2, 'drivers': 'DEVICEDRIVER_RYU'}), ('/endpoints/endpoint[s1-eth1]', {'device_uuid': '0000000000000001', 'uuid': 's1-eth1', 'name': 's1-eth1', 'type': 'copper'}), ('/endpoints/endpoint[s1-eth2]', {'device_uuid': '0000000000000001', 'uuid': 's1-eth2', 'name': 's1-eth2', 'type': 'copper'}), ('/endpoints/endpoint[s4-eth1]', {'device_uuid': '0000000000000004', 'uuid': 's4-eth1', 'name': 's4-eth1', 'type': 'copper'}), ('/endpoints/endpoint[s4-eth2]', {'device_uuid': '0000000000000004', 'uuid': 's4-eth2', 'name': 's4-eth2', 'type': 'copper'}), ('/endpoints/endpoint[s3-eth1]', {'device_uuid': '0000000000000003', 'uuid': 's3-eth1', 'name': 's3-eth1', 'type': 'copper'}), ('/endpoints/endpoint[s3-eth2]', {'device_uuid': '0000000000000003', 'uuid': 's3-eth2', 'name': 's3-eth2', 'type': 'copper'}), ('/endpoints/endpoint[s2-eth1]', {'device_uuid': '0000000000000002', 'uuid': 's2-eth1', 'name': 's2-eth1', 'type': 'copper'}), ('/endpoints/endpoint[s2-eth4]', {'device_uuid': '0000000000000002', 'uuid': 's2-eth4', 'name': 's2-eth4', 'type': 'copper'}), ('/endpoints/endpoint[s2-eth2]', {'device_uuid': '0000000000000002', 'uuid': 's2-eth2', 'name': 's2-eth2', 'type': 'copper'}), ('/endpoints/endpoint[s2-eth3]', {'device_uuid': '0000000000000002', 'uuid': 's2-eth3', 'name': 's2-eth3', 'type': 'copper'}), ('/endpoints/endpoint[s5-eth4]', {'device_uuid': '0000000000000005', 'uuid': 's5-eth4', 'name': 's5-eth4', 'type': 'copper'}), ('/endpoints/endpoint[s5-eth1]', {'device_uuid': '0000000000000005', 'uuid': 's5-eth1', 'name': 's5-eth1', 'type': 'copper'}), ('/endpoints/endpoint[s5-eth2]', {'device_uuid': '0000000000000005', 'uuid': 's5-eth2', 'name': 's5-eth2', 'type': 'copper'}), ('/endpoints/endpoint[s5-eth3]', {'device_uuid': '0000000000000005', 'uuid': 's5-eth3', 'name': 's5-eth3', 'type': 'copper'}), ('/links/link[s3-eth2==s4-eth1]', {'uuid': 's3-eth2==s4-eth1', 'name': '0000000000000003-s3-eth2===0000000000000004-s4-eth1', 'endpoints': [('0000000000000003', 's3-eth2'), ('0000000000000004', 's4-eth1')]}), ('/links/link[s4-eth1==s3-eth2]', {'uuid': 's4-eth1==s3-eth2', 'name': '0000000000000004-s4-eth1===0000000000000003-s3-eth2', 'endpoints': [('0000000000000004', 's4-eth1'), ('0000000000000003', 's3-eth2')]}), ('/links/link[s5-eth1==s4-eth2]', {'uuid': 's5-eth1==s4-eth2', 'name': '0000000000000005-s5-eth1===0000000000000004-s4-eth2', 'endpoints': [('0000000000000005', 's5-eth1'), ('0000000000000004', 's4-eth2')]}), ('/links/link[s5-eth2==s1-eth2]', {'uuid': 's5-eth2==s1-eth2', 'name': '0000000000000005-s5-eth2===0000000000000001-s1-eth2', 'endpoints': [('0000000000000005', 's5-eth2'), ('0000000000000001', 's1-eth2')]}), ('/links/link[s2-eth2==s3-eth1]', {'uuid': 's2-eth2==s3-eth1', 'name': '0000000000000002-s2-eth2===0000000000000003-s3-eth1', 'endpoints': [('0000000000000002', 's2-eth2'), ('0000000000000003', 's3-eth1')]}), ('/links/link[s2-eth1==s1-eth1]', {'uuid': 's2-eth1==s1-eth1', 'name': '0000000000000002-s2-eth1===0000000000000001-s1-eth1', 'endpoints': [('0000000000000002', 's2-eth1'), ('0000000000000001', 's1-eth1')]}), ('/links/link[s1-eth1==s2-eth1]', {'uuid': 's1-eth1==s2-eth1', 'name': '0000000000000001-s1-eth1===0000000000000002-s2-eth1', 'endpoints': [('0000000000000001', 's1-eth1'), ('0000000000000002', 's2-eth1')]}), ('/links/link[s3-eth1==s2-eth2]', {'uuid': 's3-eth1==s2-eth2', 'name': '0000000000000003-s3-eth1===0000000000000002-s2-eth2', 'endpoints': [('0000000000000003', 's3-eth1'), ('0000000000000002', 's2-eth2')]}), ('/links/link[s1-eth2==s5-eth2]', {'uuid': 's1-eth2==s5-eth2', 'name': '0000000000000001-s1-eth2===0000000000000005-s5-eth2', 'endpoints': [('0000000000000001', 's1-eth2'), ('0000000000000005', 's5-eth2')]}), ('/links/link[s4-eth2==s5-eth1]', {'uuid': 's4-eth2==s5-eth1', 'name': '0000000000000004-s4-eth2===0000000000000005-s5-eth1', 'endpoints': [('0000000000000004', 's4-eth2'), ('0000000000000005', 's5-eth1')]})] +[2025-01-15 15:50:17,660] INFO:device.service.drivers.OpenFlow.OpenFlowDriver:resource_key:['__endpoints__'] +[2025-01-15 15:50:17,660] INFO:device.service.drivers.OpenFlow.OpenFlowDriver:resource_key:__endpoints__ +[2025-01-15 15:50:17,660] DEBUG:device.service.drivers.OpenFlow.TfsApiClient:[get_devices_endpoints] begin +[2025-01-15 15:50:17,661] DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 10.1.7.197:8080 +[2025-01-15 15:50:17,663] DEBUG:urllib3.connectionpool:http://10.1.7.197:8080 "GET /v1.0/topology/switches HTTP/1.1" 200 1661 +[2025-01-15 15:50:17,664] INFO:device.service.drivers.OpenFlow.TfsApiClient:[get_devices_endpoints] json_reply_switches=[{"dpid": "0000000000000001", "ports": [{"dpid": "0000000000000001", "port_no": "00000001", "hw_addr": "82:52:b9:9f:7d:b6", "name": "s1-eth1"}, {"dpid": "0000000000000001", "port_no": "00000002", "hw_addr": "be:1c:08:bc:fb:fa", "name": "s1-eth2"}]}, {"dpid": "0000000000000004", "ports": [{"dpid": "0000000000000004", "port_no": "00000001", "hw_addr": "52:32:f8:50:c5:77", "name": "s4-eth1"}, {"dpid": "0000000000000004", "port_no": "00000002", "hw_addr": "8a:bb:c9:b2:79:ba", "name": "s4-eth2"}]}, {"dpid": "0000000000000003", "ports": [{"dpid": "0000000000000003", "port_no": "00000001", "hw_addr": "46:0e:0d:04:58:28", "name": "s3-eth1"}, {"dpid": "0000000000000003", "port_no": "00000002", "hw_addr": "02:bb:8c:18:e0:24", "name": "s3-eth2"}]}, {"dpid": "0000000000000002", "ports": [{"dpid": "0000000000000002", "port_no": "00000001", "hw_addr": "6e:b4:7e:ea:22:2a", "name": "s2-eth1"}, {"dpid": "0000000000000002", "port_no": "00000004", "hw_addr": "ea:43:e4:a5:2c:7f", "name": "s2-eth4"}, {"dpid": "0000000000000002", "port_no": "00000002", "hw_addr": "da:d2:dd:5f:e0:9e", "name": "s2-eth2"}, {"dpid": "0000000000000002", "port_no": "00000003", "hw_addr": "d6:9e:c2:9f:2b:e2", "name": "s2-eth3"}]}, {"dpid": "0000000000000005", "ports": [{"dpid": "0000000000000005", "port_no": "00000004", "hw_addr": "b2:3b:fa:f9:89:91", "name": "s5-eth4"}, {"dpid": "0000000000000005", "port_no": "00000001", "hw_addr": "66:be:8c:28:47:67", "name": "s5-eth1"}, {"dpid": "0000000000000005", "port_no": "00000002", "hw_addr": "62:86:c3:2e:09:c0", "name": "s5-eth2"}, {"dpid": "0000000000000005", "port_no": "00000003", "hw_addr": "0e:b5:83:92:2d:2e", "name": "s5-eth3"}]}] +[2025-01-15 15:50:17,666] DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 10.1.7.197:8080 +[2025-01-15 15:50:17,667] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "2a79cf95-9c1c-5588-83be-9533d4100b51"}} +[2025-01-15 15:50:17,667] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "2a79cf95-9c1c-5588-83be-9533d4100b51"}}]}, "include_components": false, "include_config_rules": false, "include_endpoints": true} +[2025-01-15 15:50:17,668] DEBUG:urllib3.connectionpool:http://10.1.7.197:8080 "GET /v1.0/topology/links HTTP/1.1" 200 2240 +[2025-01-15 15:50:17,669] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000003', 's3-eth2'), ('0000000000000004', 's4-eth1')] +[2025-01-15 15:50:17,669] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000004', 's4-eth1'), ('0000000000000003', 's3-eth2')] +[2025-01-15 15:50:17,669] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000005', 's5-eth1'), ('0000000000000004', 's4-eth2')] +[2025-01-15 15:50:17,669] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000005', 's5-eth2'), ('0000000000000001', 's1-eth2')] +[2025-01-15 15:50:17,669] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000002', 's2-eth2'), ('0000000000000003', 's3-eth1')] +[2025-01-15 15:50:17,669] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000002', 's2-eth1'), ('0000000000000001', 's1-eth1')] +[2025-01-15 15:50:17,669] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000001', 's1-eth1'), ('0000000000000002', 's2-eth1')] +[2025-01-15 15:50:17,669] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000003', 's3-eth1'), ('0000000000000002', 's2-eth2')] +[2025-01-15 15:50:17,669] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000001', 's1-eth2'), ('0000000000000005', 's5-eth2')] +[2025-01-15 15:50:17,670] INFO:device.service.drivers.OpenFlow.TfsApiClient:link_endpoint_ids are [('0000000000000004', 's4-eth2'), ('0000000000000005', 's5-eth1')] +[2025-01-15 15:50:17,670] DEBUG:device.service.drivers.OpenFlow.TfsApiClient:[get_devices_endpoints] topology; returning +[2025-01-15 15:50:17,675] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000001]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000001\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000001\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000004]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000004\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000004\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000003]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000003\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000003\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000002]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000002\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000002\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000005]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000005\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000005\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth1\", \"type\": \"copper\", \"uuid\": \"s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth2\", \"type\": \"copper\", \"uuid\": \"s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth1\", \"type\": \"copper\", \"uuid\": \"s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth2\", \"type\": \"copper\", \"uuid\": \"s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth1\", \"type\": \"copper\", \"uuid\": \"s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth2\", \"type\": \"copper\", \"uuid\": \"s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth1\", \"type\": \"copper\", \"uuid\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth4\", \"type\": \"copper\", \"uuid\": \"s2-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth2\", \"type\": \"copper\", \"uuid\": \"s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth3\", \"type\": \"copper\", \"uuid\": \"s2-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth4\", \"type\": \"copper\", \"uuid\": \"s5-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth1\", \"type\": \"copper\", \"uuid\": \"s5-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth2\", \"type\": \"copper\", \"uuid\": \"s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth3\", \"type\": \"copper\", \"uuid\": \"s5-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth2==s4-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth2\"], [\"0000000000000004\", \"s4-eth1\"]], \"name\": \"0000000000000003-s3-eth2===0000000000000004-s4-eth1\", \"uuid\": \"s3-eth2==s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth1==s3-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth1\"], [\"0000000000000003\", \"s3-eth2\"]], \"name\": \"0000000000000004-s4-eth1===0000000000000003-s3-eth2\", \"uuid\": \"s4-eth1==s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth1==s4-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth1\"], [\"0000000000000004\", \"s4-eth2\"]], \"name\": \"0000000000000005-s5-eth1===0000000000000004-s4-eth2\", \"uuid\": \"s5-eth1==s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth2==s1-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth2\"], [\"0000000000000001\", \"s1-eth2\"]], \"name\": \"0000000000000005-s5-eth2===0000000000000001-s1-eth2\", \"uuid\": \"s5-eth2==s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth2==s3-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth2\"], [\"0000000000000003\", \"s3-eth1\"]], \"name\": \"0000000000000002-s2-eth2===0000000000000003-s3-eth1\", \"uuid\": \"s2-eth2==s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth1==s1-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth1\"], [\"0000000000000001\", \"s1-eth1\"]], \"name\": \"0000000000000002-s2-eth1===0000000000000001-s1-eth1\", \"uuid\": \"s2-eth1==s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth1==s2-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth1\"], [\"0000000000000002\", \"s2-eth1\"]], \"name\": \"0000000000000001-s1-eth1===0000000000000002-s2-eth1\", \"uuid\": \"s1-eth1==s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth1==s2-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth1\"], [\"0000000000000002\", \"s2-eth2\"]], \"name\": \"0000000000000003-s3-eth1===0000000000000002-s2-eth2\", \"uuid\": \"s3-eth1==s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth2==s5-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth2\"], [\"0000000000000005\", \"s5-eth2\"]], \"name\": \"0000000000000001-s1-eth2===0000000000000005-s5-eth2\", \"uuid\": \"s1-eth2==s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth2==s5-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth2\"], [\"0000000000000005\", \"s5-eth1\"]], \"name\": \"0000000000000004-s4-eth2===0000000000000005-s5-eth1\", \"uuid\": \"s4-eth2==s5-eth1\"}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "mgmt", "kpi_sample_types": [], "name": "mgmt"}], "device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "openflow-ryu-controller", "name": "RYU"} +[2025-01-15 15:50:17,676] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h4-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "c929235b-c0bd-5016-9e63-e7eaafaaa792"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "emu-client", "name": "h4"}]} +[2025-01-15 15:50:17,676] INFO:device.service.driver_api.DriverInstanceCache:Selecting driver for device(c929235b-c0bd-5016-9e63-e7eaafaaa792) with filter_fields({'device_type': 'emu-client', 'driver': [0]})... +[2025-01-15 15:50:17,676] INFO:device.service.driver_api.DriverInstanceCache:Driver(EmulatedDriver) selected for device(c929235b-c0bd-5016-9e63-e7eaafaaa792) with filter_fields({'device_type': 'emu-client', 'driver': [0]})... +[2025-01-15 15:50:17,678] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h2-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "53ad149d-c690-52ea-aba9-66a7fd5dbd85"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_type": "emu-client", "name": "h2"}]} +[2025-01-15 15:50:17,678] INFO:device.service.driver_api.DriverInstanceCache:Selecting driver for device(53ad149d-c690-52ea-aba9-66a7fd5dbd85) with filter_fields({'device_type': 'emu-client', 'driver': [0]})... +[2025-01-15 15:50:17,678] INFO:device.service.driver_api.DriverInstanceCache:Driver(EmulatedDriver) selected for device(53ad149d-c690-52ea-aba9-66a7fd5dbd85) with filter_fields({'device_type': 'emu-client', 'driver': [0]})... +[2025-01-15 15:50:17,679] DEBUG:device.service.Tools:results_getconfig = [('/endpoints/endpoint[h4-eth0]', {'uuid': 'h4-eth0', 'type': 'copper/internal'}), ('/endpoints/endpoint[int]', {'uuid': 'int', 'type': 'copper/internal'})] +[2025-01-15 15:50:17,680] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h4-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[h4-eth0]", "resource_value": "{\"type\": \"copper/internal\", \"uuid\": \"h4-eth0\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[int]", "resource_value": "{\"type\": \"copper/internal\", \"uuid\": \"int\"}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "c929235b-c0bd-5016-9e63-e7eaafaaa792"}}, "endpoint_uuid": {"uuid": "h4-eth0"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": ""}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "c929235b-c0bd-5016-9e63-e7eaafaaa792"}}, "endpoint_uuid": {"uuid": "int"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": ""}], "device_id": {"device_uuid": {"uuid": "c929235b-c0bd-5016-9e63-e7eaafaaa792"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "emu-client", "name": "h4"} +[2025-01-15 15:50:17,681] DEBUG:device.service.Tools:results_getconfig = [('/endpoints/endpoint[h2-eth0]', {'uuid': 'h2-eth0', 'type': 'copper/internal'}), ('/endpoints/endpoint[int]', {'uuid': 'int', 'type': 'copper/internal'})] +[2025-01-15 15:50:17,681] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"endpoints\": [\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"h2-eth0\"\n},\n{\n\"type\": \"copper/internal\",\n\"uuid\": \"int\"\n}\n]\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[h2-eth0]", "resource_value": "{\"type\": \"copper/internal\", \"uuid\": \"h2-eth0\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[int]", "resource_value": "{\"type\": \"copper/internal\", \"uuid\": \"int\"}"}}]}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "53ad149d-c690-52ea-aba9-66a7fd5dbd85"}}, "endpoint_uuid": {"uuid": "h2-eth0"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": ""}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "53ad149d-c690-52ea-aba9-66a7fd5dbd85"}}, "endpoint_uuid": {"uuid": "int"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": ""}], "device_id": {"device_uuid": {"uuid": "53ad149d-c690-52ea-aba9-66a7fd5dbd85"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "emu-client", "name": "h2"} +[2025-01-15 15:50:17,690] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "43be2984-467b-56da-a3e6-cfb6f1e8d978"}}, "endpoint_uuid": {"uuid": "894f1db9-682b-534b-9e3e-1086e5435058"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "43813baf-195e-5da6-af20-b3d0922e71a7"}}, "topology_uuid": {"uuid": "c76135e3-24a8-5e92-9bed-c3c9139359c8"}}}, "endpoint_location": {}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": "h3-eth0"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "43be2984-467b-56da-a3e6-cfb6f1e8d978"}}, "endpoint_uuid": {"uuid": "b8fe51a0-91f7-5203-b571-87ef53e2ca2d"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "43813baf-195e-5da6-af20-b3d0922e71a7"}}, "topology_uuid": {"uuid": "c76135e3-24a8-5e92-9bed-c3c9139359c8"}}}, "endpoint_location": {}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": "int"}], "device_id": {"device_uuid": {"uuid": "43be2984-467b-56da-a3e6-cfb6f1e8d978"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "emu-client", "name": "h3"}]} +[2025-01-15 15:50:17,694] DEBUG:device.service.DeviceServiceServicerImpl:AddDevice reply: {"device_uuid": {"uuid": "43be2984-467b-56da-a3e6-cfb6f1e8d978"}} +[2025-01-15 15:50:17,725] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "2a79cf95-9c1c-5588-83be-9533d4100b51"}}, "endpoint_uuid": {"uuid": "1b3b2793-64b2-57e3-88bb-8ce89c413e16"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "43813baf-195e-5da6-af20-b3d0922e71a7"}}, "topology_uuid": {"uuid": "c76135e3-24a8-5e92-9bed-c3c9139359c8"}}}, "endpoint_location": {}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": "int"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "2a79cf95-9c1c-5588-83be-9533d4100b51"}}, "endpoint_uuid": {"uuid": "c9788b13-30ad-581c-a04d-7191d4e7cbd1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "43813baf-195e-5da6-af20-b3d0922e71a7"}}, "topology_uuid": {"uuid": "c76135e3-24a8-5e92-9bed-c3c9139359c8"}}}, "endpoint_location": {}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": "h1-eth0"}], "device_id": {"device_uuid": {"uuid": "2a79cf95-9c1c-5588-83be-9533d4100b51"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "emu-client", "name": "h1"}]} +[2025-01-15 15:50:17,726] DEBUG:device.service.DeviceServiceServicerImpl:AddDevice reply: {"device_uuid": {"uuid": "2a79cf95-9c1c-5588-83be-9533d4100b51"}} +[2025-01-15 15:50:17,740] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}} +[2025-01-15 15:50:17,741] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_drivers": [], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000001"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "mgmt", "kpi_sample_types": [], "name": "mgmt"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000001"}}, "endpoint_uuid": {"uuid": "s1-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s1-eth1"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000001"}}, "endpoint_uuid": {"uuid": "s1-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s1-eth2"}], "device_id": {"device_uuid": {"uuid": "0000000000000001"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "packet-switch", "name": "0000000000000001"} +[2025-01-15 15:50:17,742] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "c929235b-c0bd-5016-9e63-e7eaafaaa792"}} +[2025-01-15 15:50:17,742] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "c929235b-c0bd-5016-9e63-e7eaafaaa792"}}]}, "include_components": false, "include_config_rules": false, "include_endpoints": true} +[2025-01-15 15:50:17,758] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "53ad149d-c690-52ea-aba9-66a7fd5dbd85"}} +[2025-01-15 15:50:17,758] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "53ad149d-c690-52ea-aba9-66a7fd5dbd85"}}]}, "include_components": false, "include_config_rules": false, "include_endpoints": true} +[2025-01-15 15:50:17,780] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "c929235b-c0bd-5016-9e63-e7eaafaaa792"}}, "endpoint_uuid": {"uuid": "0d195f1f-6876-5fbd-bb6e-58b0e645ca1f"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "43813baf-195e-5da6-af20-b3d0922e71a7"}}, "topology_uuid": {"uuid": "c76135e3-24a8-5e92-9bed-c3c9139359c8"}}}, "endpoint_location": {}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": "int"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "c929235b-c0bd-5016-9e63-e7eaafaaa792"}}, "endpoint_uuid": {"uuid": "a2efb85b-c007-5419-ad52-3a5729f0da71"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "43813baf-195e-5da6-af20-b3d0922e71a7"}}, "topology_uuid": {"uuid": "c76135e3-24a8-5e92-9bed-c3c9139359c8"}}}, "endpoint_location": {}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": "h4-eth0"}], "device_id": {"device_uuid": {"uuid": "c929235b-c0bd-5016-9e63-e7eaafaaa792"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "emu-client", "name": "h4"}]} +[2025-01-15 15:50:17,780] DEBUG:device.service.DeviceServiceServicerImpl:AddDevice reply: {"device_uuid": {"uuid": "c929235b-c0bd-5016-9e63-e7eaafaaa792"}} +[2025-01-15 15:50:17,782] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "995a62fc-2b2f-5d35-a0bb-c5a7dd22e892"}} +[2025-01-15 15:50:17,782] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_drivers": [], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000004"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "mgmt", "kpi_sample_types": [], "name": "mgmt"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000004"}}, "endpoint_uuid": {"uuid": "s4-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s4-eth1"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000004"}}, "endpoint_uuid": {"uuid": "s4-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s4-eth2"}], "device_id": {"device_uuid": {"uuid": "0000000000000004"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "packet-switch", "name": "0000000000000004"} +[2025-01-15 15:50:17,791] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "53ad149d-c690-52ea-aba9-66a7fd5dbd85"}}, "endpoint_uuid": {"uuid": "20cb95be-f52f-5615-a349-18b893d59c9d"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "43813baf-195e-5da6-af20-b3d0922e71a7"}}, "topology_uuid": {"uuid": "c76135e3-24a8-5e92-9bed-c3c9139359c8"}}}, "endpoint_location": {}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": "int"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "53ad149d-c690-52ea-aba9-66a7fd5dbd85"}}, "endpoint_uuid": {"uuid": "ad8b1d58-1a1e-56db-9b29-3cc111845804"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "43813baf-195e-5da6-af20-b3d0922e71a7"}}, "topology_uuid": {"uuid": "c76135e3-24a8-5e92-9bed-c3c9139359c8"}}}, "endpoint_location": {}, "endpoint_type": "copper/internal", "kpi_sample_types": [], "name": "h2-eth0"}], "device_id": {"device_uuid": {"uuid": "53ad149d-c690-52ea-aba9-66a7fd5dbd85"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "emu-client", "name": "h2"}]} +[2025-01-15 15:50:17,792] DEBUG:device.service.DeviceServiceServicerImpl:AddDevice reply: {"device_uuid": {"uuid": "53ad149d-c690-52ea-aba9-66a7fd5dbd85"}} +[2025-01-15 15:50:17,808] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "c38fb93c-9578-5d7f-a081-a2db4b5f468c"}} +[2025-01-15 15:50:17,809] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_drivers": [], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000003"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "mgmt", "kpi_sample_types": [], "name": "mgmt"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000003"}}, "endpoint_uuid": {"uuid": "s3-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s3-eth1"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000003"}}, "endpoint_uuid": {"uuid": "s3-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s3-eth2"}], "device_id": {"device_uuid": {"uuid": "0000000000000003"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "packet-switch", "name": "0000000000000003"} +[2025-01-15 15:50:17,833] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "0bdaca38-0541-5d36-b58b-f828943dc213"}} +[2025-01-15 15:50:17,833] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_drivers": [], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000002"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "mgmt", "kpi_sample_types": [], "name": "mgmt"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000002"}}, "endpoint_uuid": {"uuid": "s2-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s2-eth1"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000002"}}, "endpoint_uuid": {"uuid": "s2-eth4"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s2-eth4"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000002"}}, "endpoint_uuid": {"uuid": "s2-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s2-eth2"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000002"}}, "endpoint_uuid": {"uuid": "s2-eth3"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s2-eth3"}], "device_id": {"device_uuid": {"uuid": "0000000000000002"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "packet-switch", "name": "0000000000000002"} +[2025-01-15 15:50:17,862] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "a2f2519b-3c76-5f1e-99c7-cc2bbf815eec"}} +[2025-01-15 15:50:17,862] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_drivers": [], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000005"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "mgmt", "kpi_sample_types": [], "name": "mgmt"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000005"}}, "endpoint_uuid": {"uuid": "s5-eth4"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s5-eth4"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000005"}}, "endpoint_uuid": {"uuid": "s5-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s5-eth1"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000005"}}, "endpoint_uuid": {"uuid": "s5-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s5-eth2"}, {"endpoint_id": {"device_id": {"device_uuid": {"uuid": "0000000000000005"}}, "endpoint_uuid": {"uuid": "s5-eth3"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, "endpoint_type": "copper", "kpi_sample_types": [], "name": "s5-eth3"}], "device_id": {"device_uuid": {"uuid": "0000000000000005"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "packet-switch", "name": "0000000000000005"} +[2025-01-15 15:50:17,888] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "b52aaf41-0c5a-55f2-a66e-eb42c1153a96"}} +[2025-01-15 15:50:17,888] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000001"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "RYU/mgmt==0000000000000001/mgmt"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "RYU/mgmt==0000000000000001/mgmt"} +[2025-01-15 15:50:17,929] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "a6ad0bf0-955e-5a3e-be3f-b161562ee922"}} +[2025-01-15 15:50:17,929] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000004"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "RYU/mgmt==0000000000000004/mgmt"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "RYU/mgmt==0000000000000004/mgmt"} +[2025-01-15 15:50:17,946] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "f732a34b-3b58-5208-972d-ead200e217a2"}} +[2025-01-15 15:50:17,947] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000003"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "RYU/mgmt==0000000000000003/mgmt"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "RYU/mgmt==0000000000000003/mgmt"} +[2025-01-15 15:50:17,964] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "9c27e1ef-2de9-5d4a-a39b-d986bc46e6ff"}} +[2025-01-15 15:50:17,964] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000002"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "RYU/mgmt==0000000000000002/mgmt"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "RYU/mgmt==0000000000000002/mgmt"} +[2025-01-15 15:50:17,982] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "23163f66-d373-53c7-87b9-a19332d499f9"}} +[2025-01-15 15:50:17,983] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000005"}}, "endpoint_uuid": {"uuid": "mgmt"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "RYU/mgmt==0000000000000005/mgmt"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "RYU/mgmt==0000000000000005/mgmt"} +[2025-01-15 15:50:17,999] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "035237df-d927-5831-9ca0-3e817f20b775"}} +[2025-01-15 15:50:17,999] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "0000000000000003"}}, "endpoint_uuid": {"uuid": "s3-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000004"}}, "endpoint_uuid": {"uuid": "s4-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "s3-eth2==s4-eth1"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "0000000000000003-s3-eth2===0000000000000004-s4-eth1"} +[2025-01-15 15:50:18,014] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "beee85c4-62a0-5b24-87c0-dff4090b8b0f"}} +[2025-01-15 15:50:18,015] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "0000000000000004"}}, "endpoint_uuid": {"uuid": "s4-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000003"}}, "endpoint_uuid": {"uuid": "s3-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "s4-eth1==s3-eth2"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "0000000000000004-s4-eth1===0000000000000003-s3-eth2"} +[2025-01-15 15:50:18,054] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "19aa0a16-b510-5efe-9c3d-8c4605319a74"}} +[2025-01-15 15:50:18,054] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "0000000000000005"}}, "endpoint_uuid": {"uuid": "s5-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000004"}}, "endpoint_uuid": {"uuid": "s4-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "s5-eth1==s4-eth2"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "0000000000000005-s5-eth1===0000000000000004-s4-eth2"} +[2025-01-15 15:50:18,070] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "327c4898-85a4-5f42-912d-2c60c04fa650"}} +[2025-01-15 15:50:18,071] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "0000000000000005"}}, "endpoint_uuid": {"uuid": "s5-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000001"}}, "endpoint_uuid": {"uuid": "s1-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "s5-eth2==s1-eth2"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "0000000000000005-s5-eth2===0000000000000001-s1-eth2"} +[2025-01-15 15:50:18,086] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "646fad23-eeee-5261-aa56-dcb6bd69ef9d"}} +[2025-01-15 15:50:18,087] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "0000000000000002"}}, "endpoint_uuid": {"uuid": "s2-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000003"}}, "endpoint_uuid": {"uuid": "s3-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "s2-eth2==s3-eth1"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "0000000000000002-s2-eth2===0000000000000003-s3-eth1"} +[2025-01-15 15:50:18,102] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "b28d7bf0-19d3-5b94-b8c2-88f6dca8cd25"}} +[2025-01-15 15:50:18,103] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "0000000000000002"}}, "endpoint_uuid": {"uuid": "s2-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000001"}}, "endpoint_uuid": {"uuid": "s1-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "s2-eth1==s1-eth1"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "0000000000000002-s2-eth1===0000000000000001-s1-eth1"} +[2025-01-15 15:50:18,118] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "3dcd7c7c-fd54-5599-b0cc-235806ee5b6f"}} +[2025-01-15 15:50:18,119] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "0000000000000001"}}, "endpoint_uuid": {"uuid": "s1-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000002"}}, "endpoint_uuid": {"uuid": "s2-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "s1-eth1==s2-eth1"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "0000000000000001-s1-eth1===0000000000000002-s2-eth1"} +[2025-01-15 15:50:18,136] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "d0890789-62ad-5f5f-815b-786c1976c567"}} +[2025-01-15 15:50:18,136] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "0000000000000003"}}, "endpoint_uuid": {"uuid": "s3-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000002"}}, "endpoint_uuid": {"uuid": "s2-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "s3-eth1==s2-eth2"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "0000000000000003-s3-eth1===0000000000000002-s2-eth2"} +[2025-01-15 15:50:18,153] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "509740ba-cd2c-59aa-8843-4cf8e278fc5d"}} +[2025-01-15 15:50:18,154] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "0000000000000001"}}, "endpoint_uuid": {"uuid": "s1-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000005"}}, "endpoint_uuid": {"uuid": "s5-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "s1-eth2==s5-eth2"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "0000000000000001-s1-eth2===0000000000000005-s5-eth2"} +[2025-01-15 15:50:18,169] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "0f1c88d1-1b46-5e79-88a1-b0a5d2e28324"}} +[2025-01-15 15:50:18,170] DEBUG:context.client.ContextClient:SetLink request: {"link_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "0000000000000004"}}, "endpoint_uuid": {"uuid": "s4-eth2"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}, {"device_id": {"device_uuid": {"uuid": "0000000000000005"}}, "endpoint_uuid": {"uuid": "s5-eth1"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}], "link_id": {"link_uuid": {"uuid": "s4-eth2==s5-eth1"}}, "link_type": "LINKTYPE_UNKNOWN", "name": "0000000000000004-s4-eth2===0000000000000005-s5-eth1"} +[2025-01-15 15:50:18,186] DEBUG:context.client.ContextClient:SetLink result: {"link_uuid": {"uuid": "b7f8ba02-fe4c-5c3b-9346-740a69da5394"}} +[2025-01-15 15:50:18,187] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}]}, "include_components": false, "include_config_rules": false, "include_endpoints": true} +[2025-01-15 15:50:18,197] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "endpoint_uuid": {"uuid": "158268b6-968b-582a-968d-da4b922ebc1c"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "43813baf-195e-5da6-af20-b3d0922e71a7"}}, "topology_uuid": {"uuid": "c76135e3-24a8-5e92-9bed-c3c9139359c8"}}}, "endpoint_location": {}, "endpoint_type": "mgmt", "kpi_sample_types": [], "name": "mgmt"}], "device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "openflow-ryu-controller", "name": "RYU"}]} +[2025-01-15 15:50:18,199] DEBUG:device.service.DeviceServiceServicerImpl:AddDevice reply: {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}} +[2025-01-15 15:50:25,412] DEBUG:device.service.DeviceServiceServicerImpl:ConfigureDevice request: {"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000001]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000001\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000001\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000004]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000004\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000004\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000003]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000003\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000003\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000002]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000002\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000002\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000005]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000005\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000005\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth1\", \"type\": \"copper\", \"uuid\": \"s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth2\", \"type\": \"copper\", \"uuid\": \"s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth1\", \"type\": \"copper\", \"uuid\": \"s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth2\", \"type\": \"copper\", \"uuid\": \"s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth1\", \"type\": \"copper\", \"uuid\": \"s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth2\", \"type\": \"copper\", \"uuid\": \"s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth1\", \"type\": \"copper\", \"uuid\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth4\", \"type\": \"copper\", \"uuid\": \"s2-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth2\", \"type\": \"copper\", \"uuid\": \"s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth3\", \"type\": \"copper\", \"uuid\": \"s2-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth4\", \"type\": \"copper\", \"uuid\": \"s5-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth1\", \"type\": \"copper\", \"uuid\": \"s5-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth2\", \"type\": \"copper\", \"uuid\": \"s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth3\", \"type\": \"copper\", \"uuid\": \"s5-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth2==s4-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth2\"], [\"0000000000000004\", \"s4-eth1\"]], \"name\": \"0000000000000003-s3-eth2===0000000000000004-s4-eth1\", \"uuid\": \"s3-eth2==s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth1==s3-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth1\"], [\"0000000000000003\", \"s3-eth2\"]], \"name\": \"0000000000000004-s4-eth1===0000000000000003-s3-eth2\", \"uuid\": \"s4-eth1==s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth1==s4-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth1\"], [\"0000000000000004\", \"s4-eth2\"]], \"name\": \"0000000000000005-s5-eth1===0000000000000004-s4-eth2\", \"uuid\": \"s5-eth1==s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth2==s1-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth2\"], [\"0000000000000001\", \"s1-eth2\"]], \"name\": \"0000000000000005-s5-eth2===0000000000000001-s1-eth2\", \"uuid\": \"s5-eth2==s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth2==s3-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth2\"], [\"0000000000000003\", \"s3-eth1\"]], \"name\": \"0000000000000002-s2-eth2===0000000000000003-s3-eth1\", \"uuid\": \"s2-eth2==s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth1==s1-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth1\"], [\"0000000000000001\", \"s1-eth1\"]], \"name\": \"0000000000000002-s2-eth1===0000000000000001-s1-eth1\", \"uuid\": \"s2-eth1==s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth1==s2-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth1\"], [\"0000000000000002\", \"s2-eth1\"]], \"name\": \"0000000000000001-s1-eth1===0000000000000002-s2-eth1\", \"uuid\": \"s1-eth1==s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth1==s2-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth1\"], [\"0000000000000002\", \"s2-eth2\"]], \"name\": \"0000000000000003-s3-eth1===0000000000000002-s2-eth2\", \"uuid\": \"s3-eth1==s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth2==s5-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth2\"], [\"0000000000000005\", \"s5-eth2\"]], \"name\": \"0000000000000001-s1-eth2===0000000000000005-s5-eth2\", \"uuid\": \"s1-eth2==s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth2==s5-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth2\"], [\"0000000000000005\", \"s5-eth1\"]], \"name\": \"0000000000000004-s4-eth2===0000000000000005-s5-eth1\", \"uuid\": \"s4-eth2==s5-eth1\"}"}}, {"action": "CONFIGACTION_UNDEFINED", "custom": {"resource_key": "/device[s2]/flow[h1-h3]", "resource_value": "{\"dpid\": \"0000000000000002\", \"in-port\": \"s2-eth3\", \"out-port\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_UNDEFINED", "custom": {"resource_key": "/device[s2]/flow[h3-h1]", "resource_value": "{\"dpid\": \"0000000000000002\", \"in-port\": \"s2-eth1\", \"out-port\": \"s2-eth3\"}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "endpoint_uuid": {"uuid": "158268b6-968b-582a-968d-da4b922ebc1c"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "43813baf-195e-5da6-af20-b3d0922e71a7"}}, "topology_uuid": {"uuid": "c76135e3-24a8-5e92-9bed-c3c9139359c8"}}}, "endpoint_location": {}, "endpoint_type": "mgmt", "kpi_sample_types": [], "name": "mgmt"}], "device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "openflow-ryu-controller", "name": "RYU"} +[2025-01-15 15:50:25,412] DEBUG:context.client.ContextClient:Creating channel to 10.152.183.206:1010... +[2025-01-15 15:50:25,412] DEBUG:context.client.ContextClient:Channel created +[2025-01-15 15:50:25,413] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}]}, "include_components": false, "include_config_rules": true, "include_endpoints": false} +[2025-01-15 15:50:25,424] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000001]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000001\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000001\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000004]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000004\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000004\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000003]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000003\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000003\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000002]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000002\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000002\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000005]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000005\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000005\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth1\", \"type\": \"copper\", \"uuid\": \"s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth2\", \"type\": \"copper\", \"uuid\": \"s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth1\", \"type\": \"copper\", \"uuid\": \"s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth2\", \"type\": \"copper\", \"uuid\": \"s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth1\", \"type\": \"copper\", \"uuid\": \"s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth2\", \"type\": \"copper\", \"uuid\": \"s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth1\", \"type\": \"copper\", \"uuid\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth4\", \"type\": \"copper\", \"uuid\": \"s2-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth2\", \"type\": \"copper\", \"uuid\": \"s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth3\", \"type\": \"copper\", \"uuid\": \"s2-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth4\", \"type\": \"copper\", \"uuid\": \"s5-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth1\", \"type\": \"copper\", \"uuid\": \"s5-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth2\", \"type\": \"copper\", \"uuid\": \"s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth3\", \"type\": \"copper\", \"uuid\": \"s5-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth2==s4-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth2\"], [\"0000000000000004\", \"s4-eth1\"]], \"name\": \"0000000000000003-s3-eth2===0000000000000004-s4-eth1\", \"uuid\": \"s3-eth2==s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth1==s3-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth1\"], [\"0000000000000003\", \"s3-eth2\"]], \"name\": \"0000000000000004-s4-eth1===0000000000000003-s3-eth2\", \"uuid\": \"s4-eth1==s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth1==s4-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth1\"], [\"0000000000000004\", \"s4-eth2\"]], \"name\": \"0000000000000005-s5-eth1===0000000000000004-s4-eth2\", \"uuid\": \"s5-eth1==s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth2==s1-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth2\"], [\"0000000000000001\", \"s1-eth2\"]], \"name\": \"0000000000000005-s5-eth2===0000000000000001-s1-eth2\", \"uuid\": \"s5-eth2==s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth2==s3-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth2\"], [\"0000000000000003\", \"s3-eth1\"]], \"name\": \"0000000000000002-s2-eth2===0000000000000003-s3-eth1\", \"uuid\": \"s2-eth2==s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth1==s1-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth1\"], [\"0000000000000001\", \"s1-eth1\"]], \"name\": \"0000000000000002-s2-eth1===0000000000000001-s1-eth1\", \"uuid\": \"s2-eth1==s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth1==s2-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth1\"], [\"0000000000000002\", \"s2-eth1\"]], \"name\": \"0000000000000001-s1-eth1===0000000000000002-s2-eth1\", \"uuid\": \"s1-eth1==s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth1==s2-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth1\"], [\"0000000000000002\", \"s2-eth2\"]], \"name\": \"0000000000000003-s3-eth1===0000000000000002-s2-eth2\", \"uuid\": \"s3-eth1==s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth2==s5-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth2\"], [\"0000000000000005\", \"s5-eth2\"]], \"name\": \"0000000000000001-s1-eth2===0000000000000005-s5-eth2\", \"uuid\": \"s1-eth2==s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth2==s5-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth2\"], [\"0000000000000005\", \"s5-eth1\"]], \"name\": \"0000000000000004-s4-eth2===0000000000000005-s5-eth1\", \"uuid\": \"s4-eth2==s5-eth1\"}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "openflow-ryu-controller", "name": "RYU"}]} +[2025-01-15 15:50:25,425] INFO:device.service.drivers.OpenFlow.OpenFlowDriver:SetConfig_resources:[('_connect/address', '10.1.7.197'), ('_connect/port', '8080'), ('_connect/settings', '{\n"timeout": 120\n}'), ('/devices/device[0000000000000001]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000001", "status": 2, "type": "packet-switch", "uuid": "0000000000000001"}'), ('/devices/device[0000000000000004]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000004", "status": 2, "type": "packet-switch", "uuid": "0000000000000004"}'), ('/devices/device[0000000000000003]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000003", "status": 2, "type": "packet-switch", "uuid": "0000000000000003"}'), ('/devices/device[0000000000000002]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000002", "status": 2, "type": "packet-switch", "uuid": "0000000000000002"}'), ('/devices/device[0000000000000005]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000005", "status": 2, "type": "packet-switch", "uuid": "0000000000000005"}'), ('/endpoints/endpoint[s1-eth1]', '{"device_uuid": "0000000000000001", "name": "s1-eth1", "type": "copper", "uuid": "s1-eth1"}'), ('/endpoints/endpoint[s1-eth2]', '{"device_uuid": "0000000000000001", "name": "s1-eth2", "type": "copper", "uuid": "s1-eth2"}'), ('/endpoints/endpoint[s4-eth1]', '{"device_uuid": "0000000000000004", "name": "s4-eth1", "type": "copper", "uuid": "s4-eth1"}'), ('/endpoints/endpoint[s4-eth2]', '{"device_uuid": "0000000000000004", "name": "s4-eth2", "type": "copper", "uuid": "s4-eth2"}'), ('/endpoints/endpoint[s3-eth1]', '{"device_uuid": "0000000000000003", "name": "s3-eth1", "type": "copper", "uuid": "s3-eth1"}'), ('/endpoints/endpoint[s3-eth2]', '{"device_uuid": "0000000000000003", "name": "s3-eth2", "type": "copper", "uuid": "s3-eth2"}'), ('/endpoints/endpoint[s2-eth1]', '{"device_uuid": "0000000000000002", "name": "s2-eth1", "type": "copper", "uuid": "s2-eth1"}'), ('/endpoints/endpoint[s2-eth4]', '{"device_uuid": "0000000000000002", "name": "s2-eth4", "type": "copper", "uuid": "s2-eth4"}'), ('/endpoints/endpoint[s2-eth2]', '{"device_uuid": "0000000000000002", "name": "s2-eth2", "type": "copper", "uuid": "s2-eth2"}'), ('/endpoints/endpoint[s2-eth3]', '{"device_uuid": "0000000000000002", "name": "s2-eth3", "type": "copper", "uuid": "s2-eth3"}'), ('/endpoints/endpoint[s5-eth4]', '{"device_uuid": "0000000000000005", "name": "s5-eth4", "type": "copper", "uuid": "s5-eth4"}'), ('/endpoints/endpoint[s5-eth1]', '{"device_uuid": "0000000000000005", "name": "s5-eth1", "type": "copper", "uuid": "s5-eth1"}'), ('/endpoints/endpoint[s5-eth2]', '{"device_uuid": "0000000000000005", "name": "s5-eth2", "type": "copper", "uuid": "s5-eth2"}'), ('/endpoints/endpoint[s5-eth3]', '{"device_uuid": "0000000000000005", "name": "s5-eth3", "type": "copper", "uuid": "s5-eth3"}'), ('/links/link[s3-eth2==s4-eth1]', '{"endpoints": [["0000000000000003", "s3-eth2"], ["0000000000000004", "s4-eth1"]], "name": "0000000000000003-s3-eth2===0000000000000004-s4-eth1", "uuid": "s3-eth2==s4-eth1"}'), ('/links/link[s4-eth1==s3-eth2]', '{"endpoints": [["0000000000000004", "s4-eth1"], ["0000000000000003", "s3-eth2"]], "name": "0000000000000004-s4-eth1===0000000000000003-s3-eth2", "uuid": "s4-eth1==s3-eth2"}'), ('/links/link[s5-eth1==s4-eth2]', '{"endpoints": [["0000000000000005", "s5-eth1"], ["0000000000000004", "s4-eth2"]], "name": "0000000000000005-s5-eth1===0000000000000004-s4-eth2", "uuid": "s5-eth1==s4-eth2"}'), ('/links/link[s5-eth2==s1-eth2]', '{"endpoints": [["0000000000000005", "s5-eth2"], ["0000000000000001", "s1-eth2"]], "name": "0000000000000005-s5-eth2===0000000000000001-s1-eth2", "uuid": "s5-eth2==s1-eth2"}'), ('/links/link[s2-eth2==s3-eth1]', '{"endpoints": [["0000000000000002", "s2-eth2"], ["0000000000000003", "s3-eth1"]], "name": "0000000000000002-s2-eth2===0000000000000003-s3-eth1", "uuid": "s2-eth2==s3-eth1"}'), ('/links/link[s2-eth1==s1-eth1]', '{"endpoints": [["0000000000000002", "s2-eth1"], ["0000000000000001", "s1-eth1"]], "name": "0000000000000002-s2-eth1===0000000000000001-s1-eth1", "uuid": "s2-eth1==s1-eth1"}'), ('/links/link[s1-eth1==s2-eth1]', '{"endpoints": [["0000000000000001", "s1-eth1"], ["0000000000000002", "s2-eth1"]], "name": "0000000000000001-s1-eth1===0000000000000002-s2-eth1", "uuid": "s1-eth1==s2-eth1"}'), ('/links/link[s3-eth1==s2-eth2]', '{"endpoints": [["0000000000000003", "s3-eth1"], ["0000000000000002", "s2-eth2"]], "name": "0000000000000003-s3-eth1===0000000000000002-s2-eth2", "uuid": "s3-eth1==s2-eth2"}'), ('/links/link[s1-eth2==s5-eth2]', '{"endpoints": [["0000000000000001", "s1-eth2"], ["0000000000000005", "s5-eth2"]], "name": "0000000000000001-s1-eth2===0000000000000005-s5-eth2", "uuid": "s1-eth2==s5-eth2"}'), ('/links/link[s4-eth2==s5-eth1]', '{"endpoints": [["0000000000000004", "s4-eth2"], ["0000000000000005", "s5-eth1"]], "name": "0000000000000004-s4-eth2===0000000000000005-s5-eth1", "uuid": "s4-eth2==s5-eth1"}')] +[2025-01-15 15:50:25,425] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000001]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000001\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000001\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000004]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000004\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000004\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000003]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000003\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000003\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000002]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000002\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000002\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000005]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000005\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000005\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth1\", \"type\": \"copper\", \"uuid\": \"s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth2\", \"type\": \"copper\", \"uuid\": \"s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth1\", \"type\": \"copper\", \"uuid\": \"s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth2\", \"type\": \"copper\", \"uuid\": \"s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth1\", \"type\": \"copper\", \"uuid\": \"s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth2\", \"type\": \"copper\", \"uuid\": \"s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth1\", \"type\": \"copper\", \"uuid\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth4\", \"type\": \"copper\", \"uuid\": \"s2-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth2\", \"type\": \"copper\", \"uuid\": \"s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth3\", \"type\": \"copper\", \"uuid\": \"s2-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth4\", \"type\": \"copper\", \"uuid\": \"s5-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth1\", \"type\": \"copper\", \"uuid\": \"s5-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth2\", \"type\": \"copper\", \"uuid\": \"s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth3\", \"type\": \"copper\", \"uuid\": \"s5-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth2==s4-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth2\"], [\"0000000000000004\", \"s4-eth1\"]], \"name\": \"0000000000000003-s3-eth2===0000000000000004-s4-eth1\", \"uuid\": \"s3-eth2==s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth1==s3-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth1\"], [\"0000000000000003\", \"s3-eth2\"]], \"name\": \"0000000000000004-s4-eth1===0000000000000003-s3-eth2\", \"uuid\": \"s4-eth1==s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth1==s4-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth1\"], [\"0000000000000004\", \"s4-eth2\"]], \"name\": \"0000000000000005-s5-eth1===0000000000000004-s4-eth2\", \"uuid\": \"s5-eth1==s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth2==s1-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth2\"], [\"0000000000000001\", \"s1-eth2\"]], \"name\": \"0000000000000005-s5-eth2===0000000000000001-s1-eth2\", \"uuid\": \"s5-eth2==s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth2==s3-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth2\"], [\"0000000000000003\", \"s3-eth1\"]], \"name\": \"0000000000000002-s2-eth2===0000000000000003-s3-eth1\", \"uuid\": \"s2-eth2==s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth1==s1-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth1\"], [\"0000000000000001\", \"s1-eth1\"]], \"name\": \"0000000000000002-s2-eth1===0000000000000001-s1-eth1\", \"uuid\": \"s2-eth1==s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth1==s2-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth1\"], [\"0000000000000002\", \"s2-eth1\"]], \"name\": \"0000000000000001-s1-eth1===0000000000000002-s2-eth1\", \"uuid\": \"s1-eth1==s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth1==s2-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth1\"], [\"0000000000000002\", \"s2-eth2\"]], \"name\": \"0000000000000003-s3-eth1===0000000000000002-s2-eth2\", \"uuid\": \"s3-eth1==s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth2==s5-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth2\"], [\"0000000000000005\", \"s5-eth2\"]], \"name\": \"0000000000000001-s1-eth2===0000000000000005-s5-eth2\", \"uuid\": \"s1-eth2==s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth2==s5-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth2\"], [\"0000000000000005\", \"s5-eth1\"]], \"name\": \"0000000000000004-s4-eth2===0000000000000005-s5-eth1\", \"uuid\": \"s4-eth2==s5-eth1\"}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "openflow-ryu-controller", "name": "RYU"} +[2025-01-15 15:50:25,459] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}} +[2025-01-15 15:50:25,460] DEBUG:device.service.DeviceServiceServicerImpl:ConfigureDevice reply: {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}} +[2025-01-15 15:50:25,463] DEBUG:device.service.DeviceServiceServicerImpl:ConfigureDevice request: {"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000001]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000001\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000001\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000004]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000004\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000004\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000003]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000003\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000003\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000002]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000002\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000002\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000005]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000005\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000005\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth1\", \"type\": \"copper\", \"uuid\": \"s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth2\", \"type\": \"copper\", \"uuid\": \"s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth1\", \"type\": \"copper\", \"uuid\": \"s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth2\", \"type\": \"copper\", \"uuid\": \"s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth1\", \"type\": \"copper\", \"uuid\": \"s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth2\", \"type\": \"copper\", \"uuid\": \"s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth1\", \"type\": \"copper\", \"uuid\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth4\", \"type\": \"copper\", \"uuid\": \"s2-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth2\", \"type\": \"copper\", \"uuid\": \"s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth3\", \"type\": \"copper\", \"uuid\": \"s2-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth4\", \"type\": \"copper\", \"uuid\": \"s5-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth1\", \"type\": \"copper\", \"uuid\": \"s5-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth2\", \"type\": \"copper\", \"uuid\": \"s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth3\", \"type\": \"copper\", \"uuid\": \"s5-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth2==s4-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth2\"], [\"0000000000000004\", \"s4-eth1\"]], \"name\": \"0000000000000003-s3-eth2===0000000000000004-s4-eth1\", \"uuid\": \"s3-eth2==s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth1==s3-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth1\"], [\"0000000000000003\", \"s3-eth2\"]], \"name\": \"0000000000000004-s4-eth1===0000000000000003-s3-eth2\", \"uuid\": \"s4-eth1==s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth1==s4-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth1\"], [\"0000000000000004\", \"s4-eth2\"]], \"name\": \"0000000000000005-s5-eth1===0000000000000004-s4-eth2\", \"uuid\": \"s5-eth1==s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth2==s1-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth2\"], [\"0000000000000001\", \"s1-eth2\"]], \"name\": \"0000000000000005-s5-eth2===0000000000000001-s1-eth2\", \"uuid\": \"s5-eth2==s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth2==s3-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth2\"], [\"0000000000000003\", \"s3-eth1\"]], \"name\": \"0000000000000002-s2-eth2===0000000000000003-s3-eth1\", \"uuid\": \"s2-eth2==s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth1==s1-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth1\"], [\"0000000000000001\", \"s1-eth1\"]], \"name\": \"0000000000000002-s2-eth1===0000000000000001-s1-eth1\", \"uuid\": \"s2-eth1==s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth1==s2-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth1\"], [\"0000000000000002\", \"s2-eth1\"]], \"name\": \"0000000000000001-s1-eth1===0000000000000002-s2-eth1\", \"uuid\": \"s1-eth1==s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth1==s2-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth1\"], [\"0000000000000002\", \"s2-eth2\"]], \"name\": \"0000000000000003-s3-eth1===0000000000000002-s2-eth2\", \"uuid\": \"s3-eth1==s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth2==s5-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth2\"], [\"0000000000000005\", \"s5-eth2\"]], \"name\": \"0000000000000001-s1-eth2===0000000000000005-s5-eth2\", \"uuid\": \"s1-eth2==s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth2==s5-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth2\"], [\"0000000000000005\", \"s5-eth1\"]], \"name\": \"0000000000000004-s4-eth2===0000000000000005-s5-eth1\", \"uuid\": \"s4-eth2==s5-eth1\"}"}}, {"action": "CONFIGACTION_UNDEFINED", "custom": {"resource_key": "/device[s2]/flow[h1-h3]", "resource_value": "{\"dpid\": \"0000000000000002\", \"in-port\": \"s2-eth3\", \"out-port\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_UNDEFINED", "custom": {"resource_key": "/device[s2]/flow[h3-h1]", "resource_value": "{\"dpid\": \"0000000000000002\", \"in-port\": \"s2-eth1\", \"out-port\": \"s2-eth3\"}"}}, {"action": "CONFIGACTION_UNDEFINED", "custom": {"resource_key": "/device[s1]/flow[h1-h3]", "resource_value": "{\"dpid\": \"0000000000000001\", \"in-port\": \"s1-eth1\", \"out-port\": \"s1-eth2\"}"}}, {"action": "CONFIGACTION_UNDEFINED", "custom": {"resource_key": "/device[s1]/flow[h3-h1]", "resource_value": "{\"dpid\": \"0000000000000001\", \"in-port\": \"s1-eth2\", \"out-port\": \"s1-eth1\"}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "endpoint_uuid": {"uuid": "158268b6-968b-582a-968d-da4b922ebc1c"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "43813baf-195e-5da6-af20-b3d0922e71a7"}}, "topology_uuid": {"uuid": "c76135e3-24a8-5e92-9bed-c3c9139359c8"}}}, "endpoint_location": {}, "endpoint_type": "mgmt", "kpi_sample_types": [], "name": "mgmt"}], "device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "openflow-ryu-controller", "name": "RYU"} +[2025-01-15 15:50:25,463] DEBUG:context.client.ContextClient:Creating channel to 10.152.183.206:1010... +[2025-01-15 15:50:25,464] DEBUG:context.client.ContextClient:Channel created +[2025-01-15 15:50:25,464] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}]}, "include_components": false, "include_config_rules": true, "include_endpoints": false} +[2025-01-15 15:50:25,473] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000001]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000001\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000001\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000004]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000004\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000004\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000003]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000003\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000003\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000002]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000002\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000002\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000005]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000005\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000005\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth1\", \"type\": \"copper\", \"uuid\": \"s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth2\", \"type\": \"copper\", \"uuid\": \"s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth1\", \"type\": \"copper\", \"uuid\": \"s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth2\", \"type\": \"copper\", \"uuid\": \"s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth1\", \"type\": \"copper\", \"uuid\": \"s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth2\", \"type\": \"copper\", \"uuid\": \"s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth1\", \"type\": \"copper\", \"uuid\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth4\", \"type\": \"copper\", \"uuid\": \"s2-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth2\", \"type\": \"copper\", \"uuid\": \"s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth3\", \"type\": \"copper\", \"uuid\": \"s2-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth4\", \"type\": \"copper\", \"uuid\": \"s5-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth1\", \"type\": \"copper\", \"uuid\": \"s5-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth2\", \"type\": \"copper\", \"uuid\": \"s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth3\", \"type\": \"copper\", \"uuid\": \"s5-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth2==s4-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth2\"], [\"0000000000000004\", \"s4-eth1\"]], \"name\": \"0000000000000003-s3-eth2===0000000000000004-s4-eth1\", \"uuid\": \"s3-eth2==s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth1==s3-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth1\"], [\"0000000000000003\", \"s3-eth2\"]], \"name\": \"0000000000000004-s4-eth1===0000000000000003-s3-eth2\", \"uuid\": \"s4-eth1==s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth1==s4-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth1\"], [\"0000000000000004\", \"s4-eth2\"]], \"name\": \"0000000000000005-s5-eth1===0000000000000004-s4-eth2\", \"uuid\": \"s5-eth1==s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth2==s1-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth2\"], [\"0000000000000001\", \"s1-eth2\"]], \"name\": \"0000000000000005-s5-eth2===0000000000000001-s1-eth2\", \"uuid\": \"s5-eth2==s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth2==s3-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth2\"], [\"0000000000000003\", \"s3-eth1\"]], \"name\": \"0000000000000002-s2-eth2===0000000000000003-s3-eth1\", \"uuid\": \"s2-eth2==s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth1==s1-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth1\"], [\"0000000000000001\", \"s1-eth1\"]], \"name\": \"0000000000000002-s2-eth1===0000000000000001-s1-eth1\", \"uuid\": \"s2-eth1==s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth1==s2-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth1\"], [\"0000000000000002\", \"s2-eth1\"]], \"name\": \"0000000000000001-s1-eth1===0000000000000002-s2-eth1\", \"uuid\": \"s1-eth1==s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth1==s2-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth1\"], [\"0000000000000002\", \"s2-eth2\"]], \"name\": \"0000000000000003-s3-eth1===0000000000000002-s2-eth2\", \"uuid\": \"s3-eth1==s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth2==s5-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth2\"], [\"0000000000000005\", \"s5-eth2\"]], \"name\": \"0000000000000001-s1-eth2===0000000000000005-s5-eth2\", \"uuid\": \"s1-eth2==s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth2==s5-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth2\"], [\"0000000000000005\", \"s5-eth1\"]], \"name\": \"0000000000000004-s4-eth2===0000000000000005-s5-eth1\", \"uuid\": \"s4-eth2==s5-eth1\"}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "openflow-ryu-controller", "name": "RYU"}]} +[2025-01-15 15:50:25,474] INFO:device.service.drivers.OpenFlow.OpenFlowDriver:SetConfig_resources:[('_connect/address', '10.1.7.197'), ('_connect/port', '8080'), ('_connect/settings', '{\n"timeout": 120\n}'), ('/devices/device[0000000000000001]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000001", "status": 2, "type": "packet-switch", "uuid": "0000000000000001"}'), ('/devices/device[0000000000000004]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000004", "status": 2, "type": "packet-switch", "uuid": "0000000000000004"}'), ('/devices/device[0000000000000003]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000003", "status": 2, "type": "packet-switch", "uuid": "0000000000000003"}'), ('/devices/device[0000000000000002]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000002", "status": 2, "type": "packet-switch", "uuid": "0000000000000002"}'), ('/devices/device[0000000000000005]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000005", "status": 2, "type": "packet-switch", "uuid": "0000000000000005"}'), ('/endpoints/endpoint[s1-eth1]', '{"device_uuid": "0000000000000001", "name": "s1-eth1", "type": "copper", "uuid": "s1-eth1"}'), ('/endpoints/endpoint[s1-eth2]', '{"device_uuid": "0000000000000001", "name": "s1-eth2", "type": "copper", "uuid": "s1-eth2"}'), ('/endpoints/endpoint[s4-eth1]', '{"device_uuid": "0000000000000004", "name": "s4-eth1", "type": "copper", "uuid": "s4-eth1"}'), ('/endpoints/endpoint[s4-eth2]', '{"device_uuid": "0000000000000004", "name": "s4-eth2", "type": "copper", "uuid": "s4-eth2"}'), ('/endpoints/endpoint[s3-eth1]', '{"device_uuid": "0000000000000003", "name": "s3-eth1", "type": "copper", "uuid": "s3-eth1"}'), ('/endpoints/endpoint[s3-eth2]', '{"device_uuid": "0000000000000003", "name": "s3-eth2", "type": "copper", "uuid": "s3-eth2"}'), ('/endpoints/endpoint[s2-eth1]', '{"device_uuid": "0000000000000002", "name": "s2-eth1", "type": "copper", "uuid": "s2-eth1"}'), ('/endpoints/endpoint[s2-eth4]', '{"device_uuid": "0000000000000002", "name": "s2-eth4", "type": "copper", "uuid": "s2-eth4"}'), ('/endpoints/endpoint[s2-eth2]', '{"device_uuid": "0000000000000002", "name": "s2-eth2", "type": "copper", "uuid": "s2-eth2"}'), ('/endpoints/endpoint[s2-eth3]', '{"device_uuid": "0000000000000002", "name": "s2-eth3", "type": "copper", "uuid": "s2-eth3"}'), ('/endpoints/endpoint[s5-eth4]', '{"device_uuid": "0000000000000005", "name": "s5-eth4", "type": "copper", "uuid": "s5-eth4"}'), ('/endpoints/endpoint[s5-eth1]', '{"device_uuid": "0000000000000005", "name": "s5-eth1", "type": "copper", "uuid": "s5-eth1"}'), ('/endpoints/endpoint[s5-eth2]', '{"device_uuid": "0000000000000005", "name": "s5-eth2", "type": "copper", "uuid": "s5-eth2"}'), ('/endpoints/endpoint[s5-eth3]', '{"device_uuid": "0000000000000005", "name": "s5-eth3", "type": "copper", "uuid": "s5-eth3"}'), ('/links/link[s3-eth2==s4-eth1]', '{"endpoints": [["0000000000000003", "s3-eth2"], ["0000000000000004", "s4-eth1"]], "name": "0000000000000003-s3-eth2===0000000000000004-s4-eth1", "uuid": "s3-eth2==s4-eth1"}'), ('/links/link[s4-eth1==s3-eth2]', '{"endpoints": [["0000000000000004", "s4-eth1"], ["0000000000000003", "s3-eth2"]], "name": "0000000000000004-s4-eth1===0000000000000003-s3-eth2", "uuid": "s4-eth1==s3-eth2"}'), ('/links/link[s5-eth1==s4-eth2]', '{"endpoints": [["0000000000000005", "s5-eth1"], ["0000000000000004", "s4-eth2"]], "name": "0000000000000005-s5-eth1===0000000000000004-s4-eth2", "uuid": "s5-eth1==s4-eth2"}'), ('/links/link[s5-eth2==s1-eth2]', '{"endpoints": [["0000000000000005", "s5-eth2"], ["0000000000000001", "s1-eth2"]], "name": "0000000000000005-s5-eth2===0000000000000001-s1-eth2", "uuid": "s5-eth2==s1-eth2"}'), ('/links/link[s2-eth2==s3-eth1]', '{"endpoints": [["0000000000000002", "s2-eth2"], ["0000000000000003", "s3-eth1"]], "name": "0000000000000002-s2-eth2===0000000000000003-s3-eth1", "uuid": "s2-eth2==s3-eth1"}'), ('/links/link[s2-eth1==s1-eth1]', '{"endpoints": [["0000000000000002", "s2-eth1"], ["0000000000000001", "s1-eth1"]], "name": "0000000000000002-s2-eth1===0000000000000001-s1-eth1", "uuid": "s2-eth1==s1-eth1"}'), ('/links/link[s1-eth1==s2-eth1]', '{"endpoints": [["0000000000000001", "s1-eth1"], ["0000000000000002", "s2-eth1"]], "name": "0000000000000001-s1-eth1===0000000000000002-s2-eth1", "uuid": "s1-eth1==s2-eth1"}'), ('/links/link[s3-eth1==s2-eth2]', '{"endpoints": [["0000000000000003", "s3-eth1"], ["0000000000000002", "s2-eth2"]], "name": "0000000000000003-s3-eth1===0000000000000002-s2-eth2", "uuid": "s3-eth1==s2-eth2"}'), ('/links/link[s1-eth2==s5-eth2]', '{"endpoints": [["0000000000000001", "s1-eth2"], ["0000000000000005", "s5-eth2"]], "name": "0000000000000001-s1-eth2===0000000000000005-s5-eth2", "uuid": "s1-eth2==s5-eth2"}'), ('/links/link[s4-eth2==s5-eth1]', '{"endpoints": [["0000000000000004", "s4-eth2"], ["0000000000000005", "s5-eth1"]], "name": "0000000000000004-s4-eth2===0000000000000005-s5-eth1", "uuid": "s4-eth2==s5-eth1"}')] +[2025-01-15 15:50:25,475] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000001]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000001\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000001\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000004]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000004\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000004\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000003]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000003\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000003\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000002]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000002\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000002\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000005]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000005\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000005\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth1\", \"type\": \"copper\", \"uuid\": \"s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth2\", \"type\": \"copper\", \"uuid\": \"s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth1\", \"type\": \"copper\", \"uuid\": \"s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth2\", \"type\": \"copper\", \"uuid\": \"s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth1\", \"type\": \"copper\", \"uuid\": \"s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth2\", \"type\": \"copper\", \"uuid\": \"s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth1\", \"type\": \"copper\", \"uuid\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth4\", \"type\": \"copper\", \"uuid\": \"s2-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth2\", \"type\": \"copper\", \"uuid\": \"s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth3\", \"type\": \"copper\", \"uuid\": \"s2-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth4\", \"type\": \"copper\", \"uuid\": \"s5-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth1\", \"type\": \"copper\", \"uuid\": \"s5-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth2\", \"type\": \"copper\", \"uuid\": \"s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth3\", \"type\": \"copper\", \"uuid\": \"s5-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth2==s4-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth2\"], [\"0000000000000004\", \"s4-eth1\"]], \"name\": \"0000000000000003-s3-eth2===0000000000000004-s4-eth1\", \"uuid\": \"s3-eth2==s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth1==s3-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth1\"], [\"0000000000000003\", \"s3-eth2\"]], \"name\": \"0000000000000004-s4-eth1===0000000000000003-s3-eth2\", \"uuid\": \"s4-eth1==s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth1==s4-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth1\"], [\"0000000000000004\", \"s4-eth2\"]], \"name\": \"0000000000000005-s5-eth1===0000000000000004-s4-eth2\", \"uuid\": \"s5-eth1==s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth2==s1-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth2\"], [\"0000000000000001\", \"s1-eth2\"]], \"name\": \"0000000000000005-s5-eth2===0000000000000001-s1-eth2\", \"uuid\": \"s5-eth2==s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth2==s3-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth2\"], [\"0000000000000003\", \"s3-eth1\"]], \"name\": \"0000000000000002-s2-eth2===0000000000000003-s3-eth1\", \"uuid\": \"s2-eth2==s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth1==s1-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth1\"], [\"0000000000000001\", \"s1-eth1\"]], \"name\": \"0000000000000002-s2-eth1===0000000000000001-s1-eth1\", \"uuid\": \"s2-eth1==s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth1==s2-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth1\"], [\"0000000000000002\", \"s2-eth1\"]], \"name\": \"0000000000000001-s1-eth1===0000000000000002-s2-eth1\", \"uuid\": \"s1-eth1==s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth1==s2-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth1\"], [\"0000000000000002\", \"s2-eth2\"]], \"name\": \"0000000000000003-s3-eth1===0000000000000002-s2-eth2\", \"uuid\": \"s3-eth1==s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth2==s5-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth2\"], [\"0000000000000005\", \"s5-eth2\"]], \"name\": \"0000000000000001-s1-eth2===0000000000000005-s5-eth2\", \"uuid\": \"s1-eth2==s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth2==s5-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth2\"], [\"0000000000000005\", \"s5-eth1\"]], \"name\": \"0000000000000004-s4-eth2===0000000000000005-s5-eth1\", \"uuid\": \"s4-eth2==s5-eth1\"}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "openflow-ryu-controller", "name": "RYU"} +[2025-01-15 15:50:25,504] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}} +[2025-01-15 15:50:25,505] DEBUG:device.service.DeviceServiceServicerImpl:ConfigureDevice reply: {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}} +[2025-01-15 15:50:25,508] DEBUG:device.service.DeviceServiceServicerImpl:ConfigureDevice request: {"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000001]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000001\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000001\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000004]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000004\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000004\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000003]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000003\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000003\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000002]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000002\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000002\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000005]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000005\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000005\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth1\", \"type\": \"copper\", \"uuid\": \"s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth2\", \"type\": \"copper\", \"uuid\": \"s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth1\", \"type\": \"copper\", \"uuid\": \"s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth2\", \"type\": \"copper\", \"uuid\": \"s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth1\", \"type\": \"copper\", \"uuid\": \"s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth2\", \"type\": \"copper\", \"uuid\": \"s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth1\", \"type\": \"copper\", \"uuid\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth4\", \"type\": \"copper\", \"uuid\": \"s2-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth2\", \"type\": \"copper\", \"uuid\": \"s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth3\", \"type\": \"copper\", \"uuid\": \"s2-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth4\", \"type\": \"copper\", \"uuid\": \"s5-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth1\", \"type\": \"copper\", \"uuid\": \"s5-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth2\", \"type\": \"copper\", \"uuid\": \"s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth3\", \"type\": \"copper\", \"uuid\": \"s5-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth2==s4-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth2\"], [\"0000000000000004\", \"s4-eth1\"]], \"name\": \"0000000000000003-s3-eth2===0000000000000004-s4-eth1\", \"uuid\": \"s3-eth2==s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth1==s3-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth1\"], [\"0000000000000003\", \"s3-eth2\"]], \"name\": \"0000000000000004-s4-eth1===0000000000000003-s3-eth2\", \"uuid\": \"s4-eth1==s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth1==s4-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth1\"], [\"0000000000000004\", \"s4-eth2\"]], \"name\": \"0000000000000005-s5-eth1===0000000000000004-s4-eth2\", \"uuid\": \"s5-eth1==s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth2==s1-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth2\"], [\"0000000000000001\", \"s1-eth2\"]], \"name\": \"0000000000000005-s5-eth2===0000000000000001-s1-eth2\", \"uuid\": \"s5-eth2==s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth2==s3-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth2\"], [\"0000000000000003\", \"s3-eth1\"]], \"name\": \"0000000000000002-s2-eth2===0000000000000003-s3-eth1\", \"uuid\": \"s2-eth2==s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth1==s1-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth1\"], [\"0000000000000001\", \"s1-eth1\"]], \"name\": \"0000000000000002-s2-eth1===0000000000000001-s1-eth1\", \"uuid\": \"s2-eth1==s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth1==s2-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth1\"], [\"0000000000000002\", \"s2-eth1\"]], \"name\": \"0000000000000001-s1-eth1===0000000000000002-s2-eth1\", \"uuid\": \"s1-eth1==s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth1==s2-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth1\"], [\"0000000000000002\", \"s2-eth2\"]], \"name\": \"0000000000000003-s3-eth1===0000000000000002-s2-eth2\", \"uuid\": \"s3-eth1==s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth2==s5-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth2\"], [\"0000000000000005\", \"s5-eth2\"]], \"name\": \"0000000000000001-s1-eth2===0000000000000005-s5-eth2\", \"uuid\": \"s1-eth2==s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth2==s5-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth2\"], [\"0000000000000005\", \"s5-eth1\"]], \"name\": \"0000000000000004-s4-eth2===0000000000000005-s5-eth1\", \"uuid\": \"s4-eth2==s5-eth1\"}"}}, {"action": "CONFIGACTION_UNDEFINED", "custom": {"resource_key": "/device[s2]/flow[h1-h3]", "resource_value": "{\"dpid\": \"0000000000000002\", \"in-port\": \"s2-eth3\", \"out-port\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_UNDEFINED", "custom": {"resource_key": "/device[s2]/flow[h3-h1]", "resource_value": "{\"dpid\": \"0000000000000002\", \"in-port\": \"s2-eth1\", \"out-port\": \"s2-eth3\"}"}}, {"action": "CONFIGACTION_UNDEFINED", "custom": {"resource_key": "/device[s1]/flow[h1-h3]", "resource_value": "{\"dpid\": \"0000000000000001\", \"in-port\": \"s1-eth1\", \"out-port\": \"s1-eth2\"}"}}, {"action": "CONFIGACTION_UNDEFINED", "custom": {"resource_key": "/device[s1]/flow[h3-h1]", "resource_value": "{\"dpid\": \"0000000000000001\", \"in-port\": \"s1-eth2\", \"out-port\": \"s1-eth1\"}"}}, {"action": "CONFIGACTION_UNDEFINED", "custom": {"resource_key": "/device[s5]/flow[h1-h3]", "resource_value": "{\"dpid\": \"0000000000000005\", \"in-port\": \"s5-eth2\", \"out-port\": \"s5-eth3\"}"}}, {"action": "CONFIGACTION_UNDEFINED", "custom": {"resource_key": "/device[s5]/flow[h3-h1]", "resource_value": "{\"dpid\": \"0000000000000005\", \"in-port\": \"s5-eth3\", \"out-port\": \"s5-eth2\"}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [{"endpoint_id": {"device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "endpoint_uuid": {"uuid": "158268b6-968b-582a-968d-da4b922ebc1c"}, "topology_id": {"context_id": {"context_uuid": {"uuid": "43813baf-195e-5da6-af20-b3d0922e71a7"}}, "topology_uuid": {"uuid": "c76135e3-24a8-5e92-9bed-c3c9139359c8"}}}, "endpoint_location": {}, "endpoint_type": "mgmt", "kpi_sample_types": [], "name": "mgmt"}], "device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "openflow-ryu-controller", "name": "RYU"} +[2025-01-15 15:50:25,508] DEBUG:context.client.ContextClient:Creating channel to 10.152.183.206:1010... +[2025-01-15 15:50:25,509] DEBUG:context.client.ContextClient:Channel created +[2025-01-15 15:50:25,509] DEBUG:context.client.ContextClient:SelectDevice request: {"device_ids": {"device_ids": [{"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}]}, "include_components": false, "include_config_rules": true, "include_endpoints": false} +[2025-01-15 15:50:25,519] DEBUG:context.client.ContextClient:SelectDevice result: {"devices": [{"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000001]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000001\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000001\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000004]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000004\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000004\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000003]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000003\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000003\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000002]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000002\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000002\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000005]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000005\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000005\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth1\", \"type\": \"copper\", \"uuid\": \"s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth2\", \"type\": \"copper\", \"uuid\": \"s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth1\", \"type\": \"copper\", \"uuid\": \"s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth2\", \"type\": \"copper\", \"uuid\": \"s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth1\", \"type\": \"copper\", \"uuid\": \"s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth2\", \"type\": \"copper\", \"uuid\": \"s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth1\", \"type\": \"copper\", \"uuid\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth4\", \"type\": \"copper\", \"uuid\": \"s2-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth2\", \"type\": \"copper\", \"uuid\": \"s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth3\", \"type\": \"copper\", \"uuid\": \"s2-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth4\", \"type\": \"copper\", \"uuid\": \"s5-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth1\", \"type\": \"copper\", \"uuid\": \"s5-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth2\", \"type\": \"copper\", \"uuid\": \"s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth3\", \"type\": \"copper\", \"uuid\": \"s5-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth2==s4-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth2\"], [\"0000000000000004\", \"s4-eth1\"]], \"name\": \"0000000000000003-s3-eth2===0000000000000004-s4-eth1\", \"uuid\": \"s3-eth2==s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth1==s3-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth1\"], [\"0000000000000003\", \"s3-eth2\"]], \"name\": \"0000000000000004-s4-eth1===0000000000000003-s3-eth2\", \"uuid\": \"s4-eth1==s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth1==s4-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth1\"], [\"0000000000000004\", \"s4-eth2\"]], \"name\": \"0000000000000005-s5-eth1===0000000000000004-s4-eth2\", \"uuid\": \"s5-eth1==s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth2==s1-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth2\"], [\"0000000000000001\", \"s1-eth2\"]], \"name\": \"0000000000000005-s5-eth2===0000000000000001-s1-eth2\", \"uuid\": \"s5-eth2==s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth2==s3-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth2\"], [\"0000000000000003\", \"s3-eth1\"]], \"name\": \"0000000000000002-s2-eth2===0000000000000003-s3-eth1\", \"uuid\": \"s2-eth2==s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth1==s1-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth1\"], [\"0000000000000001\", \"s1-eth1\"]], \"name\": \"0000000000000002-s2-eth1===0000000000000001-s1-eth1\", \"uuid\": \"s2-eth1==s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth1==s2-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth1\"], [\"0000000000000002\", \"s2-eth1\"]], \"name\": \"0000000000000001-s1-eth1===0000000000000002-s2-eth1\", \"uuid\": \"s1-eth1==s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth1==s2-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth1\"], [\"0000000000000002\", \"s2-eth2\"]], \"name\": \"0000000000000003-s3-eth1===0000000000000002-s2-eth2\", \"uuid\": \"s3-eth1==s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth2==s5-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth2\"], [\"0000000000000005\", \"s5-eth2\"]], \"name\": \"0000000000000001-s1-eth2===0000000000000005-s5-eth2\", \"uuid\": \"s1-eth2==s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth2==s5-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth2\"], [\"0000000000000005\", \"s5-eth1\"]], \"name\": \"0000000000000004-s4-eth2===0000000000000005-s5-eth1\", \"uuid\": \"s4-eth2==s5-eth1\"}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "openflow-ryu-controller", "name": "RYU"}]} +[2025-01-15 15:50:25,519] INFO:device.service.drivers.OpenFlow.OpenFlowDriver:SetConfig_resources:[('_connect/address', '10.1.7.197'), ('_connect/port', '8080'), ('_connect/settings', '{\n"timeout": 120\n}'), ('/devices/device[0000000000000001]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000001", "status": 2, "type": "packet-switch", "uuid": "0000000000000001"}'), ('/devices/device[0000000000000004]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000004", "status": 2, "type": "packet-switch", "uuid": "0000000000000004"}'), ('/devices/device[0000000000000003]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000003", "status": 2, "type": "packet-switch", "uuid": "0000000000000003"}'), ('/devices/device[0000000000000002]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000002", "status": 2, "type": "packet-switch", "uuid": "0000000000000002"}'), ('/devices/device[0000000000000005]', '{"drivers": "DEVICEDRIVER_RYU", "name": "0000000000000005", "status": 2, "type": "packet-switch", "uuid": "0000000000000005"}'), ('/endpoints/endpoint[s1-eth1]', '{"device_uuid": "0000000000000001", "name": "s1-eth1", "type": "copper", "uuid": "s1-eth1"}'), ('/endpoints/endpoint[s1-eth2]', '{"device_uuid": "0000000000000001", "name": "s1-eth2", "type": "copper", "uuid": "s1-eth2"}'), ('/endpoints/endpoint[s4-eth1]', '{"device_uuid": "0000000000000004", "name": "s4-eth1", "type": "copper", "uuid": "s4-eth1"}'), ('/endpoints/endpoint[s4-eth2]', '{"device_uuid": "0000000000000004", "name": "s4-eth2", "type": "copper", "uuid": "s4-eth2"}'), ('/endpoints/endpoint[s3-eth1]', '{"device_uuid": "0000000000000003", "name": "s3-eth1", "type": "copper", "uuid": "s3-eth1"}'), ('/endpoints/endpoint[s3-eth2]', '{"device_uuid": "0000000000000003", "name": "s3-eth2", "type": "copper", "uuid": "s3-eth2"}'), ('/endpoints/endpoint[s2-eth1]', '{"device_uuid": "0000000000000002", "name": "s2-eth1", "type": "copper", "uuid": "s2-eth1"}'), ('/endpoints/endpoint[s2-eth4]', '{"device_uuid": "0000000000000002", "name": "s2-eth4", "type": "copper", "uuid": "s2-eth4"}'), ('/endpoints/endpoint[s2-eth2]', '{"device_uuid": "0000000000000002", "name": "s2-eth2", "type": "copper", "uuid": "s2-eth2"}'), ('/endpoints/endpoint[s2-eth3]', '{"device_uuid": "0000000000000002", "name": "s2-eth3", "type": "copper", "uuid": "s2-eth3"}'), ('/endpoints/endpoint[s5-eth4]', '{"device_uuid": "0000000000000005", "name": "s5-eth4", "type": "copper", "uuid": "s5-eth4"}'), ('/endpoints/endpoint[s5-eth1]', '{"device_uuid": "0000000000000005", "name": "s5-eth1", "type": "copper", "uuid": "s5-eth1"}'), ('/endpoints/endpoint[s5-eth2]', '{"device_uuid": "0000000000000005", "name": "s5-eth2", "type": "copper", "uuid": "s5-eth2"}'), ('/endpoints/endpoint[s5-eth3]', '{"device_uuid": "0000000000000005", "name": "s5-eth3", "type": "copper", "uuid": "s5-eth3"}'), ('/links/link[s3-eth2==s4-eth1]', '{"endpoints": [["0000000000000003", "s3-eth2"], ["0000000000000004", "s4-eth1"]], "name": "0000000000000003-s3-eth2===0000000000000004-s4-eth1", "uuid": "s3-eth2==s4-eth1"}'), ('/links/link[s4-eth1==s3-eth2]', '{"endpoints": [["0000000000000004", "s4-eth1"], ["0000000000000003", "s3-eth2"]], "name": "0000000000000004-s4-eth1===0000000000000003-s3-eth2", "uuid": "s4-eth1==s3-eth2"}'), ('/links/link[s5-eth1==s4-eth2]', '{"endpoints": [["0000000000000005", "s5-eth1"], ["0000000000000004", "s4-eth2"]], "name": "0000000000000005-s5-eth1===0000000000000004-s4-eth2", "uuid": "s5-eth1==s4-eth2"}'), ('/links/link[s5-eth2==s1-eth2]', '{"endpoints": [["0000000000000005", "s5-eth2"], ["0000000000000001", "s1-eth2"]], "name": "0000000000000005-s5-eth2===0000000000000001-s1-eth2", "uuid": "s5-eth2==s1-eth2"}'), ('/links/link[s2-eth2==s3-eth1]', '{"endpoints": [["0000000000000002", "s2-eth2"], ["0000000000000003", "s3-eth1"]], "name": "0000000000000002-s2-eth2===0000000000000003-s3-eth1", "uuid": "s2-eth2==s3-eth1"}'), ('/links/link[s2-eth1==s1-eth1]', '{"endpoints": [["0000000000000002", "s2-eth1"], ["0000000000000001", "s1-eth1"]], "name": "0000000000000002-s2-eth1===0000000000000001-s1-eth1", "uuid": "s2-eth1==s1-eth1"}'), ('/links/link[s1-eth1==s2-eth1]', '{"endpoints": [["0000000000000001", "s1-eth1"], ["0000000000000002", "s2-eth1"]], "name": "0000000000000001-s1-eth1===0000000000000002-s2-eth1", "uuid": "s1-eth1==s2-eth1"}'), ('/links/link[s3-eth1==s2-eth2]', '{"endpoints": [["0000000000000003", "s3-eth1"], ["0000000000000002", "s2-eth2"]], "name": "0000000000000003-s3-eth1===0000000000000002-s2-eth2", "uuid": "s3-eth1==s2-eth2"}'), ('/links/link[s1-eth2==s5-eth2]', '{"endpoints": [["0000000000000001", "s1-eth2"], ["0000000000000005", "s5-eth2"]], "name": "0000000000000001-s1-eth2===0000000000000005-s5-eth2", "uuid": "s1-eth2==s5-eth2"}'), ('/links/link[s4-eth2==s5-eth1]', '{"endpoints": [["0000000000000004", "s4-eth2"], ["0000000000000005", "s5-eth1"]], "name": "0000000000000004-s4-eth2===0000000000000005-s5-eth1", "uuid": "s4-eth2==s5-eth1"}')] +[2025-01-15 15:50:25,520] DEBUG:context.client.ContextClient:SetDevice request: {"components": [], "controller_id": {}, "device_config": {"config_rules": [{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.197"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": "{\n\"timeout\": 120\n}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000001]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000001\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000001\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000004]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000004\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000004\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000003]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000003\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000003\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000002]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000002\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000002\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/devices/device[0000000000000005]", "resource_value": "{\"drivers\": \"DEVICEDRIVER_RYU\", \"name\": \"0000000000000005\", \"status\": 2, \"type\": \"packet-switch\", \"uuid\": \"0000000000000005\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth1\", \"type\": \"copper\", \"uuid\": \"s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s1-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000001\", \"name\": \"s1-eth2\", \"type\": \"copper\", \"uuid\": \"s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth1\", \"type\": \"copper\", \"uuid\": \"s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s4-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000004\", \"name\": \"s4-eth2\", \"type\": \"copper\", \"uuid\": \"s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth1\", \"type\": \"copper\", \"uuid\": \"s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s3-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000003\", \"name\": \"s3-eth2\", \"type\": \"copper\", \"uuid\": \"s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth1\", \"type\": \"copper\", \"uuid\": \"s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth4\", \"type\": \"copper\", \"uuid\": \"s2-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth2\", \"type\": \"copper\", \"uuid\": \"s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s2-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000002\", \"name\": \"s2-eth3\", \"type\": \"copper\", \"uuid\": \"s2-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth4]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth4\", \"type\": \"copper\", \"uuid\": \"s5-eth4\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth1]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth1\", \"type\": \"copper\", \"uuid\": \"s5-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth2]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth2\", \"type\": \"copper\", \"uuid\": \"s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/endpoints/endpoint[s5-eth3]", "resource_value": "{\"device_uuid\": \"0000000000000005\", \"name\": \"s5-eth3\", \"type\": \"copper\", \"uuid\": \"s5-eth3\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth2==s4-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth2\"], [\"0000000000000004\", \"s4-eth1\"]], \"name\": \"0000000000000003-s3-eth2===0000000000000004-s4-eth1\", \"uuid\": \"s3-eth2==s4-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth1==s3-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth1\"], [\"0000000000000003\", \"s3-eth2\"]], \"name\": \"0000000000000004-s4-eth1===0000000000000003-s3-eth2\", \"uuid\": \"s4-eth1==s3-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth1==s4-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth1\"], [\"0000000000000004\", \"s4-eth2\"]], \"name\": \"0000000000000005-s5-eth1===0000000000000004-s4-eth2\", \"uuid\": \"s5-eth1==s4-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s5-eth2==s1-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000005\", \"s5-eth2\"], [\"0000000000000001\", \"s1-eth2\"]], \"name\": \"0000000000000005-s5-eth2===0000000000000001-s1-eth2\", \"uuid\": \"s5-eth2==s1-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth2==s3-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth2\"], [\"0000000000000003\", \"s3-eth1\"]], \"name\": \"0000000000000002-s2-eth2===0000000000000003-s3-eth1\", \"uuid\": \"s2-eth2==s3-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s2-eth1==s1-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000002\", \"s2-eth1\"], [\"0000000000000001\", \"s1-eth1\"]], \"name\": \"0000000000000002-s2-eth1===0000000000000001-s1-eth1\", \"uuid\": \"s2-eth1==s1-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth1==s2-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth1\"], [\"0000000000000002\", \"s2-eth1\"]], \"name\": \"0000000000000001-s1-eth1===0000000000000002-s2-eth1\", \"uuid\": \"s1-eth1==s2-eth1\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s3-eth1==s2-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000003\", \"s3-eth1\"], [\"0000000000000002\", \"s2-eth2\"]], \"name\": \"0000000000000003-s3-eth1===0000000000000002-s2-eth2\", \"uuid\": \"s3-eth1==s2-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s1-eth2==s5-eth2]", "resource_value": "{\"endpoints\": [[\"0000000000000001\", \"s1-eth2\"], [\"0000000000000005\", \"s5-eth2\"]], \"name\": \"0000000000000001-s1-eth2===0000000000000005-s5-eth2\", \"uuid\": \"s1-eth2==s5-eth2\"}"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "/links/link[s4-eth2==s5-eth1]", "resource_value": "{\"endpoints\": [[\"0000000000000004\", \"s4-eth2\"], [\"0000000000000005\", \"s5-eth1\"]], \"name\": \"0000000000000004-s4-eth2===0000000000000005-s5-eth1\", \"uuid\": \"s4-eth2==s5-eth1\"}"}}]}, "device_drivers": ["DEVICEDRIVER_RYU"], "device_endpoints": [], "device_id": {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}}, "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", "device_type": "openflow-ryu-controller", "name": "RYU"} +[2025-01-15 15:50:25,549] DEBUG:context.client.ContextClient:SetDevice result: {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}} +[2025-01-15 15:50:25,549] DEBUG:device.service.DeviceServiceServicerImpl:ConfigureDevice reply: {"device_uuid": {"uuid": "b2ed9526-554d-5a79-9dc9-33e00faecef1"}} diff --git a/manifests/deviceservice.yaml b/manifests/deviceservice.yaml index 950b984420a4cb4d50a455312ecb306752a406fe..ef5195eaeb0d16d2ee5c3e5b7ba2417db461b479 100644 --- a/manifests/deviceservice.yaml +++ b/manifests/deviceservice.yaml @@ -39,7 +39,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" startupProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:2020"] diff --git a/manifests/serviceservice.yaml b/manifests/serviceservice.yaml index aa94e4269daae85872573d2dc32a5d56da89673b..72c3015b31844f7bd38e47f7be2ed2691db59adb 100644 --- a/manifests/serviceservice.yaml +++ b/manifests/serviceservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:3030"] diff --git a/my_deploy.sh b/my_deploy.sh index a048edb30b66791d5405961b41faf2443f9d51e1..59c7c0a9ad098ff14de4c26bff30e034c1796eb1 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -20,7 +20,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device pathcomp service slice nbi webui" +export TFS_COMPONENTS="context device pathcomp service webui" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" @@ -134,7 +134,7 @@ export CRDB_PASSWORD="tfs123" export CRDB_DEPLOY_MODE="single" # Disable flag for dropping database, if it exists. -export CRDB_DROP_DATABASE_IF_EXISTS="" +export CRDB_DROP_DATABASE_IF_EXISTS="YES" # Disable flag for re-deploying CockroachDB from scratch. export CRDB_REDEPLOY="" diff --git a/proto/context.proto b/proto/context.proto index 9f06d32ee04b5102ce2af511f45f8de34f984599..80281f833fe2e40f4f80b2059daaed082dd492e9 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -223,6 +223,7 @@ enum DeviceDriverEnum { DEVICEDRIVER_IETF_ACTN = 10; DEVICEDRIVER_OC = 11; DEVICEDRIVER_QKD = 12; + DEVICEDRIVER_RYU = 13; } enum DeviceOperationalStatusEnum { diff --git a/scripts/run_openflow.sh b/scripts/run_openflow.sh new file mode 100755 index 0000000000000000000000000000000000000000..2c525ca70242374ebe7c09993833cee867455167 --- /dev/null +++ b/scripts/run_openflow.sh @@ -0,0 +1,8 @@ +PROJECTDIR=`pwd` + +cd $PROJECTDIR/src +RCFILE=$PROJECTDIR/coverage/.coveragerc + +# Run unitary tests and analyze coverage of code at same time +coverage run --rcfile=$RCFILE --append -m pytest --log-level=DEBUG --verbose \ + device/tests/test_OpenFlow.py \ No newline at end of file diff --git a/src/common/DeviceTypes.py b/src/common/DeviceTypes.py index eb315352b47bbe501f66868c0181a0d34cd6cfed..b357c32be362e94634be38fe642c6b93c6a8c61f 100644 --- a/src/common/DeviceTypes.py +++ b/src/common/DeviceTypes.py @@ -49,6 +49,7 @@ class DeviceTypeEnum(Enum): XR_CONSTELLATION = 'xr-constellation' QKD_NODE = 'qkd-node' OPEN_ROADM = 'openroadm' + OPENFLOW_RYU_CONTROLLER = 'openflow-ryu-controller' # ETSI TeraFlowSDN controller TERAFLOWSDN_CONTROLLER = 'teraflowsdn' diff --git a/src/context/service/database/models/enums/DeviceDriver.py b/src/context/service/database/models/enums/DeviceDriver.py index 5342f788a7b273aa7f6ae3c5779774165cd852bc..691a7c05d7725b6d00bf40b5dd36b5e09fdbbf5d 100644 --- a/src/context/service/database/models/enums/DeviceDriver.py +++ b/src/context/service/database/models/enums/DeviceDriver.py @@ -35,6 +35,7 @@ class ORM_DeviceDriverEnum(enum.Enum): IETF_ACTN = DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN OC = DeviceDriverEnum.DEVICEDRIVER_OC QKD = DeviceDriverEnum.DEVICEDRIVER_QKD + RYU = DeviceDriverEnum.DEVICEDRIVER_RYU grpc_to_enum__device_driver = functools.partial( grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum) diff --git a/src/device/service/drivers/OpenFlow/OpenFlowDriver.py b/src/device/service/drivers/OpenFlow/OpenFlowDriver.py new file mode 100644 index 0000000000000000000000000000000000000000..070dc597d98f6dab7f2b4baab040bedbe9e83dfa --- /dev/null +++ b/src/device/service/drivers/OpenFlow/OpenFlowDriver.py @@ -0,0 +1,307 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import json +import logging, requests, threading +import resource +from requests.auth import HTTPBasicAuth +from typing import Any, Iterator, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.type_checkers.Checkers import chk_string, chk_type +from device.service.driver_api._Driver import _Driver,RESOURCE_ENDPOINTS +from device.service.drivers.OpenFlow.TfsApiClient import TfsApiClient +from device.service.drivers.OpenFlow.Tools import find_key, get_switches, get_flows , add_flow , delete_flow , get_desc,get_port_desc, get_links_information,get_switches_information,del_flow_entry +LOGGER = logging.getLogger(__name__) + +DRIVER_NAME = 'ryu' +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) + +ALL_RESOURCE_KEYS = [ + RESOURCE_ENDPOINTS, +] + +class OpenFlowDriver(_Driver): + def __init__(self, address: str, port: int, **settings) -> None: + super().__init__(DRIVER_NAME, address, port, **settings) + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + username = self.settings.get('username') + password = self.settings.get('password') + self.__auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None + scheme = self.settings.get('scheme', 'http') + self.__base_url = '{:s}://{:s}:{:d}'.format(scheme, self.address, int(self.port)) + self.__timeout = int(self.settings.get('timeout', 120)) + self.tac = TfsApiClient(self.address, int(self.port), scheme=scheme, username=username, password=password) + self.__cookie_counter = 0 + self._priority_counter = 1 + + def Connect(self) -> bool: + url = f"{self.__base_url}" + with self.__lock: + try: + response = requests.get(url, timeout=self.__timeout, verify=False, auth=self.__auth) + response.raise_for_status() + except requests.exceptions.Timeout: + LOGGER.exception(f"Timeout connecting to {self.__base_url}") + return False + except requests.exceptions.RequestException as e: + LOGGER.exception(f"Exception connecting to {self.__base_url}: {e}") + return False + else: + self.__started.set() + return True + + def Disconnect(self) -> bool: + with self.__lock: + self.__terminate.set() + return True + + @metered_subclass_method(METRICS_POOL) + def GetInitialConfig(self) -> List[Tuple[str, Any]]: + with self.__lock: + return [] + + @metered_subclass_method(METRICS_POOL) + def GetConfig(self, resource_keys: List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: + chk_type('resources', resource_keys, list) + results = [] + with self.__lock: + if len(resource_keys) == 0:resource_keys = ALL_RESOURCE_KEYS + LOGGER.info(f'resource_key:{ALL_RESOURCE_KEYS}') + for i, resource_key in enumerate(resource_keys): + str_resource_name = 'resource_key[#{:d}]'.format(i) + try: + chk_string(str_resource_name, resource_key, allow_empty=False) + if resource_key == RESOURCE_ENDPOINTS: + LOGGER.info(f'resource_key:{RESOURCE_ENDPOINTS}') + results.extend(self.tac.get_devices_endpoints()) + except Exception as e: + LOGGER.exception('Unhandled error processing resource_key({:s})'.format(str(resource_key))) + results.append((resource_key, e)) + return results + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + url = f"{self.__base_url}/stats/flowentry/add" + results = [] + LOGGER.info(f"SetConfig_resources: {resources}") + + if not resources: + return results + + with self.__lock: + for resource in resources: + try: + resource_key, resource_value = resource + + if not resource_key.startswith("/device[") or not "/flow[" in resource_key: + LOGGER.error(f"Invalid resource_key format: {resource_key}") + results.append(Exception(f"Invalid resource_key format: {resource_key}")) + continue + + try: + resource_value_dict = json.loads(resource_value) + LOGGER.info(f"resource_value_dict: {resource_value_dict}") + dpid = int(resource_value_dict["dpid"], 16) + in_port = int(resource_value_dict["in-port"].split("-")[1][3:]) + out_port = int(resource_value_dict["out-port"].split("-")[1][3:]) + self.__cookie_counter += 1 + cookie = self.__cookie_counter + ip_address_source = resource_value_dict.get("ip_address_source", "") + ip_address_destination = resource_value_dict.get("ip_address_destination", "") + mac_address_source = resource_value_dict.get("mac_address_source", "") + mac_address_destination = resource_value_dict.get("mac_address_destination", "") + + # Default priority + #priority = 1000 + + if "h1-h3" in resource_key: + priority = 65535 + match_fields = { + "in_port": in_port, + "eth_type": 0x0800, + #"ipv4_src": ip_address_source , + #"ipv4_dst": ip_address_destination, + "eth_src": mac_address_source, + "dl_dst": mac_address_destination + } + elif "h3-h1" in resource_key: + priority = 65535 + match_fields = { + "in_port": in_port, + "eth_type": 0x0800, + #"ipv4_src": ip_address_source, + #"ipv4_dst": ip_address_destination, + "eth_src": mac_address_source, + "dl_dst": mac_address_destination + } + + elif "h2-h4" in resource_key: + priority = 1500 + match_fields = { + "in_port": in_port, + "eth_type": 0x0800, + "ipv4_src": ip_address_source , + "ipv4_dst": ip_address_destination, + "eth_src": mac_address_source, + "eth_dst": mac_address_destination + } + elif "h4-h2" in resource_key: + priority = 1500 + match_fields = { + "in_port": in_port, + "eth_type": 0x0800, + "ipv4_src": ip_address_source, + "ipv4_dst": ip_address_destination, + "eth_src": mac_address_source, + "eth_dst": mac_address_destination + } + + except (KeyError, ValueError, IndexError) as e: + LOGGER.error(f"Invalid resource_value: {resource_value}, error: {e}") + results.append(Exception(f"Invalid resource_value: {resource_value}")) + continue + + LOGGER.debug(f"Flow match fields: {match_fields}") + + flow_entry = { + "dpid": dpid, + #cookie": 0, + "priority": priority, + "match": match_fields, + "instructions": [ + { + "type": "APPLY_ACTIONS", + "actions": [ + { + "max_len": 65535, + "type": "OUTPUT", + "port": out_port + }]}]} + + flow_entry_arp_foraward = { + "dpid": dpid, + "priority": 65535, + "match": { + "eth_dst": "ff:ff:ff:ff:ff:ff", + "eth_type": 0x0806 + }, + "instructions": [ + { + "type": "APPLY_ACTIONS", + "actions": [ + { + "type": "OUTPUT", + "port": "0xfffffffb" + } + ]}]} + flow_entry_arp_reply = { + "dpid": dpid, + "priority": 65535, + "match": { + "eth_type": 0x0806, + "arp_op": 2 + }, + "instructions": [ + { + "type": "APPLY_ACTIONS", + "actions": [ + { + "type": "OUTPUT", + "port": "0xfffffffb" + } + ]}]} + + try: + response = requests.post(url, json=flow_entry_arp_foraward, timeout=self.__timeout, verify=False, auth=self.__auth) + response = requests.post(url, json=flow_entry_arp_reply, timeout=self.__timeout, verify=False, auth=self.__auth) + response = requests.post(url, json=flow_entry, timeout=self.__timeout, verify=False, auth=self.__auth) + response.raise_for_status() + results.append(True) + LOGGER.info(f"Successfully posted flow entry: {flow_entry}") + except requests.exceptions.Timeout: + LOGGER.error(f"Timeout connecting to {url}") + results.append(Exception(f"Timeout connecting to {url}")) + except requests.exceptions.RequestException as e: + LOGGER.error(f"Error posting flow entry {flow_entry} to {url}: {e}") + results.append(e) + except Exception as e: + LOGGER.error(f"Error processing resource {resource_key}: {e}", exc_info=True) + results.append(e) + return results + + + + #@metered_subclass_method(METRICS_POOL) + #def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + # LOGGER.info(f"DeleteConfig123_resources: {resources}") + # url = f"{self.__base_url}/stats/flowentry/delete_strict" + # results = [] + # if not resources: + # return results + # with self.__lock: + # for resource in resources: + # try: + # resource_key, resource_value = resource + # if not resource_key.startswith("/device[") or not "/flow[" in resource_key: + # LOGGER.error(f"Invalid resource_key format: {resource_key}") + # results.append(Exception(f"Invalid resource_key format: {resource_key}")) + # continue + # try: + # resource_value_dict = json.loads(resource_value) + # dpid = int(resource_value_dict["dpid"], 16) + # in_port = int(resource_value_dict["in-port"].split("-")[1][3:]) + # out_port = int(resource_value_dict["out-port"].split("-")[1][3:]) + # except (KeyError, ValueError, IndexError) as e: + # LOGGER.error(f"Invalid resource_value: {resource_value}, error: {e}") + # results.append(Exception(f"Invalid resource_value: {resource_value}")) + # continue + # flow_entry = { + # "dpid": dpid, + # "table_id": 0, + # "priority": 11111, + # "match": {"in_port": in_port}, + # } + # try: + # response = requests.post(url, json=flow_entry, timeout=self.__timeout, verify=False, auth=self.__auth) + # response.raise_for_status() + # results.append(True) + # LOGGER.info(f"Successfully posted flow entry: {flow_entry}") + # except requests.exceptions.Timeout: + # LOGGER.error(f"Timeout connecting to {url}") + # results.append(Exception(f"Timeout connecting to {url}")) + # except requests.exceptions.RequestException as e: + # LOGGER.error(f"Error posting flow entry {flow_entry} to {url}: {e}") + # results.append(e) + # except Exception as e: + # LOGGER.error(f"Error processing resource {resource_key}: {e}", exc_info=True) + # results.append(e) + # return results +# +# +## @metered_subclass_method(METRICS_POOL) +## def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: +## # TODO: TAPI does not support monitoring by now +# return [False for _ in subscriptions] +# +# @metered_subclass_method(METRICS_POOL) +# def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: +# # TODO: TAPI does not support monitoring by now +# return [False for _ in subscriptions] +# +# def GetState( +# self, blocking=False, terminate : Optional[threading.Event] = None +# ) -> Iterator[Tuple[float, str, Any]]: +# # TODO: TAPI does not support monitoring by now +# return [] diff --git a/src/device/service/drivers/OpenFlow/TfsApiClient.py b/src/device/service/drivers/OpenFlow/TfsApiClient.py new file mode 100644 index 0000000000000000000000000000000000000000..bc95fe9ff7758ca295f79f25590ce89d7af4099f --- /dev/null +++ b/src/device/service/drivers/OpenFlow/TfsApiClient.py @@ -0,0 +1,149 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging, requests +from os import name +from requests.auth import HTTPBasicAuth +from typing import Dict, List, Optional + + +GET_DEVICES_URL = '{:s}://{:s}:{:d}/v1.0/topology/switches' +GET_LINKS_URL = '{:s}://{:s}:{:d}/v1.0/topology/links' +TIMEOUT = 30 + +HTTP_OK_CODES = { + 200, # OK + 201, # Created + 202, # Accepted + 204, # No Content +} + +MAPPING_STATUS = { + 'DEVICEOPERATIONALSTATUS_UNDEFINED': 0, + 'DEVICEOPERATIONALSTATUS_DISABLED' : 1, + 'DEVICEOPERATIONALSTATUS_ENABLED' : 2, +} + +MAPPING_DRIVER = { + 'DEVICEDRIVER_UNDEFINED' : 0, + 'DEVICEDRIVER_OPENCONFIG' : 1, + 'DEVICEDRIVER_TRANSPORT_API' : 2, + 'DEVICEDRIVER_P4' : 3, + 'DEVICEDRIVER_IETF_NETWORK_TOPOLOGY': 4, + 'DEVICEDRIVER_ONF_TR_532' : 5, + 'DEVICEDRIVER_XR' : 6, + 'DEVICEDRIVER_IETF_L2VPN' : 7, + 'DEVICEDRIVER_GNMI_OPENCONFIG' : 8, + 'DEVICEDRIVER_OPTICAL_TFS' : 9, + 'DEVICEDRIVER_IETF_ACTN' : 10, + 'DEVICEDRIVER_OC' : 11, + 'DEVICEDRIVER_QKD' : 12, + 'DEVICEDRIVER_RYU' : 13, +} + +MSG_ERROR = 'Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}' + +LOGGER = logging.getLogger(__name__) + +class TfsApiClient: + def __init__( + self, address : str, port : int, scheme : str = 'http', + username : Optional[str] = None, password : Optional[str] = None + ) -> None: + self._devices_url = GET_DEVICES_URL.format(scheme, address, port) + LOGGER.info(f'self_devices_url{self._devices_url}') + self._links_url = GET_LINKS_URL.format(scheme, address, port) + self._auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None + + def get_devices_endpoints(self) -> List[Dict]: + LOGGER.debug('[get_devices_endpoints] begin') + + reply_switches = requests.get(self._devices_url, timeout=TIMEOUT, verify=False, auth=self._auth) + if reply_switches.status_code not in HTTP_OK_CODES: + msg = MSG_ERROR.format(str(self._devices_url), str(reply_switches.status_code), str(reply_switches)) + LOGGER.error(msg) + raise Exception(msg) + + json_reply_switches = reply_switches.json() + LOGGER.info('[get_devices_endpoints] json_reply_switches={:s}'.format(json.dumps(json_reply_switches))) + + result = list() + for json_switch in json_reply_switches: + device_uuid: str = json_switch['dpid'] + device_ports = json_switch.get('ports', []) + + for port in device_ports: + port_name = port.get('name', '') + device_name = port_name.split('-')[0] + port_no = port.get('port_no', '') + hw_address = port.get('hw_addr', '') + + device_url = '/devices/device[{:s}]'.format(device_uuid) + device_data = { + 'uuid': device_uuid, + 'name': device_uuid, + 'type': 'packet-switch', + 'status': 2, + 'drivers': 'DEVICEDRIVER_RYU', + } + result.append((device_url, device_data)) + for json_switch in json_reply_switches: + device_uuid: str = json_switch['dpid'] + device_ports = json_switch.get('ports', []) + for port in device_ports: + port_name = port.get('name', '') + port_no = port.get('port_no','') + + endpoint_uuid = port_name + endpoint_url = '/endpoints/endpoint[{:s}]'.format(endpoint_uuid) + endpoint_data = { + 'device_uuid': device_uuid, + 'uuid': port_name, + 'name': port_name, + 'type': 'copper', + } + result.append((endpoint_url, endpoint_data)) +# + reply = requests.get(self._links_url, timeout=TIMEOUT, verify=False, auth=self._auth) + if reply.status_code not in HTTP_OK_CODES: + msg = MSG_ERROR.format(str(self._links_url), str(reply.status_code), str(reply)) + LOGGER.error(msg) + raise Exception(msg) + + for json_link in reply.json(): + dpid_src = json_link.get('src', {}).get('dpid', '') + dpid_dst = json_link.get('dst', {}).get('dpid', '') + port_src_name = json_link.get('src', {}).get('name', '') + port_name_secondpart = port_src_name.split('-')[1] + port_dst_name = json_link.get('dst', {}).get('name', '') + port_name_second = port_dst_name.split('-')[1] + switch_name_src = port_src_name.split('-')[0] + switch_name_dest = port_dst_name.split('-')[0] + link_name = f"{dpid_src}-{port_src_name}==={dpid_dst}-{port_dst_name}" + link_uuid = f"{port_src_name}=={port_dst_name}" + link_endpoint_ids = [ + (dpid_src,port_src_name), + (dpid_dst,port_dst_name) ] + + LOGGER.info(f'link_endpoint_ids are {link_endpoint_ids}') + link_url = '/links/link[{:s}]'.format(link_uuid) + link_data = { + 'uuid': link_uuid, + 'name': link_name, + 'endpoints': link_endpoint_ids, + } + result.append((link_url, link_data)) +# + LOGGER.debug('[get_devices_endpoints] topology; returning') + return result diff --git a/src/device/service/drivers/OpenFlow/Tools.py b/src/device/service/drivers/OpenFlow/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..e68a47f3a72820b58c9c70efcfc66788e9bdc424 --- /dev/null +++ b/src/device/service/drivers/OpenFlow/Tools.py @@ -0,0 +1,171 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging, operator, requests +from requests.auth import HTTPBasicAuth +from typing import Optional +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_SERVICES +from typing import List, Dict, Optional, Tuple, Union + +LOGGER = logging.getLogger(__name__) + +RESOURCE_ENDPOINTS = { + #get configurations + "switches": "/stats/switches", + "description": "/stats/desc", + "flows": "/stats/flow", + "port_description":"/stats/portdesc", + "switch_info":"/v1.0/topology/switches", + "links_info":"/v1.0/topology/links", + #add flow + "flow_add": "/stats/flowentry/add", + #Delete all matching flow entries of the switch. + "flow_delete": "/stats/flowentry/delete", + "flowentry_delete":"/stats/flowentry/clear", #according to dpid + +} + +HTTP_OK_CODES = { + 200, # OK + 201, # Created + 202, # Accepted + 204, # No Content +} + +# Utility function to find and extract a specific key from a resource. +def find_key(resource: Tuple[str, str], key: str) -> Union[dict, str, None]: + try: + return json.loads(resource[1])[key] + except KeyError: + LOGGER.warning(f"Key '{key}' not found in resource.") + return None + +def get_switches(root_url: str, auth: Optional[HTTPBasicAuth] = None, timeout: Optional[int] = None) -> List[Dict]: + url = f"{root_url}{RESOURCE_ENDPOINTS['switches']}" + result = [] + try: + response = requests.get(url, timeout=timeout, verify=False, auth=auth) + response.raise_for_status() + switches = response.json() + LOGGER.info(f"Successfully retrieved switches: {switches}") + result = switches + except requests.exceptions.Timeout: + LOGGER.exception(f"Timeout connecting to {url}") + except requests.exceptions.RequestException as e: + LOGGER.exception(f"Error retrieving switches: {str(e)}") + return result + +def get_switches_information(root_url: str, auth: Optional[HTTPBasicAuth] = None, timeout: Optional[int] = None) -> List[Dict]: + url = f"{root_url}{RESOURCE_ENDPOINTS['switch_info']}" + result = [] + try: + response = requests.get(url, timeout=timeout, verify=False, auth=auth) + response.raise_for_status() + switches_info = response.json() + LOGGER.info(f"Successfully retrieved switches: {switches_info}") + result = switches_info + except requests.exceptions.Timeout: + LOGGER.exception(f"Timeout connecting to {url}") + except requests.exceptions.RequestException as e: + LOGGER.exception(f"Error retrieving switches: {str(e)}") + return result + +def get_links_information(root_url: str, auth: Optional[HTTPBasicAuth] = None, timeout: Optional[int] = None) -> List[Dict]: + url = f"{root_url}{RESOURCE_ENDPOINTS['links_info']}" + result = [] + try: + response = requests.get(url, timeout=timeout, verify=False, auth=auth) + response.raise_for_status() + links_info = response.json() + LOGGER.info(f"Successfully retrieved switches: {links_info}") + result = links_info + except requests.exceptions.Timeout: + LOGGER.exception(f"Timeout connecting to {url}") + except requests.exceptions.RequestException as e: + LOGGER.exception(f"Error retrieving switches: {str(e)}") + return result + +def get_flows(root_url: str, dpid: str, auth: Optional[HTTPBasicAuth] = None, timeout: Optional[int] = None) -> List[Dict]: + url = f"{root_url}{RESOURCE_ENDPOINTS['flows']}/{dpid}" + try: + response = requests.get(url, timeout=timeout, verify=False, auth=auth) + response.raise_for_status() + flows = response.json() + LOGGER.info(f"Successfully retrieved flow rules for DPID {dpid}") + return flows + except requests.exceptions.RequestException as e: + LOGGER.error(f"Failed to retrieve flow rules for DPID {dpid}: {str(e)}") + return [] + +#get description +def get_desc(root_url: str, dpid: str, auth: Optional[HTTPBasicAuth] = None, timeout: Optional[int] = None) -> Dict: + url = f"{root_url}{RESOURCE_ENDPOINTS['description']}/{dpid}" + try: + response = requests.get(url, timeout=timeout, verify=False, auth=auth) + response.raise_for_status() + desc = response.json() + LOGGER.info(f"Successfully retrieved description for DPID {dpid}: {desc}") + return desc + except requests.exceptions.RequestException as e: + LOGGER.error(f"Failed to retrieve description for DPID {dpid}: {str(e)}") + return {} + +def get_port_desc(root_url: str, dpid: str, auth: Optional[HTTPBasicAuth] = None, timeout: Optional[int] = None) -> Dict: + url = f"{root_url}{RESOURCE_ENDPOINTS['port_description']}/{dpid}" + try: + response = requests.get(url, timeout=timeout, verify=False, auth=auth) + response.raise_for_status() + port_desc = response.json() + LOGGER.info(f"Successfully retrieved description for DPID {dpid}: {port_desc}") + return port_desc + except requests.exceptions.RequestException as e: + LOGGER.error(f"Failed to retrieve description for DPID {dpid}: {str(e)}") + return {} + +##according to dpid +def del_flow_entry(root_url: str, dpid: str, auth: Optional[HTTPBasicAuth] = None, timeout: Optional[int] = None) -> Dict: + url = f"{root_url}{RESOURCE_ENDPOINTS['flowentry_delete']}/{dpid}" + try: + response = requests.delete(url, timeout=timeout, verify=False, auth=auth) + response.raise_for_status() + flow_desc = response.json() + LOGGER.info(f"Successfully retrieved description for DPID {dpid}: {flow_desc}") + return flow_desc + except requests.exceptions.RequestException as e: + LOGGER.error(f"Failed to retrieve description for DPID {dpid}: {str(e)}") + return {} + +# to delete a flow based on match criteria. +def delete_flow(root_url: str, flow_data: dict, auth: Optional[HTTPBasicAuth] = None, timeout: Optional[int] = None) -> bool: + url = f"{root_url}{RESOURCE_ENDPOINTS['flow_delete']}" + try: + response = requests.post(url, json=flow_data, timeout=timeout, verify=False, auth=auth) + response.raise_for_status() + LOGGER.info(f"Flow configuration deleted successfully for DPID {flow_data.get('dpid')}.") + return True + except requests.exceptions.RequestException as e: + LOGGER.error(f"Failed to delete flow configuration for DPID {flow_data.get('dpid')}: {str(e)}") + return False + +def add_flow(root_url: str, flow_data: dict, auth: Optional[HTTPBasicAuth] = None, timeout: Optional[int] = None) -> bool: + url = f"{root_url}{RESOURCE_ENDPOINTS['flow_add']}" + LOGGER.info(f"Posting flow data: {flow_data} (type: {type(flow_data)}) to URL: {url}") + try: + response = requests.post(url, json=flow_data, timeout=timeout, verify=False, auth=auth) + response.raise_for_status() + LOGGER.info("Flow configuration added successfully.") + return True + except requests.exceptions.RequestException as e: + LOGGER.error(f"Failed to add flow configuration: {str(e)}") + return False + + + diff --git a/src/device/service/drivers/OpenFlow/__init__.py b/src/device/service/drivers/OpenFlow/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4f3d1a042c69720452803e994c38f7c2e966c684 --- /dev/null +++ b/src/device/service/drivers/OpenFlow/__init__.py @@ -0,0 +1,20 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_SERVICES + +ALL_RESOURCE_KEYS = [ + RESOURCE_ENDPOINTS, + RESOURCE_SERVICES, +] diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index b99ee50ca8319ab96f9062a3c58c356fa2ae7ec7..62942cd88ba54f1753837e0dd675ab9615f2e48b 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -143,6 +143,16 @@ if LOAD_ALL_DEVICE_DRIVERS: FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY, } ])) +if LOAD_ALL_DEVICE_DRIVERS: + from.OpenFlow.OpenFlowDriver import OpenFlowDriver + DRIVERS.append( + (OpenFlowDriver, [ + { + FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.OPENFLOW_RYU_CONTROLLER , + FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_RYU , + } + ]) + ) if LOAD_ALL_DEVICE_DRIVERS: from .xr.XrDriver import XrDriver # pylint: disable=wrong-import-position diff --git a/src/device/tests/test_OpenFlow.py b/src/device/tests/test_OpenFlow.py new file mode 100644 index 0000000000000000000000000000000000000000..c1d3919eafea68633a3ad9ab145a40cebd25df06 --- /dev/null +++ b/src/device/tests/test_OpenFlow.py @@ -0,0 +1,85 @@ +import json +from re import A +import resource +import logging, os, sys, time + +from joblib import Logger +#from typing import Dict, Self, Tuple +os.environ['DEVICE_EMULATED_ONLY'] = 'YES' +from device.service.drivers.OpenFlow.OpenFlowDriver import OpenFlowDriver +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + + +def test_main(): + driver_settings = { + 'protocol': 'http', + 'username': None, + 'password': None, + 'use_tls': False, + } + driver = OpenFlowDriver('127.0.0.1', 8080 , **driver_settings) + driver.Connect() + + import requests + + response = requests.get("http://127.0.0.1:8080/v1.0/topology/switches", timeout=10) + LOGGER.info(f'the response is{response}') + + + + # Test: GetConfig + #resource_keys = [ 'flows:1','description:1','switches','port_description:1','switch_info','links_info'] + # config = driver.GetConfig(resource_keys ) + # LOGGER.info('Specific configuration: %s', config) + + #resource_delete=["flowentry_delete:1"] + #config = driver.DeleteConfig(resource_delete) + #LOGGER.info('Specific configuration: %s', config) + #a=driver.GetConfig(["flows:1"]) + #LOGGER.info('flow 1 = {:s}'.format(str(a))) +# delete_data = { +# "dpid": 2, +# "cookie": 1, +# "cookie_mask": 1, +# "table_id": 0, +# "idle_timeout": 30, +# "hard_timeout": 30, +# "priority": 11111, +# "flags": 1, +# "match":{ +# "in_port":2 +# }, +# "actions":[ +# { +# "type":"ddf", +# "port": 1 +# } +# ] +# } +# delete_result = driver.DeleteConfig([("flow_data", delete_data)]) +# LOGGER.info('resources_to_delete = {:s}'.format(str(delete_result))) +# a=driver.GetConfig(["flows:1"]) +# LOGGER.info('flow 2 = {:s}'.format(str(a))) +# flow_data = { +# "dpid": 2, +# "priority": 22224, +# "match": { +# "in_port": 1 +# }, +# "actions": [ +# { +# "type": "GOTO_TABLE", +# "table_id": 1 +# } +# ] +# } +# set_result = driver.SetConfig([('flow_data',flow_data)]) +# LOGGER.info(set_result) +# driver.Disconnect() +# + raise Exception () + +if __name__ == '__main__': + sys.exit(test_main()) diff --git a/src/service/service/service_handler_api/FilterFields.py b/src/service/service/service_handler_api/FilterFields.py index 78f084605bcd759825975cb7f11abc659506755b..6cd9f3bc40955f9300b1b48dc292b0c7ec1de953 100644 --- a/src/service/service/service_handler_api/FilterFields.py +++ b/src/service/service/service_handler_api/FilterFields.py @@ -44,6 +44,7 @@ DEVICE_DRIVER_VALUES = { DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN, DeviceDriverEnum.DEVICEDRIVER_OC, DeviceDriverEnum.DEVICEDRIVER_QKD, + DeviceDriverEnum.DEVICEDRIVER_RYU, } # Map allowed filter fields to allowed values per Filter field. If no restriction (free text) None is specified diff --git a/src/service/service/service_handler_api/ServiceHandlerFactory.py b/src/service/service/service_handler_api/ServiceHandlerFactory.py index e692a9e773c9c54c843b2fe1ed7ed3d7b1158802..5ced40233949c3eca5352730a00183d1e42bd15c 100644 --- a/src/service/service/service_handler_api/ServiceHandlerFactory.py +++ b/src/service/service/service_handler_api/ServiceHandlerFactory.py @@ -11,7 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - import logging, operator from enum import Enum from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Set, Tuple @@ -26,7 +25,6 @@ if TYPE_CHECKING: from service.service.service_handler_api._ServiceHandler import _ServiceHandler LOGGER = logging.getLogger(__name__) - class ServiceHandlerFactory: def __init__(self, service_handlers : List[Tuple[type, List[Dict[FilterFieldEnum, Any]]]]) -> None: # Dict{field_name => Dict{field_value => Set{ServiceHandler}}} @@ -41,7 +39,6 @@ class ServiceHandlerFactory: from service.service.service_handler_api._ServiceHandler import _ServiceHandler if not issubclass(service_handler_class, _ServiceHandler): raise UnsupportedServiceHandlerClassException(str(service_handler_class)) - service_handler_name = service_handler_class.__name__ supported_filter_fields = set(FILTER_FIELD_ALLOWED_VALUES.keys()) unsupported_filter_fields = set(filter_fields.keys()).difference(supported_filter_fields) @@ -80,6 +77,9 @@ class ServiceHandlerFactory: field_enum_values = FILTER_FIELD_ALLOWED_VALUES.get(field_name) field_candidate_service_handler_classes = set() + #LOGGER.debug(f"Filter fields: {filter_fields}") + #LOGGER.debug(f"Field indices: {self.__indices}") + #LOGGER.debug(f"Candidate handlers after each field: {candidate_service_handler_classes}") for field_value in field_values: if field_enum_values is not None and field_value not in field_enum_values: raise UnsupportedFilterFieldValueException(field_name, field_value, field_enum_values) diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index f93cf011fe02139ae350b91eab52eb71ded0574d..0be5fb6d7f3a5880b8925c4a5c32093065cbd368 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -28,6 +28,7 @@ from .tapi_xr.TapiXrServiceHandler import TapiXrServiceHandler from .e2e_orch.E2EOrchestratorServiceHandler import E2EOrchestratorServiceHandler from .oc.OCServiceHandler import OCServiceHandler from .qkd.qkd_service_handler import QKDServiceHandler +from .l3nm_ryu.L3NMryuServiceHandler import RYUServiceHandler SERVICE_HANDLERS = [ (L2NMEmulatedServiceHandler, [ @@ -113,5 +114,12 @@ SERVICE_HANDLERS = [ FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_QKD, FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_QKD], } + ]), + + (RYUServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L3NM, + FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_RYU], + } ]) ] diff --git a/src/service/service/service_handlers/l3nm_ryu/L3NMryuServiceHandler.py b/src/service/service/service_handlers/l3nm_ryu/L3NMryuServiceHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..493ddd60ebf241f551a5a887b983ecaa417f15b8 --- /dev/null +++ b/src/service/service/service_handlers/l3nm_ryu/L3NMryuServiceHandler.py @@ -0,0 +1,221 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging, netaddr +from venv import logger +from re import L +from typing import Any, Dict, List, Optional, Tuple, Union + +from py import log +from pytest import skip +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.proto.context_pb2 import ConfigRule, Device, DeviceId, EndPoint, Service,ConfigRule_Custom,ConfigActionEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set +from common.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_type +#from nbi.service.rest_server.nbi_plugins.ietf_network.bindings.networks.network.link import destination +from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.task_scheduler.TaskExecutor import TaskExecutor +import requests +import re + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'l3nm_ryu'}) + +class RYUServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings + ) -> None: + self.__service = service + self.__task_executor = task_executor + self.__settings_handler = SettingsHandler(service.service_config, **settings) + + + def _get_endpoint_details( + self, endpoint : Tuple[str, str, Optional[str]] + ) -> Tuple[Device, EndPoint]: #Dict]: + device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) + #LOGGER.debug('device_uuid = {:s}'.format(str(device_uuid))) + #LOGGER.debug('endpoint_uuid = {:s}'.format(str(endpoint_uuid))) + device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + #LOGGER.debug('device_obj = {:s}'.format(str(grpc_message_to_json_string(device_obj)))) + endpoint_obj = get_endpoint_matching(device_obj, endpoint_uuid) + #LOGGER.debug('endpoint_obj = {:s}'.format(str(grpc_message_to_json_string(endpoint_obj)))) + #endpoint_settings = self.__settings_handler.get_endpoint_settings(device_obj, endpoint_obj) + #LOGGER.debug('endpoint_settings = {:s}'.format(str(endpoint_settings))) + device_name = device_obj.name + #LOGGER.debug('device_name = {:s}'.format(str(device_name))) + endpoint_name = endpoint_obj.name + #LOGGER.debug('endpoint_name = {:s}'.format(str(endpoint_name))) + #if endpoint_settings is None: + # MSG = 'Settings not found for Endpoint(device=[uuid={:s}, name={:s}], endpoint=[uuid={:s}, name={:s}])' + # raise Exception(MSG.format(device_uuid, device_name, endpoint_uuid, endpoint_name)) + #endpoint_settings_dict : Dict = endpoint_settings.value + #LOGGER.debug('endpoint_settings_dict = {:s}'.format(str(endpoint_settings_dict))) + return device_obj, endpoint_obj #endpoint_settings_dict + + + @metered_subclass_method(METRICS_POOL) + def SetEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + LOGGER.debug('endpoints = {:s}'.format(str(endpoints))) + chk_type('endpoints', endpoints, list) + if len(endpoints) < 2: + LOGGER.warning('nothing done: not enough endpoints') + return [] + service_uuid = self.__service.service_id.service_uuid.uuid + service_name= self.__service.name + service_configuration_rules=self.__service.service_config.config_rules + LOGGER.debug('service_configuration_rules = {:s}'.format(str(service_configuration_rules))) + ip_addresses = [] + mac_addresses = [] + for rule in service_configuration_rules: + try: + custom_field = rule.custom + resource_value_str = custom_field.resource_value + resource_value = json.loads(resource_value_str) + ip_address = resource_value.get("address_ip") + mac_address = resource_value.get("mac_address") + ip_addresses.append(ip_address) + mac_addresses.append(mac_address) + except Exception as e: + print(f"Error parsing rule: {e}, Rule: {rule}") + LOGGER.debug('ip_address = {:s}'.format(str(ip_addresses))) + LOGGER.debug('mac_address = {:s}'.format(str(mac_addresses))) + LOGGER.debug('service_name = {:s}'.format(str(service_name))) + #LOGGER.debug('service_uuid = {:s}'.format(str(service_uuid))) + #LOGGER.debug('self.__settings_handler = {:s}'.format(str(self.__settings_handler.dump_config_rules()))) + results = [] + try: + src_device, src_endpoint, = self._get_endpoint_details(endpoints[0]) + dst_device, dst_endpoint, = self._get_endpoint_details(endpoints[-1]) + src_controller = self.__task_executor.get_device_controller(src_device) + #LOGGER.debug(f"Source controller: {src_controller.device_config.config_rules}") + del src_controller.device_config.config_rules[:] + + for index in range(len(endpoints) - 1): + current_device, current_endpoint = self._get_endpoint_details(endpoints[index]) + #LOGGER.debug(f"Current device: {current_device.name}, Current endpoint: {current_endpoint.name}") + next_device, next_endpoint = self._get_endpoint_details(endpoints[index + 1]) + #LOGGER.debug(f"Next device: {next_device.name}, Next endpoint: {next_endpoint.name}") + if current_device.name == next_device.name: + in_port_forward = current_endpoint.name + out_port_forward = next_endpoint.name + flow_split = service_name.split('-') + dpid_src = int(current_device.name) + LOGGER.debug(f"DPID source: {dpid_src}") + dpid_dst = int(next_device.name) + LOGGER.debug(f"DPID destination: {dpid_dst}") + flow_rule_forward = f"{flow_split[0]}-{flow_split[2]}" + flow_rule_reverse = f"{flow_split[2]}-{flow_split[0]}" + ip_address_source = ip_addresses[0] + ip_address_destination = ip_addresses[1] + mac_address_source = mac_addresses[0] + mac_address_destination = mac_addresses[1] + forward_resource_value = ({"dpid": current_device.name, + "in-port": in_port_forward, + "out-port": out_port_forward, + "ip_address_source": ip_address_source, + "ip_address_destination": ip_address_destination, + "mac_address_source": mac_address_source, + "mac_address_destination": mac_address_destination + }) + forward_rule = json_config_rule_set ( + resource_key=f"/device[{current_endpoint.name.split('-')[0]}]/flow[{flow_rule_forward}]", + resource_value=forward_resource_value + ) + LOGGER.debug(f"Forward configuration rule: {forward_rule}") + src_controller.device_config.config_rules.append(ConfigRule(**forward_rule)) + in_port_reverse = next_endpoint.name + out_port_reverse = current_endpoint.name + reverse_resource_value = { + "dpid": current_device.name, + "in-port": in_port_reverse, + "out-port": out_port_reverse, + "ip_address_source": ip_address_destination, + "ip_address_destination": ip_address_source, + "mac_address_source": mac_address_destination, + "mac_address_destination": mac_address_source + } + reverse_rule = json_config_rule_set( + resource_key=f"/device[{current_endpoint.name.split('-')[0]}]/flow[{flow_rule_reverse}]", + resource_value=reverse_resource_value + ) + LOGGER.debug(f"Reverse configuration rule: {reverse_rule}") + src_controller.device_config.config_rules.append(ConfigRule(**reverse_rule)) + self.__task_executor.configure_device(src_controller) + results.append(True) + def get_config_rules(controller): + try: + config_rules = controller.device_config.config_rules + + for rule in config_rules: + if rule.HasField("custom"): + resource_key = rule.custom.resource_key + resource_value = rule.custom.resource_value + LOGGER.debug(f"Resource key in config: {resource_key}, Resource value in config: {resource_value}") + except Exception as e: + print(f"Error accessing config rules: {e}") + get_config_rules(src_controller) + LOGGER.debug(f"Configuration rules: {src_controller.device_config.config_rules}") + return results + + except Exception as e: + LOGGER.error(f"Error in SetEndpoint: {e}") + return [e] + + @metered_subclass_method(METRICS_POOL) + def DeleteEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + LOGGER.debug('endpoints = {:s}'.format(str(endpoints))) + chk_type('endpoints', endpoints, list) + if len(endpoints) < 2: return [] + service_uuid = self.__service.service_id.service_uuid.uuid + service_name= self.__service.name + results = [] + try: + src_device_uuid, _ = get_device_endpoint_uuids(endpoints[0]) + src_device = self.__task_executor.get_device(DeviceId(**json_device_id(src_device_uuid))) + src_controller = self.__task_executor.get_device_controller(src_device) + + dst_device_uuid, _ = get_device_endpoint_uuids(endpoints[1]) + dst_device = self.__task_executor.get_device(DeviceId(**json_device_id(dst_device_uuid))) + dst_controller = self.__task_executor.get_device_controller(dst_device) + + if src_controller.device_id.device_uuid.uuid != dst_controller.device_id.device_uuid.uuid: + raise Exception('Different Src-Dst devices not supported by now') + controller = src_controller + + json_config_rule = json_config_rule_delete('/services/service[{:s}]'.format(service_uuid), { + 'uuid': service_uuid + }) + del controller.device_config.config_rules[:] + controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(controller) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteEndpoint for Service({:s})'.format(str(service_uuid))) + results.append(e) + + return results + + + diff --git a/src/service/service/service_handlers/l3nm_ryu/__init__.py b/src/service/service/service_handlers/l3nm_ryu/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53d5157f750bfb085125cbd33faff1cec5924e14 --- /dev/null +++ b/src/service/service/service_handlers/l3nm_ryu/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/service/service/task_scheduler/TaskExecutor.py b/src/service/service/task_scheduler/TaskExecutor.py index 6fb1eca3497fef311605e2cd202ca74bd9cb730f..19f12ad4b25f75aba37eb3059c33defed916f7a1 100644 --- a/src/service/service/task_scheduler/TaskExecutor.py +++ b/src/service/service/task_scheduler/TaskExecutor.py @@ -287,10 +287,15 @@ class TaskExecutor: devices.setdefault(device_type, dict())[device_uuid] = device else: if not exclude_managed_by_controller: - device_type = DeviceTypeEnum._value2member_map_[device.device_type] + LOGGER.debug('device managed by controller = {:s}'.format(str(device_uuid))) + device_type = DeviceTypeEnum._value2member_map_[controller.device_type] + LOGGER.debug('device_type not exlude by controller = {:s}'.format(str(device_type))) devices.setdefault(device_type, dict())[device_uuid] = device - device_type = DeviceTypeEnum._value2member_map_[controller.device_type] - devices.setdefault(device_type, dict())[controller.device_id.device_uuid.uuid] = controller + else: + device_type = DeviceTypeEnum._value2member_map_[controller.device_type] + LOGGER.debug('device_type = {:s}'.format(str(device_type))) + devices.setdefault(device_type, dict())[controller.device_id.device_uuid.uuid] = controller + return devices # ----- Service-related methods ------------------------------------------------------------------------------------ @@ -320,16 +325,30 @@ class TaskExecutor: def get_service_handlers( self, connection : Connection, service : Service, **service_handler_settings ) -> Dict[DeviceTypeEnum, Tuple['_ServiceHandler', Dict[str, Device]]]: - connection_device_types : Dict[DeviceTypeEnum, Dict[str, Device]] = self.get_devices_from_connection( + # WARNING: exclude_managed_by_controller should be True, changed to False for test purposes. + # For Ryu SDN controller we need to know the underlying devices we are traversing. + # Elaborate proper logic to resolve this case. + connection_device_types_excluded : Dict[DeviceTypeEnum, Dict[str, Device]] = self.get_devices_from_connection( connection, exclude_managed_by_controller=True ) + LOGGER.debug('connection_device_types_excluded = {:s}'.format(str(connection_device_types_excluded))) + connection_device_types_included : Dict[DeviceTypeEnum, Dict[str, Device]] = self.get_devices_from_connection( + connection, exclude_managed_by_controller=False + ) + LOGGER.debug('connection_device_types_included = {:s}'.format(str(connection_device_types_included))) service_handlers : Dict[DeviceTypeEnum, Tuple['_ServiceHandler', Dict[str, Device]]] = dict() - for device_type, connection_devices in connection_device_types.items(): + for device_type, connection_devices in connection_device_types_excluded.items(): try: service_handler_class = get_service_handler_class( - self._service_handler_factory, service, connection_devices) + self._service_handler_factory, service, connection_devices + ) + LOGGER.debug('service_handler_class IN CONNECTION DEVICE TYPE EXCLUDED = {:s}'.format(str(service_handler_class.__name__))) service_handler = service_handler_class(service, self, **service_handler_settings) - service_handlers[device_type] = (service_handler, connection_devices) + LOGGER.debug('service_handler IN CONNECTION DEVICE TYPE EXCLUDED = {:s}'.format(str(service_handler))) + connection_devices_included = connection_device_types_included.get(device_type, connection_devices) + LOGGER.debug('connection_devices_included IN CONNECTION DEVICE TYPE EXCLUDED = {:s}'.format(str(connection_devices_included))) + service_handlers[device_type] = (service_handler, connection_devices_included) + LOGGER.debug('service_handlers IN CONNECTION DEVICE TYPE EXCLUDED = {:s}'.format(str(service_handlers))) except ( UnsatisfiedFilterException, UnsupportedFilterFieldException, UnsupportedFilterFieldValueException diff --git a/src/webui/service/static/topology_icons/openflow-ryu-controller.png b/src/webui/service/static/topology_icons/openflow-ryu-controller.png new file mode 100644 index 0000000000000000000000000000000000000000..2982c57308983b367f1fa13c559fb702edcbadfe Binary files /dev/null and b/src/webui/service/static/topology_icons/openflow-ryu-controller.png differ