gcp

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstanceId

func GetInstanceId(project string, zone string, instanceName string) (uint64, error)

func GetInstanceIpAddress

func GetInstanceIpAddress(project string, zone string, instanceName string) (string, error)

func GetResourceNetworkInfo

func GetResourceNetworkInfo(ctx context.Context, instancesClient *compute.InstancesClient, clusterClient *container.ClusterManagerClient, resourceInfo *resourceInfo) (*string, *string, error)

Gets network information about a resource and confirms it is in the correct namespace Returns the subnet URL and resource ID (instance ID or cluster ID, not URL since this is used for firewall rule naming)

func GetTestVmParameters

func GetTestVmParameters(project string, zone string, name string) *computepb.InsertInstanceRequest

func GetVpcUrl

func GetVpcUrl(project string, namespace string) string

GetVpcUrl returns a fully qualified URL for a VPC network

func IsValidResource

func IsValidResource(ctx context.Context, resource *paragliderpb.CreateResourceRequest) (*resourceInfo, error)

Determine whether the provided resource description is supported

func ReadAndProvisionResource

func ReadAndProvisionResource(ctx context.Context, resource *paragliderpb.CreateResourceRequest, subnetName string, resourceInfo *resourceInfo, instanceClient *compute.InstancesClient, clusterClient *container.ClusterManagerClient, firewallsClient *compute.FirewallsClient, additionalAddrSpaces []string) (string, string, error)

Read the resource description and provision the resource

func RunPingConnectivityTest

func RunPingConnectivityTest(t *testing.T, project string, name string, srcEndpoint *networkmanagementpb.Endpoint, dstEndpoint *networkmanagementpb.Endpoint)

Runs connectivity test between two endpoints

func SetupGcpTesting

func SetupGcpTesting(testName string) string

func TeardownGcpTesting

func TeardownGcpTesting(projectId string)

Types

type GCPPluginServer

type GCPPluginServer struct {
	paragliderpb.UnimplementedCloudPluginServer
	// contains filtered or unexported fields
}

func Setup

func Setup(port int, orchestratorServerAddr string) *GCPPluginServer

func (*GCPPluginServer) CreateResource

func (*GCPPluginServer) GetUsedAsns

Jump to

Keyboard shortcuts

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