Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) AddToUnit(ctx context.Context, storages []params.StorageAddParams) ([]params.AddStorageResult, error)
- func (c *Client) Attach(ctx context.Context, unitId string, storageIds []string) ([]params.ErrorResult, error)
- func (c *Client) CreatePool(ctx context.Context, pname, provider string, attrs map[string]interface{}) error
- func (c *Client) Detach(ctx context.Context, storageIds []string, force *bool, maxWait *time.Duration) ([]params.ErrorResult, error)
- func (c *Client) Import(ctx context.Context, kind storage.StorageKind, storagePool string, ...) (names.StorageTag, error)
- func (c *Client) ListFilesystems(ctx context.Context, machines []string) ([]params.FilesystemDetailsListResult, error)
- func (c *Client) ListPools(ctx context.Context, providers, names []string) ([]params.StoragePool, error)
- func (c *Client) ListStorageDetails(ctx context.Context) ([]params.StorageDetails, error)
- func (c *Client) ListVolumes(ctx context.Context, machines []string) ([]params.VolumeDetailsListResult, error)
- func (c *Client) Remove(ctx context.Context, storageIds []string, ...) ([]params.ErrorResult, error)
- func (c *Client) RemovePool(ctx context.Context, pname string) error
- func (c *Client) StorageDetails(ctx context.Context, tags []names.StorageTag) ([]params.StorageDetailsResult, error)
- func (c *Client) UpdatePool(ctx context.Context, pname, provider string, attrs map[string]interface{}) error
- type Option
Constants ¶
This section is empty.
Variables ¶
var WithTracer = base.WithTracer
WithTracer returns an Option that configures the Client to use the supplied tracer.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { base.ClientFacade // contains filtered or unexported fields }
Client allows access to the storage API end point.
func NewClient ¶
func NewClient(st base.APICallCloser, options ...Option) *Client
NewClient creates a new client for accessing the storage API.
func (*Client) AddToUnit ¶
func (c *Client) AddToUnit(ctx context.Context, storages []params.StorageAddParams) ([]params.AddStorageResult, error)
AddToUnit adds specified storage to desired units.
NOTE(axw) for old controllers, the results will only contain errors.
func (*Client) Attach ¶
func (c *Client) Attach(ctx context.Context, unitId string, storageIds []string) ([]params.ErrorResult, error)
Attach attaches existing storage to a unit.
func (*Client) CreatePool ¶
func (c *Client) CreatePool(ctx context.Context, pname, provider string, attrs map[string]interface{}) error
CreatePool creates pool with specified parameters.
func (*Client) Detach ¶
func (c *Client) Detach(ctx context.Context, storageIds []string, force *bool, maxWait *time.Duration) ([]params.ErrorResult, error)
Detach detaches the specified storage entities.
func (*Client) Import ¶
func (c *Client) Import( ctx context.Context, kind storage.StorageKind, storagePool string, storageProviderId string, storageName string, ) (names.StorageTag, error)
Import imports storage into the model.
func (*Client) ListFilesystems ¶
func (c *Client) ListFilesystems(ctx context.Context, machines []string) ([]params.FilesystemDetailsListResult, error)
ListFilesystems lists filesystems for desired machines. If no machines provided, a list of all filesystems is returned.
func (*Client) ListPools ¶
func (c *Client) ListPools(ctx context.Context, providers, names []string) ([]params.StoragePool, error)
ListPools returns a list of pools that matches given filter. If no filter was provided, a list of all pools is returned.
func (*Client) ListStorageDetails ¶
ListStorageDetails lists all storage.
func (*Client) ListVolumes ¶
func (c *Client) ListVolumes(ctx context.Context, machines []string) ([]params.VolumeDetailsListResult, error)
ListVolumes lists volumes for desired machines. If no machines provided, a list of all volumes is returned.
func (*Client) Remove ¶
func (c *Client) Remove(ctx context.Context, storageIds []string, destroyAttachments, destroyStorage bool, force *bool, maxWait *time.Duration) ([]params.ErrorResult, error)
Remove removes the specified storage entities from the model, optionally destroying them.
func (*Client) RemovePool ¶
RemovePool removes the named pool
func (*Client) StorageDetails ¶
func (c *Client) StorageDetails(ctx context.Context, tags []names.StorageTag) ([]params.StorageDetailsResult, error)
StorageDetails retrieves details about desired storage instances.