Documentation
¶
Index ¶
- type API
- func (a *API) AssignPrivateIpAddressesVM(ctx context.Context, subnetID, interfaceName string, addresses int) error
- func (a *API) AssignPrivateIpAddressesVMSS(ctx context.Context, vmName, vmssName, subnetID, interfaceName string, ...) error
- func (a *API) AssignPublicIPAddressesVM(ctx context.Context, instanceID string, publicIpTags ipamTypes.Tags) (netip.Addr, error)
- func (a *API) AssignPublicIPAddressesVMSS(ctx context.Context, instanceID, vmssName string, publicIpTags ipamTypes.Tags) (netip.Addr, error)
- func (a *API) GetSubnetsByIDs(ctx context.Context, nodeSubnetIDs []string) (ipamTypes.SubnetMap, error)
- func (a *API) ListAllNetworkInterfaces(ctx context.Context) ([]*armnetwork.Interface, error)
- func (a *API) ListVMNetworkInterfaces(ctx context.Context, instanceID string) ([]*armnetwork.Interface, error)
- func (a *API) ParseInterfacesIntoInstance(networkInterfaces []*armnetwork.Interface, subnets ipamTypes.SubnetMap) *ipamTypes.Instance
- func (a *API) ParseInterfacesIntoInstanceMap(networkInterfaces []*armnetwork.Interface, subnets ipamTypes.SubnetMap) *ipamTypes.InstanceMap
- func (a *API) SetDelay(op Operation, delay time.Duration)
- func (a *API) SetLimiter(limit float64, burst int)
- func (a *API) SetMockError(op Operation, err error)
- func (a *API) UpdateInstances(instances *ipamTypes.InstanceMap)
- func (a *API) UpdateSubnets(subnets []*ipamTypes.Subnet)
- type Operation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) AssignPrivateIpAddressesVM ¶
func (*API) AssignPrivateIpAddressesVMSS ¶
func (*API) AssignPublicIPAddressesVM ¶ added in v1.19.0
func (*API) AssignPublicIPAddressesVMSS ¶ added in v1.19.0
func (*API) GetSubnetsByIDs ¶ added in v1.20.0
func (*API) ListAllNetworkInterfaces ¶ added in v1.20.0
ListAllNetworkInterfaces returns a dummy slice since mock doesn't use real network interfaces The mock API uses instances directly rather than armnetwork.Interface objects
func (*API) ListVMNetworkInterfaces ¶ added in v1.20.0
func (a *API) ListVMNetworkInterfaces(ctx context.Context, instanceID string) ([]*armnetwork.Interface, error)
ListVMNetworkInterfaces returns a single sentinel armnetwork.Interface whose ID carries the requested instanceID, so ParseInterfacesIntoInstance can recover which instance to return without making another API call.
func (*API) ParseInterfacesIntoInstance ¶ added in v1.20.0
func (a *API) ParseInterfacesIntoInstance(networkInterfaces []*armnetwork.Interface, subnets ipamTypes.SubnetMap) *ipamTypes.Instance
ParseInterfacesIntoInstance recovers the instanceID from the sentinel produced by ListVMNetworkInterfaces and returns the mock's instance.
func (*API) ParseInterfacesIntoInstanceMap ¶ added in v1.20.0
func (a *API) ParseInterfacesIntoInstanceMap(networkInterfaces []*armnetwork.Interface, subnets ipamTypes.SubnetMap) *ipamTypes.InstanceMap
ParseInterfacesIntoInstanceMap ignores the input and returns the mock's instances The mock API doesn't use real armnetwork.Interface objects
func (*API) SetDelay ¶
SetDelay specifies the delay which should be simulated for an individual Azure API operation
func (*API) SetLimiter ¶
SetLimiter adds a rate limiter to all simulated API calls
func (*API) SetMockError ¶
SetMockError modifies the mock API to return an error for a particular operation
func (*API) UpdateInstances ¶
func (a *API) UpdateInstances(instances *ipamTypes.InstanceMap)