def sendMldJoinNgpf(self, mldObj, ipv6AddressList): """ Description For IPv6 only. This API will take the MLD object and loop through all the configured ports looking for the specified ipv6Address to send a join. Parameter ipv6AddressList: 'all' or a list of IPv6 addresses that must be EXACTLY how it is configured on the GUI. """ # Loop all port objects to get user specified IPv6 address to send the join. portObjectList = mldObj+'/mldMcastIPv6GroupList/port' response = self.ixnObj.get(portObjectList) for eachPortIdDetails in response.json(): currentPortId = eachPortIdDetails['id'] # For each ID, get the 'startMcastAddr' multivalue startMcastAddrMultivalue = eachPortIdDetails['startMcastAddr'] # Go to the multivalue and get the 'values' response = self.ixnObj.get(self.ixnObj.httpHeader+startMcastAddrMultivalue) listOfConfiguredGroupIpAddresses = response.json()['values'] if ipv6AddressList == 'all': listOfGroupAddresses = listOfConfiguredGroupIpAddresses else: listOfGroupAddresses = ipv6AddressList for eachSpecifiedIpv6Addr in listOfGroupAddresses: if eachSpecifiedIpv6Addr in listOfConfiguredGroupIpAddresses: # if 'values' match ipv4Address, do a join on: # http://192.168.70.127.:11009/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv6/2/mldHost/1/mldMcastIPv6GroupList/port/1/operations/mldjoingroup # arg1: port/1 object url = mldObj+'/mldMcastIPv6GroupList/port/%s/operations/mldjoingroup' % currentPortId portIdObj = mldObj+'/mldMcastIPv6GroupList/port/%s' % currentPortId # portIdObj = http:/{apiServerIp:port}/api/v1/sessions/1/ixnetwork/topology/1/deviceGroup/1/ethernet/1/ipv6/2/mldHost/1/mldMcastIPv6GroupList/port/1 response = self.ixnObj.post(url, data={'arg1': [portIdObj]}) self.ixnObj.waitForComplete(response, url+response.json()['id'])