Documentation ¶
Index ¶
- func NewAliyunImpl(openAPI *client.OpenAPI, needENITypeAttr bool, ipFamily *types.IPFamily, ...) ipam.API
- type ENIInfoGetter
- type ENIMetadata
- func (e *ENIMetadata) GetENIByMac(mac string) (*types.ENI, error)
- func (e *ENIMetadata) GetENIPrivateAddressesByMAC(mac string) ([]net.IP, error)
- func (e *ENIMetadata) GetENIPrivateIPv6AddressesByMAC(mac string) ([]net.IP, error)
- func (e *ENIMetadata) GetENIs(containsMainENI bool) ([]*types.ENI, error)
- func (e *ENIMetadata) GetSecondaryENIMACs() ([]string, error)
- type Impl
- func (e *Impl) AllocateENI(ctx context.Context, vSwitch string, securityGroups []string, ...) (*types.ENI, error)
- func (e *Impl) AllocateEipAddress(ctx context.Context, bandwidth int, chargeType types.InternetChargeType, ...) (*types.EIP, error)
- func (e *Impl) AssignNIPsForENI(ctx context.Context, eniID, mac string, count int) ([]net.IP, []net.IP, error)
- func (e *Impl) CheckEniSecurityGroup(ctx context.Context, sg []string) error
- func (e *Impl) FreeENI(ctx context.Context, eniID, instanceID string) error
- func (e *Impl) GetAttachedENIs(ctx context.Context, containsMainENI bool, trunkENIID string) ([]*types.ENI, error)
- func (e *Impl) GetAttachedSecurityGroups(ctx context.Context, instanceID string) ([]string, error)
- func (e *Impl) GetENIByMac(ctx context.Context, mac string) (*types.ENI, error)
- func (e *Impl) GetENIIPs(ctx context.Context, mac string) ([]net.IP, []net.IP, error)
- func (e *Impl) GetInstanceAttributesType(ctx context.Context, instanceID string) (*ecs.Instance, error)
- func (e *Impl) GetSecondaryENIMACs(ctx context.Context) ([]string, error)
- func (e *Impl) QueryEniIDByIP(ctx context.Context, vpcID string, address net.IP) (string, error)
- func (e *Impl) ReleaseEipAddress(ctx context.Context, eipID, eniID string, eniIP net.IP) error
- func (e *Impl) UnAssignIPsForENI(ctx context.Context, eniID, mac string, ipv4s []net.IP, ipv6s []net.IP) error
- func (e *Impl) UnassociateEipAddress(ctx context.Context, eipID, eniID, eniIP string) error
- func (e *Impl) WaitForEIP(eipID string, status string, backoff wait.Backoff) (*vpc.EipAddress, error)
- type Instance
- type Limits
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ENIInfoGetter ¶
type ENIInfoGetter interface { GetENIByMac(mac string) (*types.ENI, error) GetENIPrivateAddressesByMAC(mac string) ([]net.IP, error) GetENIPrivateIPv6AddressesByMAC(mac string) ([]net.IP, error) GetENIs(containsMainENI bool) ([]*types.ENI, error) GetSecondaryENIMACs() ([]string, error) }
ENIInfoGetter interface to get eni information
type ENIMetadata ¶
type ENIMetadata struct {
// contains filtered or unexported fields
}
func NewENIMetadata ¶ added in v1.1.0
func NewENIMetadata(ipFamily *types.IPFamily) *ENIMetadata
func (*ENIMetadata) GetENIByMac ¶ added in v1.1.0
func (e *ENIMetadata) GetENIByMac(mac string) (*types.ENI, error)
func (*ENIMetadata) GetENIPrivateAddressesByMAC ¶ added in v1.1.0
func (e *ENIMetadata) GetENIPrivateAddressesByMAC(mac string) ([]net.IP, error)
func (*ENIMetadata) GetENIPrivateIPv6AddressesByMAC ¶ added in v1.1.0
func (e *ENIMetadata) GetENIPrivateIPv6AddressesByMAC(mac string) ([]net.IP, error)
func (*ENIMetadata) GetENIs ¶ added in v1.1.0
func (e *ENIMetadata) GetENIs(containsMainENI bool) ([]*types.ENI, error)
func (*ENIMetadata) GetSecondaryENIMACs ¶ added in v1.1.0
func (e *ENIMetadata) GetSecondaryENIMACs() ([]string, error)
GetSecondaryENIMACs return secondary ENI macs
type Impl ¶ added in v1.1.0
func (*Impl) AllocateENI ¶ added in v1.1.0
func (e *Impl) AllocateENI(ctx context.Context, vSwitch string, securityGroups []string, instanceID string, trunk bool, ipCount int, eniTags map[string]string) (*types.ENI, error)
AllocateENI for instance
func (*Impl) AllocateEipAddress ¶ added in v1.1.0
func (*Impl) AssignNIPsForENI ¶ added in v1.1.0
func (*Impl) CheckEniSecurityGroup ¶ added in v1.1.0
CheckEniSecurityGroup will sync eni's security with ecs's security group
func (*Impl) GetAttachedENIs ¶ added in v1.1.0
func (e *Impl) GetAttachedENIs(ctx context.Context, containsMainENI bool, trunkENIID string) ([]*types.ENI, error)
GetAttachedENIs of instanceId containsMainENI is contains the main interface(eth0) of instance
func (*Impl) GetAttachedSecurityGroups ¶ added in v1.1.0
func (*Impl) GetENIByMac ¶ added in v1.1.0
func (*Impl) GetInstanceAttributesType ¶ added in v1.1.0
func (*Impl) GetSecondaryENIMACs ¶ added in v1.1.0
func (*Impl) QueryEniIDByIP ¶ added in v1.1.0
func (*Impl) ReleaseEipAddress ¶ added in v1.1.0
func (*Impl) UnAssignIPsForENI ¶ added in v1.1.0
func (*Impl) UnassociateEipAddress ¶ added in v1.1.0
UnassociateEipAddress un associate eip 1. if eni is deleted eip auto unassociated 2. if eip is deleted , return code is InvalidAllocationId.NotFound 3. if eip is not bind ,return code is IncorrectEipStatus
func (*Impl) WaitForEIP ¶ added in v1.1.0
func (e *Impl) WaitForEIP(eipID string, status string, backoff wait.Backoff) (*vpc.EipAddress, error)
WaitForEIP wait status of eni, ignore status if is empty
type Instance ¶ added in v1.1.0
type Instance struct { RegionID string ZoneID string VPCID string VSwitchID string PrimaryMAC string InstanceID string InstanceType string }
func GetInstanceMeta ¶ added in v1.1.0
func GetInstanceMeta() *Instance
type Limits ¶ added in v1.1.0
type Limits struct { // Adapters specifies the maximum number of interfaces that can be // attached to the instance Adapters int // TotalAdapters maximum number of interfaces that can be // attached to the instance TotalAdapters int // IPv4PerAdapter is the maximum number of ipv4 addresses per adapter/interface IPv4PerAdapter int // IPv6PerAdapter is the maximum number of ipv6 addresses per adapter/interface IPv6PerAdapter int // MemberAdapterLimit is the number interfaces that type is member MemberAdapterLimit int // MaxMemberAdapterLimit is the limit to use member MaxMemberAdapterLimit int InstanceBandwidthRx int InstanceBandwidthTx int }
Limits specifies the IPAM relevant instance limits
func GetLimit ¶ added in v1.1.0
GetLimit returns the instance limits of a particular instance type. // https://www.alibabacloud.com/help/doc-detail/25620.htm if instanceType is empty will list all instanceType and warm the cache, no error and Limits will return