client

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TIMEOUT = time.Hour

	DefaultCredentialNamespace = "openshift-machine-api"
	DefaultCredentialSecret    = "powervs-credentials-secret"

	InstanceStateNameShutoff = "SHUTOFF"
	InstanceStateNameActive  = "ACTIVE"
	InstanceStateNameBuild   = "BUILD"

	PowerServiceType = "power-iaas"
)

Variables

View Source
var (
	ErrorInstanceNotFound = errors.New("Instance Not Found")
)

Functions

func FormatProviderID

func FormatProviderID(instanceID string) string

func GetAPIKey

func GetAPIKey(ctrlRuntimeClient client.Client, secretName, namespace string) (apikey string, err error)

Types

type Client

type Client interface {
	CreateInstance(*p_cloud_p_vm_instances.PcloudPvminstancesPostParams) (*models.PVMInstanceList, error)
	GetInstance(id string) (*models.PVMInstance, error)
	GetInstanceByName(name string) (*models.PVMInstance, error)
	GetInstances() (*models.PVMInstances, error)
	DeleteInstance(id string) error
	GetCloudServiceInstances() ([]bluemixmodels.ServiceInstanceV2, error)
}

Client is a wrapper object for actual PowerVS SDK clients to allow for easier testing.

func NewClientMinimal

func NewClientMinimal(apiKey string) (Client, error)

NewClientMinimal is bare minimal client can be used for quarrying the resources

func NewValidatedClient

func NewValidatedClient(ctrlRuntimeClient client.Client, secretName, namespace, cloudInstanceID, region string) (Client, error)

type PowerVSClientBuilderFuncType

type PowerVSClientBuilderFuncType func(client client.Client, secretName, namespace, cloudInstanceID, region string) (Client, error)

type User

type User struct {
	ID      string
	Email   string
	Account string
	// contains filtered or unexported fields
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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