(check_list[linkType]).remove(linkId)
else:
self.assertFalse(True)
- for link_type in check_list:
- self.assertEqual(len(check_list[link_type]), 0)
+ for val in check_list.values():
+ self.assertEqual(len(val), 0)
def test_05_getNodes_OpenRoadmTopology(self):
# pylint: disable=redundant-unittest-assert
(check_list[linkType]).remove(linkId)
else:
self.assertFalse(True)
- for link_type in check_list:
- self.assertEqual(len(check_list[link_type]), 0)
+ for val in check_list.values():
+ self.assertEqual(len(val), 0)
def test_13_connect_ROADMC(self):
response = test_utils.mount_device("ROADMC01", ('roadmc', self.NODE_VERSION))
(check_list[linkType]).remove(linkId)
else:
self.assertFalse(True)
- for link_type in check_list:
- self.assertEqual(len(check_list[link_type]), 0)
+ for val in check_list.values():
+ self.assertEqual(len(val), 0)
def test_19_getLinkOmsAttributesOpenRoadmTopology(self):
response = test_utils.get_ordm_topo_request("")
(check_list[linkType]).remove(linkId)
else:
roadmtoroadmLink += 1
- for link_type in check_list:
- self.assertEqual(len(check_list[link_type]), 0)
+ for val in check_list.values():
+ self.assertEqual(len(val), 0)
self.assertEqual(roadmtoroadmLink, 6)
for i in range(0, nbLink):
self.assertNotEqual(res['network'][0]['ietf-network-topology:link'][i]
(check_list[linkType]).remove(linkId)
else:
self.assertFalse(True)
- for link_type in check_list:
- self.assertEqual(len(check_list[link_type]), 0)
+ for val in check_list.values():
+ self.assertEqual(len(val), 0)
def test_05_getNodes_OpenRoadmTopology(self):
# pylint: disable=redundant-unittest-assert
(check_list[linkType]).remove(linkId)
else:
self.assertFalse(True)
- for link_type in check_list:
- self.assertEqual(len(check_list[link_type]), 0)
+ for val in check_list.values():
+ self.assertEqual(len(val), 0)
def test_13_connect_ROADMC(self):
response = test_utils.mount_device("ROADM-C1", ('roadmc', self.NODE_VERSION))
(check_list[linkType]).remove(linkId)
else:
self.assertFalse(True)
- for link_type in check_list:
- self.assertEqual(len(check_list[link_type]), 0)
+ for val in check_list.values():
+ self.assertEqual(len(val), 0)
def test_19_getLinkOmsAttributesOpenRoadmTopology(self):
response = test_utils.get_ordm_topo_request("")
(check_list[linkType]).remove(linkId)
else:
roadmtoroadmLink += 1
- for link_type in check_list:
- self.assertEqual(len(check_list[link_type]), 0)
+ for val in check_list.values():
+ self.assertEqual(len(val), 0)
self.assertEqual(roadmtoroadmLink, 6)
for i in range(0, nbLink):
self.assertNotEqual(res['network'][0]['ietf-network-topology:link'][i]
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+# pylint: disable=no-member
+
import unittest
import time
import requests
@classmethod
def tearDownClass(cls):
+ # pylint: disable=not-an-iterable
for process in cls.processes:
test_utils.shutdown_process(process)
print("all processes killed")
def count_object_with_double_key(list_dicts, key1, key2, value):
nb = 0
- for dict in list_dicts:
- if dict[key1][0][key2] == value:
+ for dictio in list_dicts:
+ if dictio[key1][0][key2] == value:
nb += 1
return nb
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'SPDR-SA1-XPDR1' or 'SPDR-SC1-XPDR1':
+ if node['node-id'] == 'SPDR-SA1-XPDR1' or node['node-id'] == 'SPDR-SC1-XPDR1':
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR1-NETWORK1':
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'SPDR-SA1-XPDR1' or 'SPDR-SC1-XPDR1':
+ if node['node-id'] == 'SPDR-SA1-XPDR1' or node['node-id'] == 'SPDR-SC1-XPDR1':
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR1-NETWORK1':
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if (node['node-id'] == 'SPDR-SA1-XPDR1' or 'SPDR-SC1-XPDR1'):
+ if node['node-id'] == 'SPDR-SA1-XPDR1' or node['node-id'] == 'SPDR-SC1-XPDR1':
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR1-NETWORK1':
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'SPDR-SA1-XPDR1' or 'SPDR-SC1-XPDR1':
+ if node['node-id'] == 'SPDR-SA1-XPDR1' or node['node-id'] == 'SPDR-SC1-XPDR1':
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR1-NETWORK1':
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'SPDR-SA1-XPDR3' or 'SPDR-SC1-XPDR3':
+ if node['node-id'] == 'SPDR-SA1-XPDR3' or node['node-id'] == 'SPDR-SC1-XPDR3':
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR3-NETWORK1':
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if (node['node-id'] == 'SPDR-SA1-XPDR3' or 'SPDR-SC1-XPDR3'):
+ if node['node-id'] == 'SPDR-SA1-XPDR3' or node['node-id'] == 'SPDR-SC1-XPDR3':
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR3-NETWORK1':
@classmethod
def setUpClass(cls):
+ # pylint: disable=unsubscriptable-object
cls.init_failed = False
os.environ['JAVA_MIN_MEM'] = '1024M'
os.environ['JAVA_MAX_MEM'] = '4096M'
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'XPDR-A2-XPDR2' or 'XPDR-C2-XPDR2':
+ if node['node-id'] == 'XPDR-A2-XPDR2' or node['node-id'] == 'XPDR-C2-XPDR2':
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR2-NETWORK1':
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'XPDR-A2-XPDR2' or 'XPDR-C2-XPDR2':
+ if node['node-id'] == 'XPDR-A2-XPDR2' or node['node-id'] == 'XPDR-C2-XPDR2':
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR2-NETWORK1':
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'XPDR-A2-XPDR2' or 'XPDR-C2-XPDR2':
+ if node['node-id'] == 'XPDR-A2-XPDR2' or node['node-id'] == 'XPDR-C2-XPDR2':
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR2-NETWORK1':
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if (node['node-id'] == 'XPDR-A2-XPDR2' or 'XPDR-C2-XPDR2'):
+ if node['node-id'] == 'XPDR-A2-XPDR2' or node['node-id'] == 'XPDR-C2-XPDR2':
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR2-NETWORK1':
response = test_utils.get_otn_topo_request()
res = response.json()
for node in res['network'][0]['node']:
- if node['node-id'] == 'XPDR-A2-XPDR2' or 'XPDR-C2-XPDR2':
+ if node['node-id'] == 'XPDR-A2-XPDR2' or node['node-id'] == 'XPDR-C2-XPDR2':
tpList = node['ietf-network-topology:termination-point']
for tp in tpList:
if tp['tp-id'] == 'XPDR2-NETWORK1':
@classmethod
def setUpClass(cls):
+ # pylint: disable=bare-except
try:
sample_files_parsed = False
TOPO_BI_DIR_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)),
@classmethod
def setUpClass(cls):
+ # pylint: disable=unsubscriptable-object
# TODO: for lighty manage the activation of NBI notification feature
cls.init_failed = False
cls.processes = test_utils.start_tpce()