Documentation ¶
Index ¶
- func GetInstanceId(project string, zone string, instanceName string) (uint64, error)
- func GetInstanceIpAddress(project string, zone string, instanceName string) (string, error)
- func GetResourceNetworkInfo(ctx context.Context, instancesClient *compute.InstancesClient, ...) (*string, *string, error)
- func GetTestVmParameters(project string, zone string, name string) *computepb.InsertInstanceRequest
- func GetVpcUrl(project string, namespace string) string
- func IsValidResource(ctx context.Context, resource *paragliderpb.CreateResourceRequest) (*resourceInfo, error)
- func ReadAndProvisionResource(ctx context.Context, resource *paragliderpb.CreateResourceRequest, ...) (string, string, error)
- func RunPingConnectivityTest(t *testing.T, project string, name string, ...)
- func SetupGcpTesting(testName string) string
- func TeardownGcpTesting(projectId string)
- type GCPPluginServer
- func (s *GCPPluginServer) AddPermitListRules(ctx context.Context, req *paragliderpb.AddPermitListRulesRequest) (*paragliderpb.AddPermitListRulesResponse, error)
- func (s *GCPPluginServer) CreateResource(ctx context.Context, resourceDescription *paragliderpb.CreateResourceRequest) (*paragliderpb.CreateResourceResponse, error)
- func (s *GCPPluginServer) CreateVpnConnections(ctx context.Context, req *paragliderpb.CreateVpnConnectionsRequest) (*paragliderpb.CreateVpnConnectionsResponse, error)
- func (s *GCPPluginServer) CreateVpnGateway(ctx context.Context, req *paragliderpb.CreateVpnGatewayRequest) (*paragliderpb.CreateVpnGatewayResponse, error)
- func (s *GCPPluginServer) DeletePermitListRules(ctx context.Context, req *paragliderpb.DeletePermitListRulesRequest) (*paragliderpb.DeletePermitListRulesResponse, error)
- func (s *GCPPluginServer) GetPermitList(ctx context.Context, req *paragliderpb.GetPermitListRequest) (*paragliderpb.GetPermitListResponse, error)
- func (s *GCPPluginServer) GetUsedAddressSpaces(ctx context.Context, req *paragliderpb.GetUsedAddressSpacesRequest) (*paragliderpb.GetUsedAddressSpacesResponse, error)
- func (s *GCPPluginServer) GetUsedAsns(ctx context.Context, req *paragliderpb.GetUsedAsnsRequest) (*paragliderpb.GetUsedAsnsResponse, error)
- func (s *GCPPluginServer) GetUsedBgpPeeringIpAddresses(ctx context.Context, req *paragliderpb.GetUsedBgpPeeringIpAddressesRequest) (*paragliderpb.GetUsedBgpPeeringIpAddressesResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInstanceId ¶
func GetInstanceIpAddress ¶
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 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 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) AddPermitListRules ¶
func (s *GCPPluginServer) AddPermitListRules(ctx context.Context, req *paragliderpb.AddPermitListRulesRequest) (*paragliderpb.AddPermitListRulesResponse, error)
func (*GCPPluginServer) CreateResource ¶
func (s *GCPPluginServer) CreateResource(ctx context.Context, resourceDescription *paragliderpb.CreateResourceRequest) (*paragliderpb.CreateResourceResponse, error)
func (*GCPPluginServer) CreateVpnConnections ¶
func (s *GCPPluginServer) CreateVpnConnections(ctx context.Context, req *paragliderpb.CreateVpnConnectionsRequest) (*paragliderpb.CreateVpnConnectionsResponse, error)
func (*GCPPluginServer) CreateVpnGateway ¶
func (s *GCPPluginServer) CreateVpnGateway(ctx context.Context, req *paragliderpb.CreateVpnGatewayRequest) (*paragliderpb.CreateVpnGatewayResponse, error)
func (*GCPPluginServer) DeletePermitListRules ¶
func (s *GCPPluginServer) DeletePermitListRules(ctx context.Context, req *paragliderpb.DeletePermitListRulesRequest) (*paragliderpb.DeletePermitListRulesResponse, error)
func (*GCPPluginServer) GetPermitList ¶
func (s *GCPPluginServer) GetPermitList(ctx context.Context, req *paragliderpb.GetPermitListRequest) (*paragliderpb.GetPermitListResponse, error)
func (*GCPPluginServer) GetUsedAddressSpaces ¶
func (s *GCPPluginServer) GetUsedAddressSpaces(ctx context.Context, req *paragliderpb.GetUsedAddressSpacesRequest) (*paragliderpb.GetUsedAddressSpacesResponse, error)
func (*GCPPluginServer) GetUsedAsns ¶
func (s *GCPPluginServer) GetUsedAsns(ctx context.Context, req *paragliderpb.GetUsedAsnsRequest) (*paragliderpb.GetUsedAsnsResponse, error)
func (*GCPPluginServer) GetUsedBgpPeeringIpAddresses ¶
func (s *GCPPluginServer) GetUsedBgpPeeringIpAddresses(ctx context.Context, req *paragliderpb.GetUsedBgpPeeringIpAddressesRequest) (*paragliderpb.GetUsedBgpPeeringIpAddressesResponse, error)
Click to show internal directories.
Click to hide internal directories.