# connect netconf devices
def test_01_connect_xpdrA(self):
url = ("{}/config/network-topology:"
# connect netconf devices
def test_01_connect_xpdrA(self):
url = ("{}/config/network-topology:"
"netconf-node-topology:username": "admin",
"netconf-node-topology:password": "admin",
"netconf-node-topology:host": "127.0.0.1",
"netconf-node-topology:username": "admin",
"netconf-node-topology:password": "admin",
"netconf-node-topology:host": "127.0.0.1",
"netconf-node-topology:username": "admin",
"netconf-node-topology:password": "admin",
"netconf-node-topology:host": "127.0.0.1",
"netconf-node-topology:username": "admin",
"netconf-node-topology:password": "admin",
"netconf-node-topology:host": "127.0.0.1",
"netconf-node-topology:username": "admin",
"netconf-node-topology:password": "admin",
"netconf-node-topology:host": "127.0.0.1",
"netconf-node-topology:username": "admin",
"netconf-node-topology:password": "admin",
"netconf-node-topology:host": "127.0.0.1",
"netconf-node-topology:username": "admin",
"netconf-node-topology:password": "admin",
"netconf-node-topology:host": "127.0.0.1",
"netconf-node-topology:username": "admin",
"netconf-node-topology:password": "admin",
"netconf-node-topology:host": "127.0.0.1",
"networkutils:xpdr-num": "1",
"networkutils:network-num": "1",
"networkutils:xpdr-num": "1",
"networkutils:network-num": "1",
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP1-TXRX"
}
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP1-TXRX"
}
"networkutils:xpdr-num": "1",
"networkutils:network-num": "1",
"networkutils:xpdr-num": "1",
"networkutils:network-num": "1",
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP1-TXRX"
}
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP1-TXRX"
}
"networkutils:xpdr-num": "1",
"networkutils:network-num": "1",
"networkutils:xpdr-num": "1",
"networkutils:network-num": "1",
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP1-TXRX"
}
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP1-TXRX"
}
"networkutils:xpdr-num": "1",
"networkutils:network-num": "1",
"networkutils:xpdr-num": "1",
"networkutils:network-num": "1",
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP1-TXRX"
}
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP1-TXRX"
}
def test_09_add_omsAttributes_ROADMA_ROADMC(self):
# Config ROADMA-ROADMC oms-attributes
url = ("{}/config/ietf-network:networks/network/openroadm-topology/ietf-network-topology:"
def test_09_add_omsAttributes_ROADMA_ROADMC(self):
# Config ROADMA-ROADMC oms-attributes
url = ("{}/config/ietf-network:networks/network/openroadm-topology/ietf-network-topology:"
def test_10_add_omsAttributes_ROADMC_ROADMA(self):
# Config ROADMC-ROADMA oms-attributes
url = ("{}/config/ietf-network:networks/network/openroadm-topology/ietf-network-topology:"
def test_10_add_omsAttributes_ROADMC_ROADMA(self):
# Config ROADMC-ROADMA oms-attributes
url = ("{}/config/ietf-network:networks/network/openroadm-topology/ietf-network-topology:"
def test_13_check_xc1_ROADMA(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
def test_13_check_xc1_ROADMA(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
"roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-1"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
"roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-1"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
def test_14_check_xc1_ROADMC(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
def test_14_check_xc1_ROADMC(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
"roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-1"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
"roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-1"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
"networkutils:xpdr-num": "1",
"networkutils:network-num": "2",
"networkutils:xpdr-num": "1",
"networkutils:network-num": "2",
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP2-TXRX"
}
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP2-TXRX"
}
def test_19_connect_roadmA_PP2_to_xpdrA_N2(self):
url = "{}/operations/transportpce-networkutils:init-rdm-xpdr-links".format(self.restconf_baseurl)
data = {
"networkutils:input": {
"networkutils:links-input": {
def test_19_connect_roadmA_PP2_to_xpdrA_N2(self):
url = "{}/operations/transportpce-networkutils:init-rdm-xpdr-links".format(self.restconf_baseurl)
data = {
"networkutils:input": {
"networkutils:links-input": {
"networkutils:xpdr-num": "1",
"networkutils:network-num": "2",
"networkutils:xpdr-num": "1",
"networkutils:network-num": "2",
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP2-TXRX"
}
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP2-TXRX"
}
def test_20_connect_xprdC_N2_to_roadmC_PP2(self):
url = "{}/operations/transportpce-networkutils:init-xpdr-rdm-links".format(self.restconf_baseurl)
data = {
"networkutils:input": {
"networkutils:links-input": {
def test_20_connect_xprdC_N2_to_roadmC_PP2(self):
url = "{}/operations/transportpce-networkutils:init-xpdr-rdm-links".format(self.restconf_baseurl)
data = {
"networkutils:input": {
"networkutils:links-input": {
"networkutils:xpdr-num": "1",
"networkutils:network-num": "2",
"networkutils:xpdr-num": "1",
"networkutils:network-num": "2",
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP2-TXRX"
}
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP2-TXRX"
}
def test_21_connect_roadmC_PP2_to_xpdrC_N2(self):
url = "{}/operations/transportpce-networkutils:init-rdm-xpdr-links".format(self.restconf_baseurl)
data = {
"networkutils:input": {
"networkutils:links-input": {
def test_21_connect_roadmC_PP2_to_xpdrC_N2(self):
url = "{}/operations/transportpce-networkutils:init-rdm-xpdr-links".format(self.restconf_baseurl)
data = {
"networkutils:input": {
"networkutils:links-input": {
"networkutils:xpdr-num": "1",
"networkutils:network-num": "2",
"networkutils:xpdr-num": "1",
"networkutils:network-num": "2",
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP2-TXRX"
}
"networkutils:srg-num": "1",
"networkutils:termination-point-num": "SRG1-PP2-TXRX"
}
def test_24_check_xc2_ROADMA(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
def test_24_check_xc2_ROADMA(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
"roadm-connections/DEG1-TTP-TXRX-SRG1-PP2-TXRX-2"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
"roadm-connections/DEG1-TTP-TXRX-SRG1-PP2-TXRX-2"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
def test_32_check_no_xc_ROADMA(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
def test_32_check_no_xc_ROADMA(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
.format(self.restconf_baseurl))
response = requests.request(
"GET", url, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
and (ele['tp-id'] == 'XPDR1-CLIENT1' or ele['tp-id'] == 'XPDR1-CLIENT3')):
self.assertNotIn('wavelength', dict.keys(ele['org-openroadm-network-topology:xpdr-client-attributes']))
and (ele['tp-id'] == 'XPDR1-CLIENT1' or ele['tp-id'] == 'XPDR1-CLIENT3')):
self.assertNotIn('wavelength', dict.keys(ele['org-openroadm-network-topology:xpdr-client-attributes']))
and (ele['tp-id'] == 'XPDR1-CLIENT1' or ele['tp-id'] == 'XPDR1-CLIENT3')):
self.assertNotIn('wavelength', dict.keys(ele['org-openroadm-network-topology:xpdr-network-attributes']))
time.sleep(10)
def test_34_check_topo_ROADMA_SRG1(self):
and (ele['tp-id'] == 'XPDR1-CLIENT1' or ele['tp-id'] == 'XPDR1-CLIENT3')):
self.assertNotIn('wavelength', dict.keys(ele['org-openroadm-network-topology:xpdr-network-attributes']))
time.sleep(10)
def test_34_check_topo_ROADMA_SRG1(self):
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
.format(self.restconf_baseurl))
response = requests.request(
"GET", url1, auth=('admin', 'admin'))
def test_38_check_xc1_ROADMA(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
def test_38_check_xc1_ROADMA(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
"roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-1"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
"roadm-connections/SRG1-PP1-TXRX-DEG1-TTP-TXRX-1"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
def test_39_check_xc1_ROADMC(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
def test_39_check_xc1_ROADMC(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
"roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-1"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
"roadm-connections/SRG1-PP1-TXRX-DEG2-TTP-TXRX-1"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
def test_42_check_xc2_ROADMA(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
def test_42_check_xc2_ROADMA(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf/"
"roadm-connections/SRG1-PP2-TXRX-DEG1-TTP-TXRX-2"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
"roadm-connections/SRG1-PP2-TXRX-DEG1-TTP-TXRX-2"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
def test_44_delete_oc_service1(self):
url = ("{}/operations/org-openroadm-service:service-delete"
.format(self.restconf_baseurl))
def test_44_delete_oc_service1(self):
url = ("{}/operations/org-openroadm-service:service-delete"
.format(self.restconf_baseurl))
def test_47_get_no_xc_ROADMA(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf"
def test_47_get_no_xc_ROADMA(self):
url = ("{}/config/network-topology:network-topology/topology/topology-netconf"
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json',
"Accept": "application/json"}
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json',
"Accept": "application/json"}
print ("trial number {}".format(i))
print("eth service creation")
self.test_11_create_eth_service1()
print ("trial number {}".format(i))
print("eth service creation")
self.test_11_create_eth_service1()
self.test_14_check_xc1_ROADMC()
print ("eth service deletion\n")
self.test_30_delete_eth_service1()
self.test_14_check_xc1_ROADMC()
print ("eth service deletion\n")
self.test_30_delete_eth_service1()
print ("trial number {}".format(i))
print("oc service creation")
self.test_36_create_oc_service1()
print ("trial number {}".format(i))
print("oc service creation")
self.test_36_create_oc_service1()
self.test_39_check_xc1_ROADMC()
print ("oc service deletion\n")
self.test_44_delete_oc_service1()
self.test_39_check_xc1_ROADMC()
print ("oc service deletion\n")
self.test_44_delete_oc_service1()
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
response = requests.request(
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
response = requests.request(
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
response = requests.request(
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
response = requests.request(
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
response = requests.request(
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
response = requests.request(
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
response = requests.request(
.format(self.restconf_baseurl))
headers = {'content-type': 'application/json'}
response = requests.request(