Documentation ¶
Index ¶
- func GetNetworkAreaName(ctx context.Context, apiClient IaaSClient, organizationId, areaId string) (string, error)
- func GetNetworkName(ctx context.Context, apiClient IaaSClient, projectId, networkId string) (string, error)
- func GetNetworkRangeFromAPIResponse(prefix string, networkRanges *[]iaas.NetworkRange) (iaas.NetworkRange, error)
- func GetNetworkRangePrefix(ctx context.Context, apiClient IaaSClient, ...) (string, error)
- func GetRouteFromAPIResponse(prefix, nexthop string, routes *[]iaas.Route) (iaas.Route, error)
- func ListAttachedProjects(ctx context.Context, apiClient IaaSClient, organizationId, areaId string) ([]string, error)
- type IaaSClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNetworkAreaName ¶
func GetNetworkName ¶
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 GetRouteFromAPIResponse ¶
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 ListAttachedProjects ¶
Types ¶
type IaaSClient ¶
type IaaSClient interface { GetNetworkExecute(ctx context.Context, projectId, networkId string) (*iaas.Network, error) GetNetworkAreaExecute(ctx context.Context, organizationId, areaId string) (*iaas.NetworkArea, error) ListNetworkAreaProjectsExecute(ctx context.Context, organizationId, areaId string) (*iaas.ProjectListResponse, error) GetNetworkAreaRangeExecute(ctx context.Context, organizationId, areaId, networkRangeId string) (*iaas.NetworkRange, error) }
Click to show internal directories.
Click to hide internal directories.