def releaseAllPorts(self): """ Description Release all the connected ports. """ response = self.ixnObj.get(self.ixnObj.sessionUrl+'/vport') vportList = ["%s/vport/%s" % (self.ixnObj.sessionUrl, str(i["id"])) for i in response.json()] url = self.ixnObj.sessionUrl+'/vport/operations/releaseport' response = self.ixnObj.post(url, data={'arg1': vportList}) if response.json()['state'] == 'SUCCESS': return 0 if response.json()['id'] != '': self.ixnObj.waitForComplete(response, url+'/'+response.json()['id'], timeout=120)