Verification of LSP update of PCEP protocol in the ODL

asked 2017-07-31 06:44:01 -0800

purushotham gravatar image

Installed PCEP protocol plugins in the ODL. Post operation response, getting as 404 using RESTCONF in the python script. using below url url used:- /restconf/operations/network-topology-pcep:update-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:update-lsp"%ip

client = requests.Session() client.auth=("admin","admin") client.verify=False headers={'Content-Type':'application/xml','Accept':'application/xml'}

foo=open("PCEPtestCase5LSPupdate.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 quires?

edit retag flag offensive close merge delete