hnswrapper

package
v1.4.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeEndpointPolicy

type FakeEndpointPolicy struct {
	ID              string            `json:",omitempty"`
	Protocols       string            `json:",omitempty"` // EX: 6 (TCP), 17 (UDP), 1 (ICMPv4), 58 (ICMPv6), 2 (IGMP)
	Action          hcn.ActionType    `json:","`
	Direction       hcn.DirectionType `json:","`
	LocalAddresses  string            `json:",omitempty"`
	RemoteAddresses string            `json:",omitempty"`
	LocalPorts      string            `json:",omitempty"`
	RemotePorts     string            `json:",omitempty"`
	Priority        int               `json:",omitempty"`
}

type FakeHNSCache

type FakeHNSCache struct {
	// contains filtered or unexported fields
}

func (FakeHNSCache) ACLPolicies

func (fCache FakeHNSCache) ACLPolicies(epList map[string]string, policyID string) (map[string][]*FakeEndpointPolicy, error)

func (FakeHNSCache) GetAllACLs

func (fCache FakeHNSCache) GetAllACLs() map[string][]*FakeEndpointPolicy

func (FakeHNSCache) SetPolicy

func (fCache FakeHNSCache) SetPolicy(setID string) *hcn.SetPolicySetting

type FakeHostComputeEndpoint

type FakeHostComputeEndpoint struct {
	ID                 string
	Name               string
	HostComputeNetwork string
	Policies           []*FakeEndpointPolicy
	IPConfiguration    string
}

func NewFakeHostComputeEndpoint

func NewFakeHostComputeEndpoint(endpoint *hcn.HostComputeEndpoint) *FakeHostComputeEndpoint

func (*FakeHostComputeEndpoint) GetHCNObj

func (fEndpoint *FakeHostComputeEndpoint) GetHCNObj() *hcn.HostComputeEndpoint

func (*FakeHostComputeEndpoint) RemovePolicy

func (fEndpoint *FakeHostComputeEndpoint) RemovePolicy(toRemovePol *FakeEndpointPolicy) error

type FakeHostComputeNetwork

type FakeHostComputeNetwork struct {
	ID       string
	Name     string
	Policies map[string]*hcn.SetPolicySetting
}

func NewFakeHostComputeNetwork

func NewFakeHostComputeNetwork(network *hcn.HostComputeNetwork) *FakeHostComputeNetwork

func (*FakeHostComputeNetwork) GetHCNObj

func (fNetwork *FakeHostComputeNetwork) GetHCNObj() *hcn.HostComputeNetwork

type HnsV2WrapperInterface

type HnsV2WrapperInterface interface {
	CreateEndpoint(endpoint *hcn.HostComputeEndpoint) (*hcn.HostComputeEndpoint, error)
	DeleteEndpoint(endpoint *hcn.HostComputeEndpoint) error
	CreateNetwork(network *hcn.HostComputeNetwork) (*hcn.HostComputeNetwork, error)
	DeleteNetwork(network *hcn.HostComputeNetwork) error
	ModifyNetworkSettings(network *hcn.HostComputeNetwork, request *hcn.ModifyNetworkSettingRequest) error
	AddNetworkPolicy(network *hcn.HostComputeNetwork, networkPolicy hcn.PolicyNetworkRequest) error
	RemoveNetworkPolicy(network *hcn.HostComputeNetwork, networkPolicy hcn.PolicyNetworkRequest) error
	GetNamespaceByID(netNamespacePath string) (*hcn.HostComputeNamespace, error)
	AddNamespaceEndpoint(namespaceId string, endpointId string) error
	RemoveNamespaceEndpoint(namespaceId string, endpointId string) error
	GetNetworkByName(networkName string) (*hcn.HostComputeNetwork, error)
	GetNetworkByID(networkId string) (*hcn.HostComputeNetwork, error)
	GetEndpointByID(endpointId string) (*hcn.HostComputeEndpoint, error)
	ListEndpointsOfNetwork(networkId string) ([]hcn.HostComputeEndpoint, error)
	ApplyEndpointPolicy(endpoint *hcn.HostComputeEndpoint, requestType hcn.RequestType, endpointPolicy hcn.PolicyEndpointRequest) error
	GetEndpointByName(endpointName string) (*hcn.HostComputeEndpoint, error)
}

type Hnsv2wrapper

type Hnsv2wrapper struct {
}

func (Hnsv2wrapper) AddNamespaceEndpoint

func (w Hnsv2wrapper) AddNamespaceEndpoint(namespaceId string, endpointId string) error

func (Hnsv2wrapper) AddNetworkPolicy

func (Hnsv2wrapper) AddNetworkPolicy(network *hcn.HostComputeNetwork, networkPolicy hcn.PolicyNetworkRequest) error

func (Hnsv2wrapper) ApplyEndpointPolicy

func (f Hnsv2wrapper) ApplyEndpointPolicy(endpoint *hcn.HostComputeEndpoint, requestType hcn.RequestType, endpointPolicy hcn.PolicyEndpointRequest) error

func (Hnsv2wrapper) CreateEndpoint

func (Hnsv2wrapper) CreateEndpoint(endpoint *hcn.HostComputeEndpoint) (*hcn.HostComputeEndpoint, error)

func (Hnsv2wrapper) CreateNetwork

func (Hnsv2wrapper) CreateNetwork(network *hcn.HostComputeNetwork) (*hcn.HostComputeNetwork, error)

func (Hnsv2wrapper) DeleteEndpoint

func (Hnsv2wrapper) DeleteEndpoint(endpoint *hcn.HostComputeEndpoint) error

func (Hnsv2wrapper) DeleteNetwork

func (Hnsv2wrapper) DeleteNetwork(network *hcn.HostComputeNetwork) error

func (Hnsv2wrapper) GetEndpointByID

func (f Hnsv2wrapper) GetEndpointByID(endpointId string) (*hcn.HostComputeEndpoint, error)

func (Hnsv2wrapper) GetEndpointByName

func (f Hnsv2wrapper) GetEndpointByName(endpointName string) (*hcn.HostComputeEndpoint, error)

func (Hnsv2wrapper) GetNamespaceByID

func (w Hnsv2wrapper) GetNamespaceByID(netNamespacePath string) (*hcn.HostComputeNamespace, error)

func (Hnsv2wrapper) GetNetworkByID

func (w Hnsv2wrapper) GetNetworkByID(networkId string) (*hcn.HostComputeNetwork, error)

func (Hnsv2wrapper) GetNetworkByName

func (w Hnsv2wrapper) GetNetworkByName(networkName string) (*hcn.HostComputeNetwork, error)

func (Hnsv2wrapper) ListEndpointsOfNetwork

func (f Hnsv2wrapper) ListEndpointsOfNetwork(networkId string) ([]hcn.HostComputeEndpoint, error)

func (Hnsv2wrapper) ModifyNetworkSettings

func (Hnsv2wrapper) ModifyNetworkSettings(network *hcn.HostComputeNetwork, request *hcn.ModifyNetworkSettingRequest) error

func (Hnsv2wrapper) RemoveNamespaceEndpoint

func (w Hnsv2wrapper) RemoveNamespaceEndpoint(namespaceId string, endpointId string) error

func (Hnsv2wrapper) RemoveNetworkPolicy

func (Hnsv2wrapper) RemoveNetworkPolicy(network *hcn.HostComputeNetwork, networkPolicy hcn.PolicyNetworkRequest) error

type Hnsv2wrapperFake

type Hnsv2wrapperFake struct {
	Cache FakeHNSCache
	*sync.Mutex
}

func NewHnsv2wrapperFake

func NewHnsv2wrapperFake() *Hnsv2wrapperFake

func (Hnsv2wrapperFake) AddNamespaceEndpoint

func (Hnsv2wrapperFake) AddNamespaceEndpoint(namespaceId string, endpointId string) error

func (Hnsv2wrapperFake) AddNetworkPolicy

func (Hnsv2wrapperFake) AddNetworkPolicy(network *hcn.HostComputeNetwork, networkPolicy hcn.PolicyNetworkRequest) error

func (Hnsv2wrapperFake) ApplyEndpointPolicy

func (f Hnsv2wrapperFake) ApplyEndpointPolicy(endpoint *hcn.HostComputeEndpoint, requestType hcn.RequestType, endpointPolicy hcn.PolicyEndpointRequest) error

func (Hnsv2wrapperFake) CreateEndpoint

func (f Hnsv2wrapperFake) CreateEndpoint(endpoint *hcn.HostComputeEndpoint) (*hcn.HostComputeEndpoint, error)

func (Hnsv2wrapperFake) CreateNetwork

func (f Hnsv2wrapperFake) CreateNetwork(network *hcn.HostComputeNetwork) (*hcn.HostComputeNetwork, error)

func (Hnsv2wrapperFake) DeleteEndpoint

func (f Hnsv2wrapperFake) DeleteEndpoint(endpoint *hcn.HostComputeEndpoint) error

func (Hnsv2wrapperFake) DeleteNetwork

func (f Hnsv2wrapperFake) DeleteNetwork(network *hcn.HostComputeNetwork) error

func (Hnsv2wrapperFake) GetEndpointByID

func (f Hnsv2wrapperFake) GetEndpointByID(endpointID string) (*hcn.HostComputeEndpoint, error)

func (Hnsv2wrapperFake) GetEndpointByName

func (Hnsv2wrapperFake) GetEndpointByName(endpointName string) (*hcn.HostComputeEndpoint, error)

func (Hnsv2wrapperFake) GetNamespaceByID

func (Hnsv2wrapperFake) GetNamespaceByID(netNamespacePath string) (*hcn.HostComputeNamespace, error)

func (Hnsv2wrapperFake) GetNetworkByID

func (f Hnsv2wrapperFake) GetNetworkByID(networkID string) (*hcn.HostComputeNetwork, error)

func (Hnsv2wrapperFake) GetNetworkByName

func (f Hnsv2wrapperFake) GetNetworkByName(networkName string) (*hcn.HostComputeNetwork, error)

func (Hnsv2wrapperFake) ListEndpointsOfNetwork

func (f Hnsv2wrapperFake) ListEndpointsOfNetwork(networkId string) ([]hcn.HostComputeEndpoint, error)

func (Hnsv2wrapperFake) ModifyNetworkSettings

func (f Hnsv2wrapperFake) ModifyNetworkSettings(network *hcn.HostComputeNetwork, request *hcn.ModifyNetworkSettingRequest) error

func (Hnsv2wrapperFake) RemoveNamespaceEndpoint

func (Hnsv2wrapperFake) RemoveNamespaceEndpoint(namespaceId string, endpointId string) error

func (Hnsv2wrapperFake) RemoveNetworkPolicy

func (Hnsv2wrapperFake) RemoveNetworkPolicy(network *hcn.HostComputeNetwork, networkPolicy hcn.PolicyNetworkRequest) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL