cloud

package
v0.0.0-...-4bd6544 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2016 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package cloud defines an API end point for functions dealing with the controller's cloud definition, and cloud credentials.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Clouds() (map[names.CloudTag]cloud.Cloud, error)
	Cloud(cloudName string) (cloud.Cloud, error)
	CloudCredentials(user names.UserTag, cloudName string) (map[string]cloud.Credential, error)
	ControllerModel() (Model, error)
	ControllerTag() names.ControllerTag
	ModelTag() names.ModelTag
	UpdateCloudCredential(names.CloudCredentialTag, cloud.Credential) error
	RemoveCloudCredential(names.CloudCredentialTag) error

	IsControllerAdmin(names.UserTag) (bool, error)

	Close() error
}

func NewStateBackend

func NewStateBackend(st *state.State) Backend

type CloudAPI

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

CloudAPI implements the model manager interface and is the concrete implementation of the api end point.

func NewCloudAPI

func NewCloudAPI(backend Backend, authorizer facade.Authorizer) (*CloudAPI, error)

NewCloudAPI creates a new API server endpoint for managing the controller's cloud definition and cloud credentials.

func (*CloudAPI) Cloud

func (api *CloudAPI) Cloud(args params.Entities) (params.CloudResults, error)

Cloud returns the cloud definitions for the specified clouds.

func (*CloudAPI) Clouds

func (api *CloudAPI) Clouds() (params.CloudsResult, error)

Clouds returns the definitions of all clouds supported by the controller.

func (*CloudAPI) Credential

func (api *CloudAPI) Credential(args params.Entities) (params.CloudCredentialResults, error)

Credential returns the specified cloud credential for each tag, minus secrets.

func (*CloudAPI) DefaultCloud

func (api *CloudAPI) DefaultCloud() (params.StringResult, error)

DefaultCloud returns the tag of the cloud that models will be created in by default.

func (*CloudAPI) RevokeCredentials

func (api *CloudAPI) RevokeCredentials(args params.Entities) (params.ErrorResults, error)

RevokeCredentials revokes a set of cloud credentials.

func (*CloudAPI) UpdateCredentials

func (api *CloudAPI) UpdateCredentials(args params.UpdateCloudCredentials) (params.ErrorResults, error)

UpdateCredentials updates a set of cloud credentials.

func (*CloudAPI) UserCredentials

func (api *CloudAPI) UserCredentials(args params.UserClouds) (params.StringsResults, error)

UserCredentials returns the cloud credentials for a set of users.

type Model

type Model interface {
	Cloud() string
	CloudCredential() (names.CloudCredentialTag, bool)
	CloudRegion() string
}

Jump to

Keyboard shortcuts

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