ODL_PWD = "admin"
NODES_LOGIN = "admin"
NODES_PWD = "admin"
+URL_CONFIG_NETCONF_TOPO = "{}/config/network-topology:network-topology/topology/topology-netconf/"
TYPE_APPLICATION_JSON = {'Content-Type': 'application/json', 'Accept': 'application/json'}
TYPE_APPLICATION_XML = {'Content-Type': 'application/xml', 'Accept': 'application/xml'}
def mount_device(node_id, sim):
- url = "{}/config/network-topology:network-topology/topology/topology-netconf/node/"+node_id
+ url = URL_CONFIG_NETCONF_TOPO+"node/"+node_id
body = {"node": [{
"node-id": node_id,
"netconf-node-topology:username": NODES_LOGIN,
def unmount_device(node_id):
- url = "{}/config/network-topology:network-topology/topology/topology-netconf/node/"+node_id
+ url = URL_CONFIG_NETCONF_TOPO+"node/"+node_id
response = delete_request(url)
if wait_until_log_contains(TPCE_LOG, re.escape("onDeviceDisConnected: "+node_id), 60):
print("Node "+node_id+" correctly deleted from tpce topology", end='... ', flush=True)
return post_request(url, data)
+def check_netconf_node_request(node: str, suffix: str):
+ url = URL_CONFIG_NETCONF_TOPO + (
+ "node/" + node + "/yang-ext:mount/org-openroadm-device:org-openroadm-device/" + suffix
+ )
+ return get_request(url)
+
+
def shutdown_process(process):
if process is not None:
for child in psutil.Process(process.pid).children():