#############################################################################
import unittest
-import requests
-import time
-import subprocess
-import signal
import json
-import os
-import psutil
-import shutil
-from unittest.result import failfast
+#from unittest.result import failfast
+import requests
from common import test_utils
'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
'logical-connection-point': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-network',
'port-direction': 'bidirectional', 'connection-map-lcp': 'XPDR1-CLIENT1',
- 'lcp-hash-val': '8e128ba57560403cfd4ffafae38cd941'},
+ 'lcp-hash-val': 'AMkDwQ7xTmRI'},
res['nodes'][0]['mapping'])
self.assertIn(
{'supported-interface-capability': ['org-openroadm-port-types:if-100GE'],
'supporting-circuit-pack-name': '1/0/1-PLUG-CLIENT',
'logical-connection-point': 'XPDR1-CLIENT1', 'port-direction': 'bidirectional',
'connection-map-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client',
- 'lcp-hash-val': '3ed8ed1336784ac7c2f66c22f2f03d8'},
+ 'lcp-hash-val': 'AJUUr6I5fALj'},
res['nodes'][0]['mapping'])
def test_05_service_path_create(self):
}, **res['interface'][0]),
res['interface'][0]
)
- self.assertDictEqual(
- {u'rate': u'org-openroadm-otn-common-types:OTU4',
- u'fec': u'scfec'},
+ input_dict_2 = {'tx-sapi': 'AMkDwQ7xTmRI',
+ 'expected-dapi': 'AMkDwQ7xTmRI',
+ 'rate': 'org-openroadm-otn-common-types:OTU4',
+ 'fec': 'scfec'}
+ self.assertDictEqual(input_dict_2,
res['interface'][0]['org-openroadm-otn-otu-interfaces:otu'])
def test_13_service_path_create_xpdr_check(self):
"GET", url, headers=headers, auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
self.assertEqual(response.status_code, requests.codes.not_found)
res = response.json()
- self.assertIn(
- {"error-type": "application", "error-tag": "data-missing",
- "error-message": "Request could not be completed because the relevant data model content does not exist"},
+ self.assertIn({
+ "error-type": "application",
+ "error-tag": "data-missing",
+ "error-message": "Request could not be completed because the relevant data model content does not exist"},
res['errors']['error'])
def test_21_service_path_delete_rdm_check(self):
"GET", url, headers=headers, auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
self.assertEqual(response.status_code, requests.codes.not_found)
res = response.json()
- self.assertIn(
- {"error-type": "application", "error-tag": "data-missing",
- "error-message": "Request could not be completed because the relevant data model content does not exist"},
+ self.assertIn({
+ "error-type": "application",
+ "error-tag": "data-missing",
+ "error-message": "Request could not be completed because the relevant data model content does not exist"},
res['errors']['error'])
def test_22_service_path_delete_rdm_check(self):
"GET", url, headers=headers, auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
self.assertEqual(response.status_code, requests.codes.not_found)
res = response.json()
- self.assertIn(
- {"error-type": "application", "error-tag": "data-missing",
- "error-message": "Request could not be completed because the relevant data model content does not exist"},
+ self.assertIn({
+ "error-type": "application",
+ "error-tag": "data-missing",
+ "error-message": "Request could not be completed because the relevant data model content does not exist"},
res['errors']['error'])
def test_23_service_path_delete_xpdr_check(self):
"GET", url, headers=headers, auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
self.assertEqual(response.status_code, requests.codes.not_found)
res = response.json()
- self.assertIn(
- {"error-type": "application", "error-tag": "data-missing",
- "error-message": "Request could not be completed because the relevant data model content does not exist"},
+ self.assertIn({
+ "error-type": "application",
+ "error-tag": "data-missing",
+ "error-message": "Request could not be completed because the relevant data model content does not exist"},
res['errors']['error'])
def test_24_service_path_delete_xpdr_check(self):
"GET", url, headers=headers, auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
self.assertEqual(response.status_code, requests.codes.not_found)
res = response.json()
- self.assertIn(
- {"error-type": "application", "error-tag": "data-missing",
- "error-message": "Request could not be completed because the relevant data model content does not exist"},
+ self.assertIn({
+ "error-type": "application",
+ "error-tag": "data-missing",
+ "error-message": "Request could not be completed because the relevant data model content does not exist"},
res['errors']['error'])
def test_25_service_path_delete_xpdr_check(self):
"GET", url, headers=headers, auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
self.assertEqual(response.status_code, requests.codes.not_found)
res = response.json()
- self.assertIn(
- {"error-type": "application", "error-tag": "data-missing",
- "error-message": "Request could not be completed because the relevant data model content does not exist"},
+ self.assertIn({
+ "error-type": "application",
+ "error-tag": "data-missing",
+ "error-message": "Request could not be completed because the relevant data model content does not exist"},
res['errors']['error'])
def test_26_service_path_delete_xpdr_check(self):
"GET", url, headers=headers, auth=(test_utils.ODL_LOGIN, test_utils.ODL_PWD))
self.assertEqual(response.status_code, requests.codes.not_found)
res = response.json()
- self.assertIn(
- {"error-type": "application", "error-tag": "data-missing",
- "error-message": "Request could not be completed because the relevant data model content does not exist"},
+ self.assertIn({
+ "error-type": "application",
+ "error-tag": "data-missing",
+ "error-message": "Request could not be completed because the relevant data model content does not exist"},
res['errors']['error'])
def test_27_service_path_delete_xpdr_check(self):