Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
Signed-off-by: abarreiro <abarreiro@vmware.com>
  • Loading branch information
adambarreiro committed Jun 13, 2024
1 parent 4dadf0d commit 9423b82
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions govcd/vapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -944,15 +944,15 @@ func (vapp *VApp) CreateVappNetworkAsync(newNetworkSettings *VappNetworkSettings
Features: networkFeatures,
IPScopes: &types.IPScopes{
IPScope: []*types.IPScope{{
IsInherited: false,
Gateway: newNetworkSettings.Gateway,
Netmask: newNetworkSettings.NetMask,
SubnetPrefixLengthString: newNetworkSettings.SubnetPrefixLength,
DNS1: newNetworkSettings.DNS1,
DNS2: newNetworkSettings.DNS2,
DNSSuffix: newNetworkSettings.DNSSuffix,
IsEnabled: true,
IPRanges: &types.IPRanges{IPRange: newNetworkSettings.StaticIPRanges}}}},
IsInherited: false,
Gateway: newNetworkSettings.Gateway,
Netmask: newNetworkSettings.NetMask,
SubnetPrefixLength: newNetworkSettings.SubnetPrefixLength,
DNS1: newNetworkSettings.DNS1,
DNS2: newNetworkSettings.DNS2,
DNSSuffix: newNetworkSettings.DNSSuffix,
IsEnabled: true,
IPRanges: &types.IPRanges{IPRange: newNetworkSettings.StaticIPRanges}}}},
RetainNetInfoAcrossDeployments: newNetworkSettings.RetainIpMacEnabled,
},
IsDeployed: false,
Expand Down
2 changes: 1 addition & 1 deletion govcd/vapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ func (vcd *TestVCD) Test_AddAndRemoveIsolatedVappNetworkIpv6(check *C) {

check.Assert(networkFound.Description, Equals, description)
check.Assert(networkFound.Configuration.IPScopes.IPScope[0].Gateway, Equals, gateway)
check.Assert(networkFound.Configuration.IPScopes.IPScope[0].SubnetPrefixLengthString, Equals, prefixlength)
check.Assert(networkFound.Configuration.IPScopes.IPScope[0].SubnetPrefixLength, Equals, prefixlength)
check.Assert(networkFound.Configuration.IPScopes.IPScope[0].DNS1, Equals, dns1)
check.Assert(networkFound.Configuration.IPScopes.IPScope[0].DNS2, Equals, dns2)
check.Assert(networkFound.Configuration.IPScopes.IPScope[0].DNSSuffix, Equals, dnsSuffix)
Expand Down
24 changes: 12 additions & 12 deletions types/v56/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,18 +171,18 @@ type IPRanges struct {
// Description: Specify network settings like gateway, network mask, DNS servers, IP ranges, etc.
// Since: 0.9
type IPScope struct {
IsInherited bool `xml:"IsInherited" json:"isInherited,omitempty"` // True if the IP scope is inherit from parent network.
Gateway string `xml:"Gateway,omitempty" json:"gateway,omitempty"` // Gateway of the network.
Netmask string `xml:"Netmask,omitempty" json:"netmask,omitempty"` // Network mask.
SubnetPrefixLengthString string `xml:"SubnetPrefixLength,omitempty"` // Prefix length (as an string, used everywhere).
SubnetPrefixLengthInt *int `json:"subnetPrefixLength,omitempty"` // Prefix length (as an int, used in VDC Templates).
DNS1 string `xml:"Dns1,omitempty" json:"dns1,omitempty"` // Primary DNS server.
DNS2 string `xml:"Dns2,omitempty" json:"dns2,omitempty"` // Secondary DNS server.
DNSSuffix string `xml:"DnsSuffix,omitempty" json:"dnsSuffix,omitempty"` // DNS suffix.
IsEnabled bool `xml:"IsEnabled,omitempty" json:"isEnabled,omitempty"` // Indicates if subnet is enabled or not. Default value is True.
IPRanges *IPRanges `xml:"IpRanges,omitempty" json:"ipRanges,omitempty"` // IP ranges used for static pool allocation in the network.
AllocatedIPAddresses *IPAddresses `xml:"AllocatedIpAddresses,omitempty" json:"allocatedIPAddresses,omitempty"` // Read-only list of allocated IP addresses in the network.
SubAllocations *SubAllocations `xml:"SubAllocations,omitempty" json:"subAllocations,omitempty"` // Read-only list of IP addresses that are sub allocated to edge gateways.
IsInherited bool `xml:"IsInherited" json:"isInherited,omitempty"` // True if the IP scope is inherit from parent network.
Gateway string `xml:"Gateway,omitempty" json:"gateway,omitempty"` // Gateway of the network.
Netmask string `xml:"Netmask,omitempty" json:"netmask,omitempty"` // Network mask.
SubnetPrefixLength string `xml:"SubnetPrefixLength,omitempty"` // Prefix length (as an string, used everywhere).
SubnetPrefixLengthInt *int `json:"subnetPrefixLength,omitempty"` // Prefix length (as an int, used in VDC Templates).
DNS1 string `xml:"Dns1,omitempty" json:"dns1,omitempty"` // Primary DNS server.
DNS2 string `xml:"Dns2,omitempty" json:"dns2,omitempty"` // Secondary DNS server.
DNSSuffix string `xml:"DnsSuffix,omitempty" json:"dnsSuffix,omitempty"` // DNS suffix.
IsEnabled bool `xml:"IsEnabled,omitempty" json:"isEnabled,omitempty"` // Indicates if subnet is enabled or not. Default value is True.
IPRanges *IPRanges `xml:"IpRanges,omitempty" json:"ipRanges,omitempty"` // IP ranges used for static pool allocation in the network.
AllocatedIPAddresses *IPAddresses `xml:"AllocatedIpAddresses,omitempty" json:"allocatedIPAddresses,omitempty"` // Read-only list of allocated IP addresses in the network.
SubAllocations *SubAllocations `xml:"SubAllocations,omitempty" json:"subAllocations,omitempty"` // Read-only list of IP addresses that are sub allocated to edge gateways.
}

// SubAllocations a list of IP addresses that are sub allocated to edge gateways.
Expand Down

0 comments on commit 9423b82

Please sign in to comment.