gce

package
v1.24.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockGCECloud

type MockGCECloud struct {
	// contains filtered or unexported fields
}

MockGCECloud is a mock implementation of GCECloud for testing

func InstallMockGCECloud

func InstallMockGCECloud(region string, project string) *MockGCECloud

InstallMockGCECloud registers a MockGCECloud implementation for the specified region & project

func (*MockGCECloud) AllResources

func (c *MockGCECloud) AllResources() map[string]interface{}

func (*MockGCECloud) CloudDNS

func (c *MockGCECloud) CloudDNS() gce.DNSClient

CloudDNS returns the DNS client

func (*MockGCECloud) CloudResourceManager added in v1.24.0

func (c *MockGCECloud) CloudResourceManager() *cloudresourcemanager.Service

CloudResourceManager returns the client for the cloudresourcemanager API

func (*MockGCECloud) Compute

func (c *MockGCECloud) Compute() gce.ComputeClient

Compute implements GCECloud::Compute

func (*MockGCECloud) DNS

DNS implements fi.Cloud::DNS

func (*MockGCECloud) DeleteGroup

DeleteGroup implements fi.Cloud::DeleteGroup

func (*MockGCECloud) DeleteInstance

func (c *MockGCECloud) DeleteInstance(i *cloudinstances.CloudInstance) error

DeleteInstance deletes a GCE instance

func (*MockGCECloud) DeregisterInstance added in v1.24.0

func (c *MockGCECloud) DeregisterInstance(i *cloudinstances.CloudInstance) error

func (*MockGCECloud) DetachInstance

func (c *MockGCECloud) DetachInstance(i *cloudinstances.CloudInstance) error

DetachInstance is not implemented yet. It needs to cause a cloud instance to no longer be counted against the group's size limits.

func (*MockGCECloud) FindClusterStatus

func (c *MockGCECloud) FindClusterStatus(cluster *kops.Cluster) (*kops.ClusterStatus, error)

FindClusterStatus implements GCECloud::FindClusterStatus

func (*MockGCECloud) FindVPCInfo

func (c *MockGCECloud) FindVPCInfo(id string) (*fi.VPCInfo, error)

FindVPCInfo implements fi.Cloud::FindVPCInfo

func (*MockGCECloud) GetApiIngressStatus

func (c *MockGCECloud) GetApiIngressStatus(cluster *kops.Cluster) ([]fi.ApiIngressStatus, error)

GetApiIngressStatus implements GCECloud::GetApiIngressStatus

func (*MockGCECloud) GetCloudGroups

func (c *MockGCECloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error)

GetCloudGroups is not implemented yet

func (*MockGCECloud) IAM

func (c *MockGCECloud) IAM() gce.IamClient

IAM returns the IAM client

func (*MockGCECloud) Labels

func (c *MockGCECloud) Labels() map[string]string

Labels implements GCECloud::Labels

func (*MockGCECloud) Project

func (c *MockGCECloud) Project() string

Project implements GCECloud::Project

func (*MockGCECloud) ProviderID

func (c *MockGCECloud) ProviderID() kops.CloudProviderID

ProviderID implements fi.Cloud::ProviderID

func (*MockGCECloud) Region

func (c *MockGCECloud) Region() string

Region implements GCECloud::Region

func (*MockGCECloud) ServiceAccount

func (c *MockGCECloud) ServiceAccount() (string, error)

ServiceAccount implements GCECloud::ServiceAccount

func (*MockGCECloud) Storage

func (c *MockGCECloud) Storage() *storage.Service

Storage implements GCECloud::Storage

func (*MockGCECloud) WaitForOp

func (c *MockGCECloud) WaitForOp(op *compute.Operation) error

WaitForOp implements GCECloud::WaitForOp

func (*MockGCECloud) WithLabels

func (c *MockGCECloud) WithLabels(labels map[string]string) gce.GCECloud

WithLabels returns a copy of the MockGCECloud bound to the specified labels

func (*MockGCECloud) Zones

func (c *MockGCECloud) Zones() ([]string, error)

Zones is not implemented yet

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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