Skip to content

Commit 296144f

Browse files
authored
added HCN subnet flags support (#2525)
Signed-off-by: daschott <daschott@microsoft.com>
1 parent 38c6693 commit 296144f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

hcn/hcnnetwork.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ import (
1111
"github.com/sirupsen/logrus"
1212
)
1313

14+
// SubnetFlags represents the flags that can be set on a subnet
15+
type SubnetFlags uint32
16+
17+
// SubnetFlags constants (based on HNS API documentation)
18+
const (
19+
SubnetFlagsNone SubnetFlags = 0
20+
SubnetFlagsDoNotReserveGatewayAddress SubnetFlags = 1 // This flag is needed to support scenario GatewayAddress == ManagementIP
21+
)
22+
1423
// Route is associated with a subnet.
1524
type Route struct {
1625
NextHop string `json:",omitempty"`
@@ -23,6 +32,7 @@ type Subnet struct {
2332
IpAddressPrefix string `json:",omitempty"`
2433
Policies []json.RawMessage `json:",omitempty"`
2534
Routes []Route `json:",omitempty"`
35+
Flags SubnetFlags `json:",omitempty"`
2636
}
2737

2838
// Ipam (Internet Protocol Address Management) is associated with a network

0 commit comments

Comments
 (0)