build(deps): bump the golang group with 2 updates
Bumps the golang group with 2 updates: [github.com/Microsoft/hcsshim](https://github.com/Microsoft/hcsshim) and [github.com/safchain/ethtool](https://github.com/safchain/ethtool). Updates `github.com/Microsoft/hcsshim` from 0.12.3 to 0.12.4 - [Release notes](https://github.com/Microsoft/hcsshim/releases) - [Commits](https://github.com/Microsoft/hcsshim/compare/v0.12.3...v0.12.4) Updates `github.com/safchain/ethtool` from 0.4.0 to 0.4.1 - [Release notes](https://github.com/safchain/ethtool/releases) - [Commits](https://github.com/safchain/ethtool/compare/v0.4.0...v0.4.1) --- updated-dependencies: - dependency-name: github.com/Microsoft/hcsshim dependency-type: direct:production update-type: version-update:semver-patch dependency-group: golang - dependency-name: github.com/safchain/ethtool dependency-type: direct:production update-type: version-update:semver-patch dependency-group: golang ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
12
vendor/github.com/Microsoft/hcsshim/hcn/hcn.go
generated
vendored
12
vendor/github.com/Microsoft/hcsshim/hcn/hcn.go
generated
vendored
@ -264,6 +264,18 @@ func SetPolicySupported() error {
|
||||
return platformDoesNotSupportError("SetPolicy")
|
||||
}
|
||||
|
||||
// ModifyLoadbalancerSupported returns an error if the HCN version does not support ModifyLoadbalancer.
|
||||
func ModifyLoadbalancerSupported() error {
|
||||
supported, err := GetCachedSupportedFeatures()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if supported.ModifyLoadbalancer {
|
||||
return nil
|
||||
}
|
||||
return platformDoesNotSupportError("ModifyLoadbalancer")
|
||||
}
|
||||
|
||||
// VxlanPortSupported returns an error if the HCN version does not support configuring the VXLAN TCP port.
|
||||
func VxlanPortSupported() error {
|
||||
supported, err := GetCachedSupportedFeatures()
|
||||
|
5
vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go
generated
vendored
5
vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go
generated
vendored
@ -52,6 +52,7 @@ type ErrorCode uint32
|
||||
const (
|
||||
ERROR_NOT_FOUND = ErrorCode(windows.ERROR_NOT_FOUND)
|
||||
HCN_E_PORT_ALREADY_EXISTS ErrorCode = ErrorCode(windows.HCN_E_PORT_ALREADY_EXISTS)
|
||||
HCN_E_NOTIMPL ErrorCode = ErrorCode(windows.E_NOTIMPL)
|
||||
)
|
||||
|
||||
type HcnError struct {
|
||||
@ -79,6 +80,10 @@ func IsPortAlreadyExistsError(err error) bool {
|
||||
return CheckErrorWithCode(err, HCN_E_PORT_ALREADY_EXISTS)
|
||||
}
|
||||
|
||||
func IsNotImplemented(err error) bool {
|
||||
return CheckErrorWithCode(err, HCN_E_NOTIMPL)
|
||||
}
|
||||
|
||||
func new(hr error, title string, rest string) error {
|
||||
err := &HcnError{}
|
||||
hcsError := hcserror.New(hr, title, rest)
|
||||
|
2
vendor/github.com/Microsoft/hcsshim/hcn/hcnglobals.go
generated
vendored
2
vendor/github.com/Microsoft/hcsshim/hcn/hcnglobals.go
generated
vendored
@ -87,6 +87,8 @@ var (
|
||||
|
||||
//HNS 15.1 allows support for DisableHostPort flag.
|
||||
DisableHostPortVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 15, Minor: 1}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
|
||||
// HNS 15.4 allows for Modify Loadbalancer support
|
||||
ModifyLoadbalancerVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 15, Minor: 4}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}}
|
||||
)
|
||||
|
||||
// GetGlobals returns the global properties of the HCN Service.
|
||||
|
60
vendor/github.com/Microsoft/hcsshim/hcn/hcnloadbalancer.go
generated
vendored
60
vendor/github.com/Microsoft/hcsshim/hcn/hcnloadbalancer.go
generated
vendored
@ -163,6 +163,49 @@ func createLoadBalancer(settings string) (*HostComputeLoadBalancer, error) {
|
||||
return &outputLoadBalancer, nil
|
||||
}
|
||||
|
||||
func updateLoadBalancer(loadbalancerId string, settings string) (*HostComputeLoadBalancer, error) {
|
||||
loadBalancerGuid, err := guid.FromString(loadbalancerId)
|
||||
if err != nil {
|
||||
return nil, errInvalidLoadBalancerID
|
||||
}
|
||||
// Update loadBalancer.
|
||||
var (
|
||||
loadBalancerHandle hcnLoadBalancer
|
||||
resultBuffer *uint16
|
||||
propertiesBuffer *uint16
|
||||
)
|
||||
hr := hcnOpenLoadBalancer(&loadBalancerGuid, &loadBalancerHandle, &resultBuffer)
|
||||
if err := checkForErrors("hcnOpenLoadBalancer", hr, resultBuffer); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
hr = hcnModifyLoadBalancer(loadBalancerHandle, settings, &resultBuffer)
|
||||
if err := checkForErrors("hcnModifyLoadBalancer", hr, resultBuffer); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Query loadBalancer.
|
||||
hcnQuery := defaultQuery()
|
||||
query, err := json.Marshal(hcnQuery)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
hr = hcnQueryLoadBalancerProperties(loadBalancerHandle, string(query), &propertiesBuffer, &resultBuffer)
|
||||
if err := checkForErrors("hcnQueryLoadBalancerProperties", hr, resultBuffer); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
properties := interop.ConvertAndFreeCoTaskMemString(propertiesBuffer)
|
||||
// Close loadBalancer.
|
||||
hr = hcnCloseLoadBalancer(loadBalancerHandle)
|
||||
if err := checkForErrors("hcnCloseLoadBalancer", hr, nil); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Convert output to HostComputeLoadBalancer
|
||||
var outputLoadBalancer HostComputeLoadBalancer
|
||||
if err := json.Unmarshal([]byte(properties), &outputLoadBalancer); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &outputLoadBalancer, nil
|
||||
}
|
||||
|
||||
func deleteLoadBalancer(loadBalancerID string) error {
|
||||
loadBalancerGUID, err := guid.FromString(loadBalancerID)
|
||||
if err != nil {
|
||||
@ -237,6 +280,23 @@ func (loadBalancer *HostComputeLoadBalancer) Create() (*HostComputeLoadBalancer,
|
||||
return loadBalancer, nil
|
||||
}
|
||||
|
||||
// Update Loadbalancer.
|
||||
func (loadBalancer *HostComputeLoadBalancer) Update(hnsLoadbalancerID string) (*HostComputeLoadBalancer, error) {
|
||||
logrus.Debugf("hcn::HostComputeLoadBalancer::Create id=%s", hnsLoadbalancerID)
|
||||
|
||||
jsonString, err := json.Marshal(loadBalancer)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
logrus.Debugf("hcn::HostComputeLoadBalancer::Update JSON: %s", jsonString)
|
||||
loadBalancer, hcnErr := updateLoadBalancer(hnsLoadbalancerID, string(jsonString))
|
||||
if hcnErr != nil {
|
||||
return nil, hcnErr
|
||||
}
|
||||
return loadBalancer, nil
|
||||
}
|
||||
|
||||
// Delete LoadBalancer.
|
||||
func (loadBalancer *HostComputeLoadBalancer) Delete() error {
|
||||
logrus.Debugf("hcn::HostComputeLoadBalancer::Delete id=%s", loadBalancer.Id)
|
||||
|
9
vendor/github.com/Microsoft/hcsshim/hcn/hcnpolicy.go
generated
vendored
9
vendor/github.com/Microsoft/hcsshim/hcn/hcnpolicy.go
generated
vendored
@ -144,10 +144,11 @@ type QosPolicySetting struct {
|
||||
|
||||
// OutboundNatPolicySetting sets outbound Network Address Translation on an Endpoint.
|
||||
type OutboundNatPolicySetting struct {
|
||||
VirtualIP string `json:",omitempty"`
|
||||
Exceptions []string `json:",omitempty"`
|
||||
Destinations []string `json:",omitempty"`
|
||||
Flags NatFlags `json:",omitempty"`
|
||||
VirtualIP string `json:",omitempty"`
|
||||
Exceptions []string `json:",omitempty"`
|
||||
Destinations []string `json:",omitempty"`
|
||||
Flags NatFlags `json:",omitempty"`
|
||||
MaxPortPoolUsage uint16 `json:",omitempty"`
|
||||
}
|
||||
|
||||
// SDNRoutePolicySetting sets SDN Route on an Endpoint.
|
||||
|
2
vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport.go
generated
vendored
2
vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport.go
generated
vendored
@ -38,6 +38,7 @@ type SupportedFeatures struct {
|
||||
NetworkACL bool `json:"NetworkACL"`
|
||||
NestedIpSet bool `json:"NestedIpSet"`
|
||||
DisableHostPort bool `json:"DisableHostPort"`
|
||||
ModifyLoadbalancer bool `json:"ModifyLoadbalancer"`
|
||||
}
|
||||
|
||||
// AclFeatures are the supported ACL possibilities.
|
||||
@ -116,6 +117,7 @@ func getSupportedFeatures() (SupportedFeatures, error) {
|
||||
features.NetworkACL = isFeatureSupported(globals.Version, NetworkACLPolicyVersion)
|
||||
features.NestedIpSet = isFeatureSupported(globals.Version, NestedIpSetVersion)
|
||||
features.DisableHostPort = isFeatureSupported(globals.Version, DisableHostPortVersion)
|
||||
features.ModifyLoadbalancer = isFeatureSupported(globals.Version, ModifyLoadbalancerVersion)
|
||||
|
||||
log.L.WithFields(logrus.Fields{
|
||||
"version": globals.Version,
|
||||
|
7
vendor/github.com/Microsoft/hcsshim/internal/hns/hnspolicy.go
generated
vendored
7
vendor/github.com/Microsoft/hcsshim/internal/hns/hnspolicy.go
generated
vendored
@ -57,9 +57,10 @@ type PaPolicy struct {
|
||||
|
||||
type OutboundNatPolicy struct {
|
||||
Policy
|
||||
VIP string `json:"VIP,omitempty"`
|
||||
Exceptions []string `json:"ExceptionList,omitempty"`
|
||||
Destinations []string `json:",omitempty"`
|
||||
VIP string `json:"VIP,omitempty"`
|
||||
Exceptions []string `json:"ExceptionList,omitempty"`
|
||||
Destinations []string `json:",omitempty"`
|
||||
MaxPortPoolUsage uint16 `json:",omitempty"`
|
||||
}
|
||||
|
||||
type ProxyPolicy struct {
|
||||
|
Reference in New Issue
Block a user