vendor: bump all direct dependencies

Just good hygiene.

Signed-off-by: Casey Callendrello <cdc@redhat.com>
This commit is contained in:
Casey Callendrello
2021-08-10 14:41:02 +02:00
parent 9b1666d489
commit 0818512c7a
519 changed files with 11418 additions and 17360 deletions

View File

@ -3,6 +3,7 @@
package hcn
import (
"encoding/json"
"fmt"
"syscall"
@ -93,12 +94,12 @@ type HostComputeQuery struct {
}
type ExtraParams struct {
Resources interface{} `json:",omitempty"`
SharedContainers interface{} `json:",omitempty"`
LayeredOn string `json:",omitempty"`
SwitchGuid string `json:",omitempty"`
UtilityVM string `json:",omitempty"`
VirtualMachine string `json:",omitempty"`
Resources json.RawMessage `json:",omitempty"`
SharedContainers json.RawMessage `json:",omitempty"`
LayeredOn string `json:",omitempty"`
SwitchGuid string `json:",omitempty"`
UtilityVM string `json:",omitempty"`
VirtualMachine string `json:",omitempty"`
}
type Health struct {
@ -239,6 +240,15 @@ func VxlanPortSupported() error {
return platformDoesNotSupportError("VXLAN port configuration")
}
// TierAclPolicySupported returns an error if the HCN version does not support configuring the TierAcl.
func TierAclPolicySupported() error {
supported := GetSupportedFeatures()
if supported.TierAcl {
return nil
}
return platformDoesNotSupportError("TierAcl")
}
// RequestType are the different operations performed to settings.
// Used to update the settings of Endpoint/Namespace objects.
type RequestType string

View File

@ -37,6 +37,7 @@ type HostComputeEndpoint struct {
Routes []Route `json:",omitempty"`
MacAddress string `json:",omitempty"`
Flags EndpointFlags `json:",omitempty"`
Health Health `json:",omitempty"`
SchemaVersion SchemaVersion `json:",omitempty"`
}
@ -58,6 +59,13 @@ type ModifyEndpointSettingRequest struct {
Settings json.RawMessage `json:",omitempty"`
}
// VmEndpointRequest creates a switch port with identifier `PortId`.
type VmEndpointRequest struct {
PortId guid.GUID `json:",omitempty"`
VirtualNicName string `json:",omitempty"`
VirtualMachineId guid.GUID `json:",omitempty"`
}
type PolicyEndpointRequest struct {
Policies []EndpointPolicy `json:",omitempty"`
}

View File

@ -53,10 +53,9 @@ var (
}
// HNS 12.0 allows for session affinity for loadbalancing
SessionAffinityVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 12, Minor: 0}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
// HNS 10.5 through 11 (not included) and 12.0+ supports Ipv6 dual stack.
// HNS 11.10+ supports Ipv6 dual stack.
IPv6DualStackVersion = VersionRanges{
VersionRange{MinVersion: Version{Major: 10, Minor: 5}, MaxVersion: Version{Major: 10, Minor: math.MaxInt32}},
VersionRange{MinVersion: Version{Major: 12, Minor: 0}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}},
VersionRange{MinVersion: Version{Major: 11, Minor: 10}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}},
}
// HNS 13.0 allows for Set Policy support
SetPolicyVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 13, Minor: 0}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
@ -74,6 +73,9 @@ var (
//HNS 13.2 allows for L4WfpProxy Policy support
L4WfpProxyPolicyVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 13, Minor: 2}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
//HNS 14.0 allows for TierAcl Policy support
TierAclPolicyVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 14, Minor: 0}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
)
// GetGlobals returns the global properties of the HCN Service.

View File

@ -36,6 +36,7 @@ var (
LoadBalancerFlagsNone LoadBalancerFlags = 0
// LoadBalancerFlagsDSR enables Direct Server Return (DSR)
LoadBalancerFlagsDSR LoadBalancerFlags = 1
LoadBalancerFlagsIPv6 LoadBalancerFlags = 2
)
// LoadBalancerPortMappingFlags are special settings on a loadbalancer.

View File

@ -23,6 +23,7 @@ const (
// Endpoint and Network have InterfaceConstraint and ProviderAddress
NetworkProviderAddress EndpointPolicyType = "ProviderAddress"
NetworkInterfaceConstraint EndpointPolicyType = "InterfaceConstraint"
TierAcl EndpointPolicyType = "TierAcl"
)
// EndpointPolicy is a collection of Policy settings for an Endpoint.
@ -75,6 +76,12 @@ type SubnetPolicy struct {
// NatFlags are flags for portmappings.
type NatFlags uint32
const (
NatFlagsNone NatFlags = iota
NatFlagsLocalRoutedVip
NatFlagsIPv6
)
/// Endpoint Policy objects
// PortMappingPolicySetting defines Port Mapping (NAT)
@ -100,6 +107,8 @@ const (
ActionTypeAllow ActionType = "Allow"
// Block traffic
ActionTypeBlock ActionType = "Block"
// Pass traffic
ActionTypePass ActionType = "Pass"
// In is traffic coming to the Endpoint
DirectionTypeIn DirectionType = "In"
@ -135,6 +144,7 @@ type OutboundNatPolicySetting struct {
VirtualIP string `json:",omitempty"`
Exceptions []string `json:",omitempty"`
Destinations []string `json:",omitempty"`
Flags NatFlags `json:",omitempty"`
}
// SDNRoutePolicySetting sets SDN Route on an Endpoint.
@ -154,12 +164,20 @@ type FiveTuple struct {
Priority uint16 `json:",omitempty"`
}
// ProxyExceptions exempts traffic to IpAddresses and Ports
type ProxyExceptions struct {
IpAddressExceptions []string `json:",omitempty"`
PortExceptions []string `json:",omitempty"`
}
// L4WfpProxyPolicySetting sets Layer-4 Proxy on an endpoint.
type L4WfpProxyPolicySetting struct {
InboundProxyPort string `json:",omitempty"`
OutboundProxyPort string `json:",omitempty"`
FilterTuple FiveTuple `json:",omitempty"`
UserSID string `json:",omitempty"`
InboundProxyPort string `json:",omitempty"`
OutboundProxyPort string `json:",omitempty"`
FilterTuple FiveTuple `json:",omitempty"`
UserSID string `json:",omitempty"`
InboundExceptions ProxyExceptions `json:",omitempty"`
OutboundExceptions ProxyExceptions `json:",omitempty"`
}
// PortnameEndpointPolicySetting sets the port name for an endpoint.
@ -289,3 +307,23 @@ type L4ProxyPolicySetting struct {
Destination string
OutboundNAT bool `json:",omitempty"`
}
// TierAclRule represents an ACL within TierAclPolicySetting
type TierAclRule struct {
Id string `json:",omitempty"`
Protocols string `json:",omitempty"`
TierAclRuleAction ActionType `json:","`
LocalAddresses string `json:",omitempty"`
RemoteAddresses string `json:",omitempty"`
LocalPorts string `json:",omitempty"`
RemotePorts string `json:",omitempty"`
Priority uint16 `json:",omitempty"`
}
// TierAclPolicySetting represents a Tier containing ACLs
type TierAclPolicySetting struct {
Name string `json:","`
Direction DirectionType `json:","`
Order uint16 `json:""`
TierAclRules []TierAclRule `json:",omitempty"`
}

View File

@ -19,6 +19,7 @@ type SupportedFeatures struct {
VxlanPort bool `json:"VxlanPort"`
L4Proxy bool `json:"L4Proxy"` // network policy that applies VFP rules to all endpoints on the network to redirect traffic
L4WfpProxy bool `json:"L4WfpProxy"` // endpoint policy that applies WFP filters to redirect traffic to/from that endpoint
TierAcl bool `json:"TierAcl"`
}
// AclFeatures are the supported ACL possibilities.
@ -69,6 +70,7 @@ func GetSupportedFeatures() SupportedFeatures {
features.VxlanPort = isFeatureSupported(globals.Version, VxlanPortVersion)
features.L4Proxy = isFeatureSupported(globals.Version, L4ProxyPolicyVersion)
features.L4WfpProxy = isFeatureSupported(globals.Version, L4WfpProxyPolicyVersion)
features.TierAcl = isFeatureSupported(globals.Version, TierAclPolicyVersion)
return features
}