def configLoopbackPort(self, portList='all', enabled=True): """ Description Configure port to loopback. Parameters portList: <'all'|list of ports>: : Format: [[ixChassisIp, str(cardNumber1), str(portNumber1])]...] Or if portList ='all', will modify all assigned ports to the specified mediaType. enabled: : True=Enable port to loopback mode. """ response = self.ixnObj.get(self.ixnObj.sessionUrl+'/vport') if portList == 'all': portList = self.getPhysicalPortsFromCreatedVports() vportList = self.getVportFromPortList(portList) for vport in vportList: response = self.ixnObj.get(self.ixnObj.httpHeader+vport+'/l1Config', silentMode=False) currentPortType = response.json()['currentType'] self.ixnObj.patch(self.ixnObj.httpHeader+vport+'/l1Config/'+currentPortType, data={'loopback': enabled})