utils

package
v0.66.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrResponseNil = errors.New("response is nil")
	ErrNameNil     = errors.New("name is nil")
	ErrItemsNil    = errors.New("items is nil")
)

Functions

func GetAffinityGroupName added in v0.24.0

func GetAffinityGroupName(ctx context.Context, apiClient iaas.DefaultAPI, projectId, region, affinityGroupId string) (string, error)

func GetBackupName added in v0.34.4

func GetBackupName(ctx context.Context, apiClient iaas.DefaultAPI, projectId, region, backupId string) (string, error)

func GetImageName added in v0.21.0

func GetImageName(ctx context.Context, apiClient iaas.DefaultAPI, projectId, region, imageId string) (string, error)

func GetNetworkAreaName

func GetNetworkAreaName(ctx context.Context, apiClient iaas.DefaultAPI, organizationId, areaId string) (string, error)

func GetNetworkName

func GetNetworkName(ctx context.Context, apiClient iaas.DefaultAPI, projectId, region, networkId string) (string, error)

func GetNetworkRangeFromAPIResponse

func GetNetworkRangeFromAPIResponse(prefix string, networkRanges []iaas.NetworkRange) (iaas.NetworkRange, error)

GetNetworkRangeFromAPIResponse returns the network range from the API response that matches the given prefix This works because network range prefixes are unique in the same SNA

func GetNetworkRangePrefix

func GetNetworkRangePrefix(ctx context.Context, apiClient iaas.DefaultAPI, organizationId, areaId, region, networkRangeId string) (string, error)

func GetPublicIP added in v0.18.0

func GetPublicIP(ctx context.Context, apiClient iaas.DefaultAPI, projectId, region, publicIpId string) (ip, associatedResource string, err error)

func GetRouteFromAPIResponse

func GetRouteFromAPIResponse(destination, nexthop string, routes []iaas.Route) (iaas.Route, error)

GetRouteFromAPIResponse returns the static route from the API response that matches the prefix and nexthop This works because static routes are unique by prefix and nexthop

func GetRoutingTableOfAreaName added in v0.56.0

func GetRoutingTableOfAreaName(ctx context.Context, apiClient iaas.DefaultAPI, organizationId, areaId, region, routingTableId string) (string, error)

func GetSecurityGroupName added in v0.20.0

func GetSecurityGroupName(ctx context.Context, apiClient iaas.DefaultAPI, projectId, region, securityGroupId string) (string, error)

func GetSecurityGroupRuleName added in v0.20.0

func GetSecurityGroupRuleName(ctx context.Context, apiClient iaas.DefaultAPI, projectId, region, securityGroupRuleId, securityGroupId string) (string, error)

func GetServerName added in v0.17.0

func GetServerName(ctx context.Context, apiClient iaas.DefaultAPI, projectId, region, serverId string) (string, error)

func GetSnapshotName added in v0.34.4

func GetSnapshotName(ctx context.Context, apiClient iaas.DefaultAPI, projectId, region, snapshotId string) (string, error)

func GetVolumeName added in v0.17.0

func GetVolumeName(ctx context.Context, apiClient iaas.DefaultAPI, projectId, region, volumeId string) (string, error)

func ListAttachedProjects

func ListAttachedProjects(ctx context.Context, apiClient iaas.DefaultAPI, organizationId, areaId string) ([]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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