Skip to content
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
9 changes: 8 additions & 1 deletion aos/blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1984,6 +1984,7 @@ def create_virtual_network(
vn_type: VNType = VNType.vxlan,
vn_id: str = None,
tag_type: VNTagType = None,
ipv4_enabled: bool = True,
ipv4_subnet: str = None,
ipv4_gateway: str = None,
ipv6_enabled: bool = False,
Expand Down Expand Up @@ -2018,6 +2019,9 @@ def create_virtual_network(
(VNTagType) - (Optional) Default tag type.
['vlan_tagged', 'untagged', ''unassigned]
Default: None
ipv4_enabled
(bool) - (Optional) Enable or disable IPv4 on the virtual-network
Default: True
ipv4_subnet
(str) - (optional) IPV4 subnet assigned to virtual-network. If none
given the subnet will be assigned from resource pool
Expand Down Expand Up @@ -2062,12 +2066,15 @@ def create_virtual_network(
"vn_type": vn_type.value,
"vn_id": vn_id,
"bound_to": bound_to,
"ipv4_enabled": True,
"ipv4_enabled": ipv4_enabled,
"dhcp_service": "dhcpServiceEnabled",
"ipv4_subnet": ipv4_subnet,
"ipv4_gateway": ipv4_gateway,
}

if ipv4_enabled == False:
virt_net["dhcp_service"] = "dhcpServiceDisabled"

if ipv6_enabled:
virt_net["ipv6_subnet"] = ipv6_subnet
virt_net["ipv6_gateway"] = ipv6_gateway
Expand Down