示例#1
0
 def putTopo(self, odlJson):
     requestURI = (url + 'topology/default/userLink/' + odlJson.getTopoName())
     req = requests.put(requestURI, data = odlJson.getJson(),  headers = {'Content-Type': 'application/json'}, auth=auth)
     return req.text
示例#2
0
 def putFlow(self, odlJson):
     requestURI = (url + 'flowprogrammer/default/node/' + odlJson.getSwitchType() + '/' + odlJson.getSwitchId() + '/staticFlow/' + odlJson.getName())
     req = requests.put(requestURI, data = odlJson.getJson(),  headers = {'Content-Type': 'application/json'}, auth=auth)
     return req.text
示例#3
0
 def putHost(self, odlJson):
     requestURI = (url + 'hosttracker/default/address/' + odlJson.getHostIp())
     req = requests.put(requestURI, data = odlJson.getJson(),  headers = {'Content-Type': 'application/json'}, auth=auth)
     return req.text