diff --git a/acitoolkit/acitoolkit.py b/acitoolkit/acitoolkit.py index 3c4b0f61..c7063835 100755 --- a/acitoolkit/acitoolkit.py +++ b/acitoolkit/acitoolkit.py @@ -5385,7 +5385,13 @@ def _get(session, endpoint_name, interfaces, endpoints, epg = EPG(str(ep['dn']).split('/')[3][4:], app_profile) endpoint = Endpoint(str(ep['name']), parent=epg) endpoint.mac = str(ep['mac']) - endpoint.ip = str(ep['ip']) + try: + endpoint.ip = str(ep['ip']) + except KeyError: + for child in children: + if "fvIp" in child: + endpoint.ip = str(child['fvIp']['attributes']['addr']) + break endpoint.encap = str(ep['encap']) endpoint.timestamp = str(ep['modTs']) for child in children: