Skip to content
Merged
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
10 changes: 10 additions & 0 deletions hcn/hcnnetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ import (
"github.com/sirupsen/logrus"
)

// SubnetFlags represents the flags that can be set on a subnet
type SubnetFlags uint32

// SubnetFlags constants (based on HNS API documentation)
const (
SubnetFlagsNone SubnetFlags = 0
SubnetFlagsDoNotReserveGatewayAddress SubnetFlags = 1 // This flag is needed to support scenario GatewayAddress == ManagementIP
)

// Route is associated with a subnet.
type Route struct {
NextHop string `json:",omitempty"`
Expand All @@ -23,6 +32,7 @@ type Subnet struct {
IpAddressPrefix string `json:",omitempty"`
Policies []json.RawMessage `json:",omitempty"`
Routes []Route `json:",omitempty"`
Flags SubnetFlags `json:",omitempty"`
}

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