def getIpObjectsByTopologyObject(self, topologyObj, ipType='ipv4'): """ Description Get all the Topology's IPv4 or IPv6 objects based on the specified topology object. Parameters ipType = ipv4 or ipv6 """ ipObjList = [] deviceGroupResponse = self.ixnObj.get(topologyObj+'/deviceGroup') deviceGroupList = ['%s/%s/%s' % (topologyObj, 'deviceGroup', str(i["id"])) for i in deviceGroupResponse.json()] for deviceGroup in deviceGroupList: response = self.ixnObj.get(deviceGroup+'/ethernet') ethernetList = ['%s/%s/%s' % (deviceGroup, 'ethernet', str(i["id"])) for i in response.json()] for ethernet in ethernetList: response = self.ixnObj.get(ethernet+'/{0}'.format(ipType)) ipObjList = ['%s/%s/%s' % (ethernet, 'ipv4', str(i["id"])) for i in response.json()] return ipObjList