- response = test_utils.path_computation_request("request-1", "service-100GE",
- {"service-rate": "100",
- "clli": "NodeA",
- "service-format": "Ethernet",
- "node-id": "XPDR-A2",
- "tx-direction": {"port": {"port-device-name": "XPDR-A2-XPDR2",
- "port-name": "XPDR2-CLIENT1"}}},
- {"service-rate": "100",
- "clli": "NodeC",
- "service-format": "Ethernet",
- "node-id": "XPDR-C2",
- "tx-direction": {"port": {"port-device-name": "XPDR-C2-XPDR2",
- "port-name": "XPDR2-CLIENT1"}}})
-
- self.assertEqual(response.status_code, requests.codes.ok)
- res = response.json()
+ self.path_computation_input_data["service-name"] = "service-100GE"
+ self.path_computation_input_data["service-a-end"]["service-rate"] = "100"
+ self.path_computation_input_data["service-a-end"]["service-format"] = "Ethernet"
+ self.path_computation_input_data["service-a-end"]["tx-direction"] = \
+ {"port": {"port-device-name": "XPDR-A2-XPDR2",
+ "port-name": "XPDR2-CLIENT1"}}
+ self.path_computation_input_data["service-z-end"]["service-rate"] = "100"
+ self.path_computation_input_data["service-z-end"]["service-format"] = "Ethernet"
+ self.path_computation_input_data["service-z-end"]["tx-direction"] = \
+ {"port": {"port-device-name": "XPDR-C2-XPDR2",
+ "port-name": "XPDR2-CLIENT1"}}
+ self.path_computation_input_data["service-z-end"]["service-format"] = "ODU"
+ response = test_utils_rfc8040.transportpce_api_rpc_request('transportpce-pce',
+ 'path-computation-request',
+ self.path_computation_input_data)
+ self.assertEqual(response['status_code'], requests.codes.ok)