clients

package
v0.0.0-...-243b762 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CloudsSecretKey = "clouds.yaml"

	TimeoutTrunkDelete       = 3 * time.Minute
	RetryIntervalTrunkDelete = 5 * time.Second

	TimeoutPortDelete       = 3 * time.Minute
	RetryIntervalPortDelete = 5 * time.Second
)

Variables

This section is empty.

Functions

func CreatePort

func CreatePort(is *InstanceService, name string, net ServerNetwork, securityGroups *[]string) (ports.Port, error)

func GetCloudFromSecret

func GetCloudFromSecret(kubeClient kubernetes.Interface, namespace string, secretName string, cloudName string) (clientconfig.Cloud, error)

func GetSecurityGroups

func GetSecurityGroups(is *InstanceService, sg_param []openstackconfigv1.SecurityGroupParam) ([]string, error)

func GetTrunkSupport

func GetTrunkSupport(is *InstanceService) (bool, error)

Types

type Instance

type Instance struct {
	servers.Server
}

type InstanceListOpts

type InstanceListOpts struct {
	// Name of the image in URL format.
	Image string `q:"image"`

	// Name of the flavor in URL format.
	Flavor string `q:"flavor"`

	// Name of the server as a string; can be queried with regular expressions.
	// Realize that ?name=bob returns both bob and bobb. If you need to match bob
	// only, you can use a regular expression matching the syntax of the
	// underlying database server implemented for Compute.
	Name string `q:"name"`
}

type InstanceService

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

func NewInstanceService

func NewInstanceService() (*InstanceService, error)

func NewInstanceServiceFromCloud

func NewInstanceServiceFromCloud(cloud clientconfig.Cloud) (*InstanceService, error)

func NewInstanceServiceFromMachine

func NewInstanceServiceFromMachine(kubeClient kubernetes.Interface, machine *machinev1.Machine) (*InstanceService, error)

TODO: Eventually we'll have a NewInstanceServiceFromCluster too

func (*InstanceService) AssociateFloatingIP

func (is *InstanceService) AssociateFloatingIP(instanceID, floatingIP string) error

func (*InstanceService) GetAcceptableFloatingIP

func (is *InstanceService) GetAcceptableFloatingIP() (string, error)

func (*InstanceService) GetInstance

func (is *InstanceService) GetInstance(resourceId string) (instance *Instance, err error)

func (*InstanceService) GetInstanceList

func (is *InstanceService) GetInstanceList(opts *InstanceListOpts) ([]*Instance, error)

func (*InstanceService) InstanceCreate

func (is *InstanceService) InstanceCreate(clusterName string, name string, clusterSpec *openstackconfigv1.OpenstackClusterProviderSpec, config *openstackconfigv1.OpenstackProviderSpec, cmd string, keyName string) (instance *Instance, err error)

InstanceCreate creates a compute instance

func (*InstanceService) InstanceDelete

func (is *InstanceService) InstanceDelete(id string) error

func (*InstanceService) UpdateToken

func (is *InstanceService) UpdateToken() error

UpdateToken to update token if need.

type NetworkService

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

NetworkService interfaces with the OpenStack Networking API. It will create a network related infrastructure for the cluster, like network, subnet, router.

func NewNetworkService

func NewNetworkService(client *gophercloud.ServiceClient) (*NetworkService, error)

NewNetworkService returns an instance for the OpenStack Networking API

func (*NetworkService) Reconcile

Reconcile the Network for a given cluster

type SecGroupService

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

SecGroupService interfaces with the OpenStack Networking API. It will create security groups if they're managed.

func NewSecGroupService

func NewSecGroupService(client *gophercloud.ServiceClient) (*SecGroupService, error)

NewSecGroupService returns an initialised instance of SecGroupService.

func (*SecGroupService) Delete

func (*SecGroupService) Reconcile

Reconcile the security groups.

type ServerNetwork

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

Jump to

Keyboard shortcuts

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