aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/Microsoft/hcsshim/hnspolicy.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/Microsoft/hcsshim/hnspolicy.go')
-rw-r--r--vendor/github.com/Microsoft/hcsshim/hnspolicy.go152
1 files changed, 57 insertions, 95 deletions
diff --git a/vendor/github.com/Microsoft/hcsshim/hnspolicy.go b/vendor/github.com/Microsoft/hcsshim/hnspolicy.go
index ecfbf0eda..a3e03ff8f 100644
--- a/vendor/github.com/Microsoft/hcsshim/hnspolicy.go
+++ b/vendor/github.com/Microsoft/hcsshim/hnspolicy.go
@@ -1,95 +1,57 @@
-package hcsshim
-
-// Type of Request Support in ModifySystem
-type PolicyType string
-
-// RequestType const
-const (
- Nat PolicyType = "NAT"
- ACL PolicyType = "ACL"
- PA PolicyType = "PA"
- VLAN PolicyType = "VLAN"
- VSID PolicyType = "VSID"
- VNet PolicyType = "VNET"
- L2Driver PolicyType = "L2Driver"
- Isolation PolicyType = "Isolation"
- QOS PolicyType = "QOS"
- OutboundNat PolicyType = "OutBoundNAT"
- ExternalLoadBalancer PolicyType = "ELB"
- Route PolicyType = "ROUTE"
-)
-
-type NatPolicy struct {
- Type PolicyType `json:"Type"`
- Protocol string
- InternalPort uint16
- ExternalPort uint16
-}
-
-type QosPolicy struct {
- Type PolicyType `json:"Type"`
- MaximumOutgoingBandwidthInBytes uint64
-}
-
-type IsolationPolicy struct {
- Type PolicyType `json:"Type"`
- VLAN uint
- VSID uint
- InDefaultIsolation bool
-}
-
-type VlanPolicy struct {
- Type PolicyType `json:"Type"`
- VLAN uint
-}
-
-type VsidPolicy struct {
- Type PolicyType `json:"Type"`
- VSID uint
-}
-
-type PaPolicy struct {
- Type PolicyType `json:"Type"`
- PA string `json:"PA"`
-}
-
-type OutboundNatPolicy struct {
- Policy
- VIP string `json:"VIP,omitempty"`
- Exceptions []string `json:"ExceptionList,omitempty"`
-}
-
-type ActionType string
-type DirectionType string
-type RuleType string
-
-const (
- Allow ActionType = "Allow"
- Block ActionType = "Block"
-
- In DirectionType = "In"
- Out DirectionType = "Out"
-
- Host RuleType = "Host"
- Switch RuleType = "Switch"
-)
-
-type ACLPolicy struct {
- Type PolicyType `json:"Type"`
- Protocol uint16
- InternalPort uint16
- Action ActionType
- Direction DirectionType
- LocalAddress string
- RemoteAddress string
- LocalPort uint16
- RemotePort uint16
- RuleType RuleType `json:"RuleType,omitempty"`
-
- Priority uint16
- ServiceName string
-}
-
-type Policy struct {
- Type PolicyType `json:"Type"`
-}
+package hcsshim
+
+import (
+ "github.com/Microsoft/hcsshim/internal/hns"
+)
+
+// Type of Request Support in ModifySystem
+type PolicyType = hns.PolicyType
+
+// RequestType const
+const (
+ Nat = hns.Nat
+ ACL = hns.ACL
+ PA = hns.PA
+ VLAN = hns.VLAN
+ VSID = hns.VSID
+ VNet = hns.VNet
+ L2Driver = hns.L2Driver
+ Isolation = hns.Isolation
+ QOS = hns.QOS
+ OutboundNat = hns.OutboundNat
+ ExternalLoadBalancer = hns.ExternalLoadBalancer
+ Route = hns.Route
+)
+
+type NatPolicy = hns.NatPolicy
+
+type QosPolicy = hns.QosPolicy
+
+type IsolationPolicy = hns.IsolationPolicy
+
+type VlanPolicy = hns.VlanPolicy
+
+type VsidPolicy = hns.VsidPolicy
+
+type PaPolicy = hns.PaPolicy
+
+type OutboundNatPolicy = hns.OutboundNatPolicy
+
+type ActionType = hns.ActionType
+type DirectionType = hns.DirectionType
+type RuleType = hns.RuleType
+
+const (
+ Allow = hns.Allow
+ Block = hns.Block
+
+ In = hns.In
+ Out = hns.Out
+
+ Host = hns.Host
+ Switch = hns.Switch
+)
+
+type ACLPolicy = hns.ACLPolicy
+
+type Policy = hns.Policy