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

Update the sample topology request #91

Open
congwang09 opened this issue Oct 6, 2023 · 0 comments
Open

Update the sample topology request #91

congwang09 opened this issue Oct 6, 2023 · 0 comments

Comments

@congwang09
Copy link

congwang09 commented Oct 6, 2023

In the sample request below, there are some things that needs to consistent with SDX LC:

  1. The "ports" should be objects, instead of strings. For example, instead of "ports" like this:
"ports":[
	"urn:sdx:port:ampath.net:Ampath2:1",
	"urn:sdx:port:ampath.net:Ampath1:1"
],

Should be something like this:

"ports": [
	{
		"id": "urn:ogf:network:sdx:port:zaoxi:A1:2",
		"name": "Novi01:2",
		"node": "urn:sdx:node:amlight.net:B1",
		"short_name": "B1:2",
		"label_range": [
			"100-200",
			"10001"
		],
		"status": "up"
	},
	{
		"id": "urn:ogf:network:sdx:port:zaoxi:B1:1",
		"label_range": [
			"100-200",
			"10001"
		],
		"name": "Novi02:2",
		"node": "urn:sdx:node:amlight.net:B2",
		"short_name": "B2:2",
		"status": "up"
	}
],
  1. We should consider either updating the validator or the topology:
    ERROR:connexion.decorators.validation:http://aw-sdx-lc-1.renci.org:8080/SDX-LC/1.0.0/topology validation error: 1250000000 is greater than the maximum of 1000000 - 'links.0.bandwidth'
  2. latency should be greater than 0:
    ERROR:connexion.decorators.validation:http://aw-sdx-lc-1.renci.org:8080/SDX-LC/1.0.0/topology validation error: 0 is less than the minimum of 1 - 'links.0.latency'
    it's optional when it's not known. should not be 0.

Sample topology below:

{
   "id":"urn:sdx:topology:ampath.net",
   "links":[
      {
         "availability":100,
         "bandwidth":1250000000,
         "id":"urn:sdx:link:ampath.net:Ampath3/2_Ampath1/2",
         "latency":0,
         "name":"Ampath3/2_Ampath1/2",
         "packet_loss":0,
         "ports":[
            "urn:sdx:port:ampath.net:Ampath3:2",
            "urn:sdx:port:ampath.net:Ampath1:2"
         ],
         "residual_bandwidth":100,
         "state":"enabled",
         "status":"up",
         "type":"intra"
      },
      {
         "availability":100,
         "bandwidth":1250000000,
         "id":"urn:sdx:link:ampath.net:Ampath2/1_Ampath1/1",
         "latency":0,
         "name":"Ampath2/1_Ampath1/1",
         "packet_loss":0,
         "ports":[
            "urn:sdx:port:ampath.net:Ampath2:1",
            "urn:sdx:port:ampath.net:Ampath1:1"
         ],
         "residual_bandwidth":100,
         "state":"enabled",
         "status":"up",
         "type":"intra"
      },
      {
         "availability":100,
         "bandwidth":1250000000,
         "id":"urn:sdx:link:ampath.net:Ampath3/3_Ampath2/3",
         "latency":0,
         "name":"Ampath3/3_Ampath2/3",
         "packet_loss":0,
         "ports":[
            "urn:sdx:port:ampath.net:Ampath3:3",
            "urn:sdx:port:ampath.net:Ampath2:3"
         ],
         "residual_bandwidth":100,
         "state":"enabled",
         "status":"up",
         "type":"intra"
      }
   ],
   "model_version":"2.0.0",
   "name":"Ampath-OXP",
   "nodes":[
      {
         "id":"urn:sdx:node:ampath.net:Ampath3",
         "location":{
            "address":"",
            "latitude":0.0,
            "longitude":-30.0
         },
         "name":"Ampath3",
         "ports":[
            {
               "id":"urn:sdx:port:ampath.net:Ampath3:2",
               "mtu":1500,
               "name":"Ampath3-eth2",
               "nni":"False",
               "node":"urn:sdx:node:ampath.net:Ampath3",
               "services":"l2vpn",
               "state":"enabled",
               "status":"up",
               "type":"10GE"
            },
            {
               "id":"urn:sdx:port:ampath.net:Ampath3:50",
               "mtu":1500,
               "name":"Ampath3-eth50",
               "nni":"False",
               "node":"urn:sdx:node:ampath.net:Ampath3",
               "services":"l2vpn",
               "state":"enabled",
               "status":"up",
               "type":"10GE"
            },
            {
               "id":"urn:sdx:port:ampath.net:Ampath3:3",
               "mtu":1500,
               "name":"Ampath3-eth3",
               "nni":"False",
               "node":"urn:sdx:node:ampath.net:Ampath3",
               "services":"l2vpn",
               "state":"enabled",
               "status":"up",
               "type":"10GE"
            }
         ]
      },
      {
         "id":"urn:sdx:node:ampath.net:Ampath2",
         "location":{
            "address":"",
            "latitude":0.0,
            "longitude":-20.0
         },
         "name":"Ampath2",
         "ports":[
            {
               "id":"urn:sdx:port:ampath.net:Ampath2:1",
               "mtu":1500,
               "name":"Ampath2-eth1",
               "nni":"False",
               "node":"urn:sdx:node:ampath.net:Ampath2",
               "services":"l2vpn",
               "state":"enabled",
               "status":"up",
               "type":"10GE"
            },
            {
               "id":"urn:sdx:port:ampath.net:Ampath2:50",
               "mtu":1500,
               "name":"Ampath2-eth50",
               "nni":"False",
               "node":"urn:sdx:node:ampath.net:Ampath2",
               "services":"l2vpn",
               "state":"enabled",
               "status":"up",
               "type":"10GE"
            },
            {
               "id":"urn:sdx:port:ampath.net:Ampath2:40",
               "mtu":1500,
               "name":"Ampath2-eth40",
               "nni":"False",
               "node":"urn:sdx:node:ampath.net:Ampath2",
               "services":"l2vpn",
               "state":"enabled",
               "status":"up",
               "type":"10GE"
            },
            {
               "id":"urn:sdx:port:ampath.net:Ampath2:3",
               "mtu":1500,
               "name":"Ampath2-eth3",
               "nni":"False",
               "node":"urn:sdx:node:ampath.net:Ampath2",
               "services":"l2vpn",
               "state":"enabled",
               "status":"up",
               "type":"10GE"
            }
         ]
      },
      {
         "id":"urn:sdx:node:ampath.net:Ampath1",
         "location":{
            "address":"",
            "latitude":0.0,
            "longitude":-10.0
         },
         "name":"Ampath1",
         "ports":[
            {
               "id":"urn:sdx:port:ampath.net:Ampath1:1",
               "mtu":1500,
               "name":"Ampath1-eth1",
               "nni":"False",
               "node":"urn:sdx:node:ampath.net:Ampath1",
               "services":"l2vpn",
               "state":"enabled",
               "status":"up",
               "type":"10GE"
            },
            {
               "id":"urn:sdx:port:ampath.net:Ampath1:40",
               "mtu":1500,
               "name":"Ampath1-eth40",
               "nni":"False",
               "node":"urn:sdx:node:ampath.net:Ampath1",
               "services":"l2vpn",
               "state":"enabled",
               "status":"up",
               "type":"10GE"
            },
            {
               "id":"urn:sdx:port:ampath.net:Ampath1:50",
               "mtu":1500,
               "name":"Ampath1-eth50",
               "nni":"False",
               "node":"urn:sdx:node:ampath.net:Ampath1",
               "services":"l2vpn",
               "state":"enabled",
               "status":"up",
               "type":"10GE"
            },
            {
               "id":"urn:sdx:port:ampath.net:Ampath1:2",
               "mtu":1500,
               "name":"Ampath1-eth2",
               "nni":"False",
               "node":"urn:sdx:node:ampath.net:Ampath1",
               "services":"l2vpn",
               "state":"enabled",
               "status":"up",
               "type":"10GE"
            }
         ]
      }
   ],
   "timestamp":"2023-10-06T13:17:17Z",
   "version":2
}
lmarinve added a commit that referenced this issue Oct 9, 2023
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