Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get topology nodes does not include their status and state #349

Open
italovalcy opened this issue Nov 6, 2024 · 0 comments
Open

get topology nodes does not include their status and state #349

italovalcy opened this issue Nov 6, 2024 · 0 comments

Comments

@italovalcy
Copy link
Contributor

According to the Topology data model spec, the Nodes have their own status and state. That information is being exported by OXP, but SDX-Controller does not export that information.

Steps to reproduce:

  1. Follow the steps described here: https://sdx-docs.readthedocs.io/en/latest/sdx_deploy_single_server.html
  2. List the topology nodes exported by the OXP:
$ curl -s http://0.0.0.0:8181/api/kytos/sdx/topology/2.0.0 | jq -r '(.nodes[] | [.id, .status, .state]) | @tsv'
urn:sdx:node:ampath.net:Ampath3	up	enabled
urn:sdx:node:ampath.net:Ampath2	up	enabled
urn:sdx:node:ampath.net:Ampath1	up	enabled
  1. Now list the topology nodes exported by SDX-Controller:
$ curl -s http://0.0.0.0:8080/SDX-Controller/topology | jq -r '.nodes[] | .id + " " + .status + " " + .state'
urn:sdx:node:ampath.net:Ampath3
urn:sdx:node:ampath.net:Ampath2
urn:sdx:node:ampath.net:Ampath1
urn:sdx:node:sax.net:Sax01
urn:sdx:node:sax.net:Sax02
urn:sdx:node:tenet.ac.za:Tenet02
urn:sdx:node:tenet.ac.za:Tenet03
urn:sdx:node:tenet.ac.za:Tenet01

From the logs, we see SDX-LC is sending all data to SDX-Controller:

$ docker logs sdx-controller  | grep "sdx_controller.handlers.lc_message_handler:MQ received message"
INFO:sdx_controller.handlers.lc_message_handler:MQ received message:b'{"name": "Ampath-OXP", "id": "urn:sdx:topology:ampath.net", "version": 9, "timestamp": "2024-10-23T15:28:32Z", "model_version": "2.0.0", "nodes": [{"name": "Ampath3", "id": "urn:sdx:node:ampath.net:Ampath3", "location": {"address": "Jacksonville", "latitude": 30.27, "longitude": -81.68, "iso3166_2_lvl4": "US-FL", "private": []}, "ports": [{"id": "urn:sdx:port:ampath.net:Ampath3:50", "name": "Ampath3-eth50", "node": "urn:sdx:node:ampath.net:Ampath3", "type": "10GE", "status": "up", "state": "enabled", "mtu": 1500, "nni": "", "services": {"l2vpn-ptp": {"vlan_range": [[1, 4095]]}}, "private": ["status"]}, {"id": "urn:sdx:port:ampath.net:Ampath3:2", "name": "Ampath3-eth2", "node": "urn:sdx:node:ampath.net:Ampath3", "type": "10GE", "status": "up", "state": "enabled", "mtu": 1500, "nni": "urn:sdx:link:ampath.net:Ampath1/2_Ampath3/2", "services": {"l2vpn-ptp": {"vlan_range": [[1, 4095]]}}, "private": ["status"]}, {"id": "urn:sdx:port:ampath.net:Ampath3:3", "name": "Ampath3-eth3", "node": "urn:sdx:node:ampath.net:Ampath3", "type": "10GE", "status": "up", "state": "enabled", "mtu": 1500, "nni": "urn:sdx:link:ampath.net:Ampath2/3_Ampath3/3", "services": {"l2vpn-ptp": {"vlan_range": [[1, 4095]]}}, "private": ["status"]}], "status": "up", "state": "enabled"}, {"name": "Ampath2", "id": "urn:sdx:node:ampath.net:Ampath2", "location": {"address": "BocaRaton", "latitude": 26.38, "longitude": -80.11, "iso3166_2_lvl4": "US-FL", "private": []}, "ports": [{"id": "urn:sdx:port:ampath.net:Ampath2:1", "name": "Ampath2-eth1", "node": "urn:sdx:node:ampath.net:Ampath2", "type": "10GE", "status": "up", "state": "enabled", "mtu": 1500, "nni": "urn:sdx:link:ampath.net:Ampath1/1_Ampath2/1", "services": {"l2vpn-ptp": {"vlan_range": [[1, 4095]]}}, "private": ["status"]}, {"id": "urn:sdx:port:ampath.net:Ampath2:50", "name": "Ampath2-eth50", "node": "urn:sdx:node:ampath.net:Ampath2", "type": "10GE", "status": "up", "state": "enabled", "mtu": 1500, "nni": "", "services": {"l2vpn-ptp": {"vlan_range": [[1, 4095]]}}, "private": ["status"]}, {"id": "urn:sdx:port:ampath.net:Ampath2:40", "name": "Ampath2-eth40", "node": "urn:sdx:node:ampath.net:Ampath2", "type": "10GE", "status": "up", "state": "enabled", "mtu": 1500, "nni": "urn:sdx:port:sax.net:Sax02:40", "services": {"l2vpn-ptp": {"vlan_range": [[1, 4095]]}}, "private": ["status"]}, {"id": "urn:sdx:port:ampath.net:Ampath2:3", "name": "Ampath2-eth3", "node": "urn:sdx:node:ampath.net:Ampath2", "type": "10GE", "status": "up", "state": "enabled", "mtu": 1500, "nni": "urn:sdx:link:ampath.net:Ampath2/3_Ampath3/3", "services": {"l2vpn-ptp": {"vlan_range": [[1, 4095]]}}, "private": ["status"]}], "status": "up", "state": "enabled"}, {"name": "Ampath1", "id": "urn:sdx:node:ampath.net:Ampath1", "location": {"address": "Miami", "latitude": 25.77, "longitude": -80.19, "iso3166_2_lvl4": "US-FL", "private": []}, "ports": [{"id": "urn:sdx:port:ampath.net:Ampath1:1", "name": "Ampath1-eth1", "node": "urn:sdx:node:ampath.net:Ampath1", "type": "10GE", "status": "up", "state": "enabled", "mtu": 1500, "nni": "urn:sdx:link:ampath.net:Ampath1/1_Ampath2/1", "services": {"l2vpn-ptp": {"vlan_range": [[1, 4095]]}}, "private": ["status"]}, {"id": "urn:sdx:port:ampath.net:Ampath1:40", "name": "Ampath1-eth40", "node": "urn:sdx:node:ampath.net:Ampath1", "type": "10GE", "status": "up", "state": "enabled", "mtu": 1500, "nni": "urn:sdx:port:sax.net:Sax01:40", "services": {"l2vpn-ptp": {"vlan_range": [[1, 4095]]}}, "private": ["status"]}, {"id": "urn:sdx:port:ampath.net:Ampath1:50", "name": "Ampath1-eth50", "node": "urn:sdx:node:ampath.net:Ampath1", "type": "10GE", "status": "up", "state": "enabled", "mtu": 1500, "nni": "", "services": {"l2vpn-ptp": {"vlan_range": [[1, 4095]]}}, "private": ["status"]}, {"id": "urn:sdx:port:ampath.net:Ampath1:2", "name": "Ampath1-eth2", "node": "urn:sdx:node:ampath.net:Ampath1", "type": "10GE", "status": "up", "state": "enabled", "mtu": 1500, "nni": "urn:sdx:link:ampath.net:Ampath1/2_Ampath3/2", "services": {"l2vpn-ptp": {"vlan_range": [[1, 4095]]}}, "private": ["status"]}], "status": "up", "state": "enabled"}], "links": [{"name": "Ampath1/2_Ampath3/2", "id": "urn:sdx:link:ampath.net:Ampath1/2_Ampath3/2", "ports": ["urn:sdx:port:ampath.net:Ampath1:2", "urn:sdx:port:ampath.net:Ampath3:2"], "type": "intra", "bandwidth": 10, "residual_bandwidth": 100, "latency": 0, "packet_loss": 0, "availability": 0, "status": "up", "state": "enabled", "private": ["packet_loss"]}, {"name": "Ampath1/1_Ampath2/1", "id": "urn:sdx:link:ampath.net:Ampath1/1_Ampath2/1", "ports": ["urn:sdx:port:ampath.net:Ampath1:1", "urn:sdx:port:ampath.net:Ampath2:1"], "type": "intra", "bandwidth": 10, "residual_bandwidth": 100, "latency": 0, "packet_loss": 0, "availability": 0, "status": "up", "state": "enabled", "private": ["packet_loss"]}, {"name": "Ampath2/3_Ampath3/3", "id": "urn:sdx:link:ampath.net:Ampath2/3_Ampath3/3", "ports": ["urn:sdx:port:ampath.net:Ampath2:3", "urn:sdx:port:ampath.net:Ampath3:3"], "type": "intra", "bandwidth": 10, "residual_bandwidth": 100, "latency": 0, "packet_loss": 0, "availability": 0, "status": "up", "state": "enabled", "private": ["packet_loss"]}], "services": ["l2vpn-ptp"]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant