fake

package
v1.4.2-policy Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAPI

type OpenAPI struct {
	sync.Mutex
	VSwitches map[string]vpc.VSwitch
	ENIs      map[string]*client.NetworkInterface

	IPAM   map[string]net.IP // index by vSwitch id
	IPAMV6 map[string]net.IP // index by vSwitch id
}

func New added in v1.4.1

func New() *OpenAPI

func (*OpenAPI) AssignIpv6Addresses

func (o *OpenAPI) AssignIpv6Addresses(ctx context.Context, eniID string, count int) ([]net.IP, error)

func (*OpenAPI) AssignPrivateIPAddress

func (o *OpenAPI) AssignPrivateIPAddress(ctx context.Context, eniID string, count int) ([]net.IP, error)

func (*OpenAPI) AttachNetworkInterface

func (o *OpenAPI) AttachNetworkInterface(ctx context.Context, eniID, instanceID, trunkENIID string) error

func (*OpenAPI) CreateNetworkInterface

func (o *OpenAPI) CreateNetworkInterface(ctx context.Context, trunk bool, vSwitch string, securityGroups []string, resourceGroupID string, ipCount, ipv6Count int, eniTags map[string]string) (*client.NetworkInterface, error)

func (*OpenAPI) DeleteNetworkInterface

func (o *OpenAPI) DeleteNetworkInterface(ctx context.Context, eniID string) error

func (*OpenAPI) DescribeInstanceTypes added in v1.4.1

func (o *OpenAPI) DescribeInstanceTypes(ctx context.Context, types []string) ([]ecs.InstanceType, error)

func (*OpenAPI) DescribeNetworkInterface

func (o *OpenAPI) DescribeNetworkInterface(ctx context.Context, vpcID string, eniID []string, instanceID, instanceType, status string, tags map[string]string) ([]*client.NetworkInterface, error)

func (*OpenAPI) DescribeVSwitchByID

func (o *OpenAPI) DescribeVSwitchByID(ctx context.Context, vSwitchID string) (*vpc.VSwitch, error)

func (*OpenAPI) DetachNetworkInterface

func (o *OpenAPI) DetachNetworkInterface(ctx context.Context, eniID, instanceID, trunkENIID string) error

func (*OpenAPI) ModifyNetworkInterfaceAttribute added in v1.4.1

func (o *OpenAPI) ModifyNetworkInterfaceAttribute(ctx context.Context, eniID string, securityGroupIDs []string) error

func (*OpenAPI) UnAssignIpv6Addresses

func (o *OpenAPI) UnAssignIpv6Addresses(ctx context.Context, eniID string, ips []net.IP) error

func (*OpenAPI) UnAssignPrivateIPAddresses

func (o *OpenAPI) UnAssignPrivateIPAddresses(ctx context.Context, eniID string, ips []net.IP) error

func (*OpenAPI) WaitForNetworkInterface

func (o *OpenAPI) WaitForNetworkInterface(ctx context.Context, eniID string, status string, backoff wait.Backoff, ignoreNotExist bool) (*client.NetworkInterface, error)

Jump to

Keyboard shortcuts

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