client

package
v0.0.0-...-194264a Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2018 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 Client

type Client struct {
	ControllerURL  string
	TenantID       string
	CACertFile     string
	ClientCertFile string

	Tenants []string
	// contains filtered or unexported fields
}

Client represents a client for accessing ciao controller

func (*Client) AddExternalIPAddresses

func (client *Client) AddExternalIPAddresses(pool string, IPs []string) error

AddExternalIPAddresses adds a set of IP addresses to the external IP pool

func (*Client) AddExternalIPSubnet

func (client *Client) AddExternalIPSubnet(pool string, subnet *net.IPNet) error

AddExternalIPSubnet adds a subnet to the external IP pool

func (*Client) AttachVolume

func (client *Client) AttachVolume(volumeID string, instanceID, mountPoint string, mode string) error

AttachVolume attaches a volume to an instance

func (*Client) ChangeNodeStatus

func (client *Client) ChangeNodeStatus(nodeID string, status types.NodeStatusType) error

ChangeNodeStatus modifies the status of a node

func (*Client) CreateExternalIPPool

func (client *Client) CreateExternalIPPool(name string) error

CreateExternalIPPool creates a pool of IPs

func (*Client) CreateImage

func (client *Client) CreateImage(name string, visibility types.Visibility, ID string, data io.Reader) (string, error)

CreateImage creates and uploads a new image

func (*Client) CreateInstances

func (client *Client) CreateInstances(request api.CreateServerRequest) (api.Servers, error)

CreateInstances creates instances by the given request

func (*Client) CreateTenantConfig

func (client *Client) CreateTenantConfig(tenantID string, config types.TenantConfig) (types.TenantSummary, error)

CreateTenantConfig creates a new tenant configuration

func (*Client) CreateVolume

func (client *Client) CreateVolume(req api.RequestedVolume) (types.Volume, error)

CreateVolume creates a volume from a request

func (*Client) CreateWorkload

func (client *Client) CreateWorkload(request types.Workload) (types.Workload, error)

CreateWorkload creates a worklaod

func (*Client) DeleteAllInstances

func (client *Client) DeleteAllInstances() error

DeleteAllInstances deletes all the instances

func (*Client) DeleteEvents

func (client *Client) DeleteEvents() error

DeleteEvents deletes all events

func (*Client) DeleteExternalIPPool

func (client *Client) DeleteExternalIPPool(pool string) error

DeleteExternalIPPool deletes the pool of the given name

func (*Client) DeleteImage

func (client *Client) DeleteImage(imageID string) error

DeleteImage deletes the given image

func (*Client) DeleteInstance

func (client *Client) DeleteInstance(instanceID string) error

DeleteInstance deletes the given instance

func (*Client) DeleteTenant

func (client *Client) DeleteTenant(tenantID string) error

DeleteTenant deletes the given tenant

func (*Client) DeleteVolume

func (client *Client) DeleteVolume(volumeID string) error

DeleteVolume deletes a volume

func (*Client) DeleteWorkload

func (client *Client) DeleteWorkload(workloadID string) error

DeleteWorkload deletes the given workload

func (*Client) DetachVolume

func (client *Client) DetachVolume(volumeID string) error

DetachVolume detaches a volume from an instance

func (*Client) GetCNCI

func (client *Client) GetCNCI(cnciID string) (types.CiaoCNCI, error)

GetCNCI returns information about a CNCI

func (*Client) GetExternalIPPool

func (client *Client) GetExternalIPPool(name string) (types.Pool, error)

GetExternalIPPool gets the details of a single external IP pool

func (*Client) GetImage

func (client *Client) GetImage(imageID string) (types.Image, error)

GetImage retrieves the details for an image

func (*Client) GetInstance

func (client *Client) GetInstance(instanceID string) (api.Server, error)

GetInstance gets the details of a single instances

func (*Client) GetTenantConfig

func (client *Client) GetTenantConfig(ID string) (types.TenantConfig, error)

GetTenantConfig gets the tenant configuration

func (*Client) GetTraceData

func (client *Client) GetTraceData(label string) (types.CiaoTraceData, error)

GetTraceData returns trace details

func (*Client) GetVolume

func (client *Client) GetVolume(volumeID string) (types.Volume, error)

GetVolume gets the details of a single volume

func (*Client) GetWorkload

func (client *Client) GetWorkload(workloadID string) (types.Workload, error)

GetWorkload gets the given workload

func (*Client) Init

func (client *Client) Init() error

Init initialises a client for making requests

func (*Client) IsPrivileged

func (client *Client) IsPrivileged() bool

IsPrivileged returns true if the user has admin privileges

func (*Client) ListCNCIs

func (client *Client) ListCNCIs() (types.CiaoCNCIs, error)

ListCNCIs returns the set of CNCIs

func (*Client) ListComputeNodes

func (client *Client) ListComputeNodes() (types.CiaoNodes, error)

ListComputeNodes returns the set of compute nodes

func (*Client) ListEvents

func (client *Client) ListEvents(tenantID string) (types.CiaoEvents, error)

ListEvents retrieves the events for either all or the desired tenant

func (*Client) ListExternalIPPools

func (client *Client) ListExternalIPPools() (types.ListPoolsResponse, error)

ListExternalIPPools lists the pools in which IPs are available

func (*Client) ListExternalIPs

func (client *Client) ListExternalIPs() ([]types.MappedIP, error)

ListExternalIPs returns the mapped IPs

func (*Client) ListImages

func (client *Client) ListImages() ([]types.Image, error)

ListImages retrieves the set of available images

func (*Client) ListInstances

func (client *Client) ListInstances() (api.Servers, error)

ListInstances gets the set of instances

func (*Client) ListInstancesByNode

func (client *Client) ListInstancesByNode(nodeID string) (types.CiaoServersStats, error)

ListInstancesByNode gets the instances on a given node

func (*Client) ListInstancesByWorkload

func (client *Client) ListInstancesByWorkload(tenantID string, workloadID string) (api.Servers, error)

ListInstancesByWorkload provides the list of instances for a given tenant and workloadID.

func (*Client) ListNetworkNodes

func (client *Client) ListNetworkNodes() (types.CiaoNodes, error)

ListNetworkNodes returns the set of network nodes

func (*Client) ListNodes

func (client *Client) ListNodes() (types.CiaoNodes, error)

ListNodes returns the set of nodes

func (*Client) ListQuotas

func (client *Client) ListQuotas(tenantID string) ([]types.QuotaDetails, error)

ListQuotas lists the quotas for the specified tenant

func (*Client) ListTenantQuotas

func (client *Client) ListTenantQuotas() (types.CiaoTenantResources, error)

ListTenantQuotas gets legacy tenant quota information

func (*Client) ListTenantResources

func (client *Client) ListTenantResources() (types.CiaoUsageHistory, error)

ListTenantResources gets tenant usage information

func (*Client) ListTenants

func (client *Client) ListTenants() (types.TenantsListResponse, error)

ListTenants returns a list of the tenants

func (*Client) ListTraceLabels

func (client *Client) ListTraceLabels() (types.CiaoTracesSummary, error)

ListTraceLabels returns a list of trace labels

func (*Client) ListVolumes

func (client *Client) ListVolumes() ([]types.Volume, error)

ListVolumes lists the volumes

func (*Client) ListWorkloads

func (client *Client) ListWorkloads() ([]types.Workload, error)

ListWorkloads gets the workloads available

func (*Client) MapExternalIP

func (client *Client) MapExternalIP(pool string, instanceID string) error

MapExternalIP maps an IP from the pool to the given instance

func (*Client) RemoveExternalIPAddress

func (client *Client) RemoveExternalIPAddress(pool string, IP string) error

RemoveExternalIPAddress removes a single IP address from the pool

func (*Client) RemoveExternalIPSubnet

func (client *Client) RemoveExternalIPSubnet(pool string, subnet *net.IPNet) error

RemoveExternalIPSubnet removes a subnet from the pool

func (*Client) StartInstance

func (client *Client) StartInstance(instanceID string) error

StartInstance stops the given instance

func (*Client) StopInstance

func (client *Client) StopInstance(instanceID string) error

StopInstance stops the given instance

func (*Client) UnmapExternalIP

func (client *Client) UnmapExternalIP(address string) error

UnmapExternalIP unmaps the given address from an instance

func (*Client) UpdateQuotas

func (client *Client) UpdateQuotas(tenantID string, quotas []types.QuotaDetails) error

UpdateQuotas updates the quotas for a given tenant

func (*Client) UpdateTenantConfig

func (client *Client) UpdateTenantConfig(ID string, config types.TenantConfig) error

UpdateTenantConfig updates the tenant configuration

Jump to

Keyboard shortcuts

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