def modifyTopologyPortsNgpf(self, topologyObj, portList, topologyName=None): """ Description Add/remove Topology ports. Parameters topologyObj: : The Topology Group object. portList: : A list of all the ports that you want for the Topology even if the port exists in the Topology. topologyName: : The Topology Group name to modify. Requirements: 1> You must have already connected all the required ports for your configuration. Otherwise, adding additional port(s) that doesn't exists in your configuration's assigned port list will not work. 2> This API requires getVports() Examples topologyObj = '/api/v1/sessions/1/ixnetwork/topology/1' portList format = [(str(chassisIp), str(slotNumber), str(portNumber))] Example 1: [ ['192.168.70.10', '1', '1'] ] Example 2: [ ['192.168.70.10', '1', '1'], ['192.168.70.10', '2', '1'] ] """ vportList = self.portMgmtObj.getVports(portList) if len(vportList) != len(portList): raise IxNetRestApiException('modifyTopologyPortsNgpf: There is not enough vports created to match the number of ports.') self.ixnObj.logInfo('vportList: %s' % vportList) topologyData = {'vports': vportList} response = self.ixnObj.patch(self.ixnObj.httpHeader+topologyObj, data=topologyData)