def getBgpObject(self, topologyName=None, bgpAttributeList=None): """ Description Get the BGP object from the specified Topology Group name and return the specified attributes Parameters topologyName: The Topology Group name bgpAttributeList: The BGP attributes to get. Example: bgpAttributeMultivalue = restObj.getBgpObject(topologyName='Topo1', bgpAttributeList=['flap', 'uptimeInSec', 'downtimeInSec']) restObj.configMultivalue(bgpAttributeMultivalue['flap'], multivalueType='valueList', data={'values': ['true', 'true']}) restObj.configMultivalue(bgpAttributeMultivalue['uptimeInSec'], multivalueType='singleValue', data={'value': '60'}) restObj.configMultivalue(bgpAttributeMultivalue['downtimeInSec'], multivalueType='singleValue', data={'value': '30'}) """ queryData = {'from': '/', 'nodes': [{'node': 'topology', 'properties': ['name'], 'where': [{'property': 'name', 'regex': topologyName}]}, {'node': 'deviceGroup', 'properties': [], 'where': []}, {'node': 'ethernet', 'properties': [], 'where': []}, {'node': 'ipv4', 'properties': [], 'where': []}, {'node': 'bgpIpv4Peer', 'properties': bgpAttributeList, 'where': []}] } queryResponse = self.ixnObj.query(data=queryData) try: bgpHostAttributes = queryResponse.json()['result'][0]['topology'][0]['deviceGroup'][0]['ethernet'][0]['ipv4'][0]['bgpIpv4Peer'][0] return bgpHostAttributes except IndexError: raise IxNetRestApiException('\nVerify the topologyName and bgpAttributeList input: {0} / {1}\n'.format(topologyName, bgpAttributeList))