def getTopologyPorts(self, topologyObj): """ Description Get all the configured ports in the Topology. Parameter topologyObj: : /api/v1/sessions/1/ixnetwork/topology/1 Returns A list of ports: [('192.168.70.10', '1', '1') ('192.168.70.10', '1', '2')] """ topologyResponse = self.ixnObj.get(self.ixnObj.httpHeader+topologyObj) vportList = topologyResponse.json()['vports'] if vportList == []: self.ixnObj.logError('No vport is created') return 1 self.ixnObj.logInfo('vportList: %s' % vportList) portList = [] for vport in vportList: response = self.ixnObj.get(self.ixnObj.httpHeader+vport) # 192.168.70.10:1:1 currentPort = response.json()['assignedTo'] chassisIp = currentPort.split(':')[0] card = currentPort.split(':')[1] port = currentPort.split(':')[2] portList.append((chassisIp, card, port)) return portList