Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

extract ipaddresses from multiple subnet participation #767

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pyvcloud/vcd/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ def list_external_network_ip_allocations(self):
for inf in gateway.Configuration.GatewayInterfaces.GatewayInterface:
if inf.InterfaceType.text == 'uplink':
ips = out.setdefault(inf.Name.text, [])
ips.append(inf.SubnetParticipation.IpAddress.text)
for subnet_participation in inf.SubnetParticipation:
if hasattr(subnet_participation, 'IpAddress'):
ips.append(subnet_participation.IpAddress.text)
return out

def redeploy(self):
Expand Down