def configBgpAsSetMode(self, routerId, asSetMode): """ Description Configure BGP Route Range AS Path: AS # Set Mode. This API will change all indexes to the specified asSetMode Note: In GUI, under Route Range, BGP IP Route Range. Parameters asSetMode: Options: "dontincludelocalas", "includelocalasasasseq", "includelocalasasasset", "includelocalasasasseqconfederation", "includelocalasasassetconfederation", "prependlocalastofirstsegment" """ deviceGroupObj = self.getDeviceGroupByRouterId(routerId=routerId) if deviceGroupObj == 0: raise IxNetRestApiException('No Device Group found for router ID: %s' % routerId) queryData = {'from': deviceGroupObj, 'nodes': [{'node': 'networkGroup', 'properties': [], 'where': []}, {'node': 'ipv4PrefixPools', 'properties': [], 'where': []}, {'node': 'bgpIPRouteProperty', 'properties': [], 'where': []}] } queryResponse = self.ixnObj.query(data=queryData) bgpStack = queryResponse.json()['result'][0]['networkGroup'][0]['ipv4PrefixPools'][0]['bgpIPRouteProperty'] if bgpStack == []: return IxNetRestApiException('No ipv4PrefixPools bgpIPRouteProperty object found.') bgpRouteObj = bgpStack[0]['href'] response = self.ixnObj.get(self.ixnObj.httpHeader+bgpRouteObj) asSetModeMultivalue = response.json()['asSetMode'] count = response.json()['count'] newList = [asSetMode for counter in range(0,count)] self.ixnObj.configMultivalue(asSetModeMultivalue, 'valueList', {'values': newList})