- url = "{}/operations/tapi-topology:get-topology-details"
- data = {
- "tapi-topology:input": {
- "tapi-topology:topology-id-or-name": "Transponder 100GE"
- }
- }
- response = test_utils.post_request(url, data)
- self.assertEqual(response.status_code, requests.codes.ok, test_utils.CODE_SHOULD_BE_200)
- res = response.json()
- self.assertEqual(len(res["output"]["topology"]["node"]), 1, 'Topology should contain 1 node')
- self.assertNotIn("link", res["output"]["topology"], 'Topology should contain no link')
-
- url = "{}/operations/tapi-topology:get-topology-details"
- data = {
- "tapi-topology:input": {
- "tapi-topology:topology-id-or-name": "T0 - Multi-layer topology"
- }
- }
- response = test_utils.post_request(url, data)
- self.assertEqual(response.status_code, requests.codes.ok, test_utils.CODE_SHOULD_BE_200)
- res = response.json()
- self.assertEqual(len(res["output"]["topology"]["node"]), 1, 'Topology should contain 1 node')
- self.assertNotIn("link", res["output"]["topology"], 'Topology should contain no link')
+ self.tapi_topo["topology-id"] = test_utils.T100GE_UUID
+ response = test_utils.transportpce_api_rpc_request(
+ 'tapi-topology', 'get-topology-details', self.tapi_topo)
+ self.assertEqual(response['status_code'], requests.codes.ok)
+ self.assertEqual(len(response["output"]["topology"]["node"]), 1, 'Topology should contain 1 node')
+ self.assertNotIn("link", response["output"]["topology"], 'Topology should contain no link')
+
+ self.tapi_topo["topology-id"] = test_utils.T0_MULTILAYER_TOPO_UUID
+ response = test_utils.transportpce_api_rpc_request(
+ 'tapi-topology', 'get-topology-details', self.tapi_topo)
+ self.assertEqual(response['status_code'], requests.codes.ok)
+ self.assertEqual(len(response["output"]["topology"]["node"]), 1, 'Topology should contain 1 node')
+ self.assertNotIn("link", response["output"]["topology"], 'Topology should contain no link')