Documentation ¶
Index ¶
- Constants
- Variables
- func DeletePoolByNameIfExist(ctx context.Context, client *edgecloud.Client, name, loadBalancerID string) error
- func DeleteResourceIfExist(ctx context.Context, client *edgecloud.Client, resource interface{}, ...) error
- func DeleteUnusedPools(ctx context.Context, client *edgecloud.Client, oldPools []edgecloud.Pool, ...) error
- func FindPoolMemberByAddressPortAndSubnetID(pool edgecloud.Pool, addr net.IP, protocolPort int, subnetID string) (found bool)
- func FlavorIsAvailable(ctx context.Context, client *edgecloud.Client, flavorName string, ...) (bool, error)
- func FlavorIsExist(ctx context.Context, client *edgecloud.Client, flavorName string) (bool, error)
- func FloatingIPDetailedByID(ctx context.Context, client *edgecloud.Client, id string) (*edgecloud.FloatingIP, error)
- func FloatingIPDetailedByIPAddress(ctx context.Context, client *edgecloud.Client, floatingIPAddress string) (*edgecloud.FloatingIP, error)
- func FloatingIPsListByPortID(ctx context.Context, client *edgecloud.Client, portID string) ([]edgecloud.FloatingIP, error)
- func GetLbL7PolicyFromName(ctx context.Context, client *edgecloud.Client, name string) (*edgecloud.L7Policy, error)
- func L7PoliciesListByListenerID(ctx context.Context, client *edgecloud.Client, listenerID string) ([]edgecloud.L7Policy, error)
- func LBListenerGetByName(ctx context.Context, client *edgecloud.Client, name, loadBalancerID string) (*edgecloud.Listener, error)
- func LBPoolGetByName(ctx context.Context, client *edgecloud.Client, name, loadBalancerID string) (*edgecloud.Pool, error)
- func LBSharedPoolList(ctx context.Context, client *edgecloud.Client, loadBalancerID string) ([]edgecloud.Pool, error)
- func LoadbalancerFlavorIsExist(ctx context.Context, client *edgecloud.Client, flavorName string) (bool, error)
- func LoadbalancerGetByName(ctx context.Context, client *edgecloud.Client, name string) (*edgecloud.Loadbalancer, error)
- func PoolMemberGetByID(ctx context.Context, client *edgecloud.Client, poolID, memberID string) (*edgecloud.PoolMember, error)
- func ResourceIsDeleted[T any](ctx context.Context, getResourceFunc GetResourceFunc[T], id string) error
- func ResourceIsExist[T any](ctx context.Context, getResourceFunc GetResourceFunc[T], id string) (bool, error)
- func ServerGroupGetByInstance(ctx context.Context, client *edgecloud.Client, instanceID string) (*edgecloud.ServerGroup, error)
- func SnapshotsListByNameAndVolumeID(ctx context.Context, client *edgecloud.Client, name, volumeID string) ([]edgecloud.Snapshot, error)
- func SnapshotsListByStatusAndVolumeID(ctx context.Context, client *edgecloud.Client, status, volumeID string) ([]edgecloud.Snapshot, error)
- func VolumesListByName(ctx context.Context, client *edgecloud.Client, name string) ([]edgecloud.Volume, error)
- func WaitAndGetTaskInfo(ctx context.Context, client *edgecloud.Client, taskID string, ...) (*edgecloud.Task, error)
- func WaitForInstanceShutoff(ctx context.Context, client *edgecloud.Client, instanceID string, ...) error
- func WaitForTaskComplete(ctx context.Context, client *edgecloud.Client, taskID string, ...) error
- func WaitLoadbalancerProvisioningStatusActive(ctx context.Context, client *edgecloud.Client, loadBalancerID string, ...) error
- func WaitSnapshotStatusReady(ctx context.Context, client *edgecloud.Client, snapshotID string, ...) error
- func WaitVolumeAttachedToInstance(ctx context.Context, client *edgecloud.Client, volumeID, instanceID string, ...) error
- func WaitVolumeDetachedFromInstance(ctx context.Context, client *edgecloud.Client, volumeID, instanceID string, ...) error
- func WithRetry(f retry.RetryableFunc, attempts *uint) error
- type GetResourceFunc
- type SecurityGroupRuleProtocol
- type TaskAPIFunc
- type TaskResult
Constants ¶
View Source
const Attempts uint = 10
View Source
const InstanceShutoffStatus = "SHUTOFF"
View Source
const SnapshotReadyStatus = "available"
Variables ¶
View Source
var ( ErrFloatingIPsNotFound = errors.New("no FloatingIPs were found for the specified search criteria") ErrFloatingIPNotFound = errors.New("no FloatingIP was found for the specified search criteria") )
View Source
var ( ErrLoadbalancersNotFound = errors.New("no Loadbalancers were found for the specified search criteria") ErrLoadbalancerPoolsNotFound = errors.New("no Loadbalancer pools were found for the specified search criteria") ErrLoadbalancerPoolsMemberNotFound = errors.New("no Loadbalancer pool member were found for the specified search criteria") ErrLoadbalancerListenerNotFound = errors.New("no Loadbalancer listener were found for the specified search criteria") ErrMultipleResults = errors.New("multiple results where only one expected") ErrErrorState = errors.New("loadbalancer in Error state") ErrNotActiveStatus = errors.New("waiting for Active status") )
View Source
var ( ErrSnapshotsNotFound = errors.New("no Snapshots were found for the specified search criteria") ErrSnapshotNotReady = errors.New("snapshot failed to be ready within the allocated time") )
View Source
var ( ErrVolumesNotFound = errors.New("no Volumes were found for the specified search criteria") ErrVolumesNotAttached = errors.New("volume failed to be attached within the allocated time") ErrVolumesNotDetached = errors.New("volume failed to be detached within the allocated time") )
View Source
var ErrInstanceNotShutOff = errors.New("the instance is not shut off")
View Source
var ErrL7PoliciesNotFound = errors.New("no l7Policies were found for the specified search criteria")
View Source
var ErrServerGroupNotFound = errors.New("no server group was found for the specified search criteria")
Functions ¶
func DeletePoolByNameIfExist ¶
func DeleteResourceIfExist ¶
func DeleteUnusedPools ¶
func FlavorIsAvailable ¶
func FlavorIsExist ¶
func FloatingIPDetailedByID ¶
func FloatingIPsListByPortID ¶
func GetLbL7PolicyFromName ¶ added in v2.0.29
func LBListenerGetByName ¶
func LBPoolGetByName ¶
func LBSharedPoolList ¶
func LoadbalancerGetByName ¶
func PoolMemberGetByID ¶
func ResourceIsDeleted ¶
func ResourceIsExist ¶
func VolumesListByName ¶
func WaitAndGetTaskInfo ¶
func WaitForInstanceShutoff ¶
func WaitForTaskComplete ¶
func WaitSnapshotStatusReady ¶
Types ¶
type GetResourceFunc ¶
type SecurityGroupRuleProtocol ¶ added in v2.0.5
type SecurityGroupRuleProtocol edgecloud.SecurityGroupRuleProtocol
func (SecurityGroupRuleProtocol) List ¶ added in v2.0.5
func (s SecurityGroupRuleProtocol) List() []edgecloud.SecurityGroupRuleProtocol
func (SecurityGroupRuleProtocol) StringList ¶ added in v2.0.5
func (s SecurityGroupRuleProtocol) StringList() []string
type TaskAPIFunc ¶
type TaskResult ¶
type TaskResult struct { DdosProfiles []int `json:"ddos_profiles"` FloatingIPs []string `json:"floatingips"` HealthMonitors []string `json:"healthmonitors"` Images []string `json:"images"` Instances []string `json:"instances"` L7Polices []string `json:"l7polices"` L7Rules []string `json:"l7rules"` Listeners []string `json:"listeners"` Loadbalancers []string `json:"loadbalancers"` Members []string `json:"members"` Networks []string `json:"networks"` Pools []string `json:"pools"` Ports []string `json:"ports"` Projects []string `json:"projects"` ReservedFixedIPs []string `json:"reserved_fixed_ips"` Routers []string `json:"routers"` Secrets []string `json:"secrets"` ServerGroups []string `json:"servergroups"` Snapshots []string `json:"snapshots"` Subnets []string `json:"subnets"` Volumes []string `json:"volumes"` }
func ExecuteAndExtractTaskResult ¶
func ExecuteAndExtractTaskResult[T any](ctx context.Context, apiFunc TaskAPIFunc[T], opt T, client *edgecloud.Client, timeouts ...time.Duration) (*TaskResult, error)
func ExtractTaskResultFromTask ¶
func ExtractTaskResultFromTask(task *edgecloud.Task) (*TaskResult, error)
Click to show internal directories.
Click to hide internal directories.