def configIp(self, searchName, **data): """ Modify the existing network IP. Parameters searchName: The name of the rangeList to modify. **date: : View below options Path /ixLoad/test/activeTest/communityList//network/stack/childrenList//childrenList//rangeList' Options: ipType = 'IPv4' ipAddress = '1.1.1.1' gatewayAddress = '1.1.1.2' gatewayIncrement = '0.0.0.0' incrementBy = '0.0.0.1' prefix = 24 count = 100 enableGatewayArp = name = The name of the network range to modify Usage: restObj.configIp(searchName='IP-R1', ipAddress='10.10.10.1', gatewayAddress='10.10.10.101') """ searchNameExists = False url = self.sessionIdUrl+'/ixLoad/test/activeTest/communityList' response = self.get(url) for communityList in response.json(): for link in communityList['links']: if link['rel'] == 'network': # Get: /api/v0/sessions/15/ixLoad/test/activeTest/communityList/0/network networkHref = link['href'] url = self.httpHeader + networkHref + '/stack/childrenList' response = self.get(url) for childrenList in response.json(): for childrenListLink in childrenList['links']: if childrenListLink['rel'] == 'childrenList': childrenListHref = childrenListLink['href'] url = self.httpHeader + childrenListHref response = self.get(url) # GET: /ixLoad/test/activeTest/communityList/1/network/stack/childrenList/5/childrenList/6/rangeList for childrenList2 in response.json(): for childrenListLink2 in childrenList2['links']: if childrenListLink2['rel'] == 'rangeList': rangeListHref = childrenListLink2['href'] url = self.httpHeader + rangeListHref response = self.get(url) for ipRange in response.json(): if response.json()[0]['name'] == searchName: self.logInfo('configIp: {}'.format(data)) self.patch(url, data=(data)) searchNameExists = True if searchNameExists == False: self.logError('configIp: No name found: {}'.format(searchName))