brain

package
v3.0.0-...-c77a060 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUserAuthorizedKey

func AddUserAuthorizedKey(client lib.Client, username string, key string) error

AddUserAuthorizedKey adds a key to the named user. These keys are used for logging into the management IPs for cloud servers

func CancelMigrationJob

func CancelMigrationJob(client lib.Client, id int) (err error)

CancelMigrationJob cancels all migrations on a job, given its ID

func CreateAPIKey

func CreateAPIKey(client lib.Client, username string, spec brain.APIKey) (apiKey brain.APIKey, err error)

CreateAPIKey creates an API key for the given user, then returns it. Neither the ID nor APIKey field should be specified in the spec. username may be blank if the spec.UserID is set.

func CreateMigrationJob

func CreateMigrationJob(client lib.Client, mjs brain.MigrationJobSpec) (mj brain.MigrationJob, err error)

CreateMigrationJob creates a new migration job as per the supplied specification, returning the newly created job on success or an error otherwise.

func CreateVMDefault

func CreateVMDefault(client lib.Client, spec brain.VirtualMachineDefault) (created brain.VirtualMachineDefault, err error)

CreateVMDefault creates a new VM Default with the specified parameters, returning the newly created VM Default on success or an error otherwise.

func DeleteAPIKey

func DeleteAPIKey(client lib.Client, id string) (err error)

DeleteAPIKey takes an API key id or label and revokes it.

func DeleteDiscByID

func DeleteDiscByID(client lib.Client, discID string) (err error)

DeleteDiscByID takes a disc ID and removes the specified disc from the given virtual machine

func DeleteUserAuthorizedKey

func DeleteUserAuthorizedKey(client lib.Client, username string, key string) error

DeleteUserAuthorizedKey removes a key from a user. The key may be specified in full or just the comment part (as long as it's unique)

func EditMigrationJob

func EditMigrationJob(client lib.Client, id int, migrationEdit brain.MigrationJobModification) (err error)

EditMigrationJob allows you to cancel individual or multiples discs, pools, or tails and change the priority for a job, given its ID

func GetAPIKeys

func GetAPIKeys(client lib.Client) (apiKeys brain.APIKeys, err error)

GetAPIKeys gets all API keys that you can currently see. In general this means those for your user, but users with cluster_admin will be able to see all API keys on the cluster

func GetDiscsOnStoragePool

func GetDiscsOnStoragePool(client lib.Client, id string, at string) (servers brain.Discs, err error)

GetDiscsOnStoragePool returns an array of discs on specified storage pool

func GetDiscsOnTail

func GetDiscsOnTail(client lib.Client, id string, at string) (servers brain.Discs, err error)

GetDiscsOnTail returns an array of discs on specified tail

func GetMigrationJob

func GetMigrationJob(client lib.Client, id int) (mj brain.MigrationJob, err error)

GetMigrationJob returns a single migration job, given its ID

func GetMigrationJobActiveMigrations

func GetMigrationJobActiveMigrations(client lib.Client, id int) (ms brain.Migrations, err error)

GetMigrationJobActiveMigrations returns a list of active migrations associated with the given migration job.

func GetMigrationJobs

func GetMigrationJobs(client lib.Client) (mjs brain.MigrationJobs, err error)

GetMigrationJobs returns an array of unfinished migration jobs

func GetServersOnHead

func GetServersOnHead(client lib.Client, id string, at string) (servers brain.VirtualMachines, err error)

GetServersOnHead returns an array of servers on specified head

func GetServersOnStoragePool

func GetServersOnStoragePool(client lib.Client, id string, at string) (servers brain.VirtualMachines, err error)

GetServersOnStoragePool returns an array of servers on specified storage pool

func GetServersOnTail

func GetServersOnTail(client lib.Client, id string, at string) (servers brain.VirtualMachines, err error)

GetServersOnTail returns an array of servers on specified tail

func MoveDisc

func MoveDisc(client lib.Client, vm lib.VirtualMachineName, discLabelOrID string, newVMName lib.VirtualMachineName) (err error)

MoveDisc moves the specified disc from its current server to a given server

func StartVirtualMachineWithAppliance

func StartVirtualMachineWithAppliance(client lib.Client, vmName lib.VirtualMachineName, applianceName string) (err error)

StartVirtualMachineWithAppliance starts the named virtual machine using the named appliance. returns nil on success or an error otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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