juju: github.com/juju/juju/api/storage Index | Files

package storage

import "github.com/juju/juju/api/storage"

Index

Package Files

client.go

type Client Uses

type Client struct {
    base.ClientFacade
    // contains filtered or unexported fields
}

Client allows access to the storage API end point.

func NewClient Uses

func NewClient(st base.APICallCloser) *Client

NewClient creates a new client for accessing the storage API.

func (*Client) AddToUnit Uses

func (c *Client) AddToUnit(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 Uses

func (c *Client) Attach(unitId string, storageIds []string) ([]params.ErrorResult, error)

Attach attaches existing storage to a unit.

func (*Client) CreatePool Uses

func (c *Client) CreatePool(pname, provider string, attrs map[string]interface{}) error

CreatePool creates pool with specified parameters.

func (*Client) Detach Uses

func (c *Client) Detach(storageIds []string, force *bool, maxWait *time.Duration) ([]params.ErrorResult, error)

Detach detaches the specified storage entities.

func (*Client) Import Uses

func (c *Client) Import(
    kind storage.StorageKind,
    storagePool string,
    storageProviderId string,
    storageName string,
) (names.StorageTag, error)

Import imports storage into the model.

func (*Client) ListFilesystems Uses

func (c *Client) ListFilesystems(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 Uses

func (c *Client) ListPools(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 Uses

func (c *Client) ListStorageDetails() ([]params.StorageDetails, error)

ListStorageDetails lists all storage.

func (*Client) ListVolumes Uses

func (c *Client) ListVolumes(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 Uses

func (c *Client) Remove(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 Uses

func (c *Client) RemovePool(pname string) error

RemovePool removes the named pool

func (*Client) StorageDetails Uses

func (c *Client) StorageDetails(tags []names.StorageTag) ([]params.StorageDetailsResult, error)

StorageDetails retrieves details about desired storage instances.

func (*Client) UpdatePool Uses

func (c *Client) UpdatePool(pname, provider string, attrs map[string]interface{}) error

UpdatePool updates a pool with specified parameters.

Package storage imports 6 packages (graph) and is imported by 47 packages. Updated 2019-08-23. Refresh now. Tools for package owners.