Verification of LSP instantiation message to PCC for LSP installation
Installed PCEP protocol plugins in the ODL. Post operation response, getting as 404 using RESTCONF in the python script. using below url. url:- /restconf/operations/network-topology-pcep:add-lsp source code:- import os,sys,logging import requests import json,xml import generatelogs, getconfig
generatelogs.get_logs()
ip = getconfig.getsysip() logging.info('ip address of the system is.... %s'%ip) url = "http://%s:8080/restconf/operations/network-topology-pcep:add-lsp"%ip
client = requests.Session() client.auth=("admin","admin") client.verify=False headers={'Content-Type':'application/xml','Accept':'application/xml'}
foo=open("PCEPtestCase6LSPinstantiation.xml","r") text=foo.read()
response=client.post(url, headers=headers, data=text) logging.info('printing rest-put response... %s'%response)
resp=client.get(url, headers=headers)
logging.info('printing rest-get response... %s'%resp) data=resp.content logging.info('open file to write the result...') fp = open("out.txt",'w') fp.write(data) logging.info('closing the opend file.......') fp.close()
please suggest the answers?