Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOpts ¶
type CreateOpts struct { string `json:"share_proto" required:"true"` // Size in GB Size int `json:"size" required:"true"` // Defines the share name Name string `json:"name,omitempty"` // Share description Description string `json:"description,omitempty"` // DisplayName is equivalent to Name. The API supports using both // This is an inherited attribute from the block storage API DisplayName string `json:"display_name,omitempty"` // DisplayDescription is equivalent to Description. The API supports using bot // This is an inherited attribute from the block storage API DisplayDescription string `json:"display_description,omitempty"` ShareType string `json:"share_type,omitempty"` // VolumeType is deprecated but supported. Either ShareType or VolumeType can be used VolumeType string `json:"volume_type,omitempty"` // The UUID from which to create a share SnapshotID string `json:"snapshot_id,omitempty"` // Determines whether or not the share is public IsPublic *bool `json:"is_public,omitempty"` // Key value pairs of user defined metadata Metadata map[string]string `json:"metadata,omitempty"` ShareNetworkID string `json:"share_network_id,omitempty"` // The UUID of the consistency group to which the share belongs to ConsistencyGroupID string `json:"consistency_group_id,omitempty"` // The availability zone of the share AvailabilityZone string `json:"availability_zone,omitempty"` }ShareProto
CreateOpts contains the options for create a Share. This object is passed to shares.Create(). For more information about these parameters, please refer to the Share object, or the shared file systems API v2 documentation
func (CreateOpts) ToShareCreateMap ¶
func (opts CreateOpts) ToShareCreateMap() (map[string]interface{}, error)
ToShareCreateMap assembles a request body based on the contents of a CreateOpts.
type CreateOptsBuilder ¶
type CreateOptsBuilder interface {
}CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult contains the result..
func Create ¶
func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create will create a new Share based on the values in CreateOpts. To extract the Share object from the response, call the Extract method on the CreateResult.
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult contains the delete results
func Delete ¶
func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult)
Delete will delete an existing Share with the given UUID.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult contains the get result
func Get ¶
func Get(client *gophercloud.ServiceClient, id string) (r GetResult)
Get will get a single share with given UUID
type Share ¶
type Share struct { string `json:"availability_zone"` Description string `json:"description,omitempty"` // Both Description and DisplayDescription can be used DisplayDescription string `json:"display_description,omitempty"` // Both DisplayName and Name can be used DisplayName string `json:"display_name,omitempty"` HasReplicas bool `json:"has_replicas"` Host string `json:"host"` ID string `json:"id"` IsPublic bool `json:"is_public,omitempty"` Links []map[string]string `json:"links"` Metadata map[string]string `json:"metadata,omitempty"` Name string `json:"name,omitempty"` ProjectID string `json:"project_id"` ReplicationType string `json:"replication_type,omitempty"` ShareNetworkID string `json:"share_network_id"` ShareProto string `json:"share_proto"` ShareServerID string `json:"share_server_id"` ShareType string `json:"share_type"` ShareTypeName string `json:"share_type_name"` Size int `json:"size"` SnapshotID string `json:"snapshot_id"` Status string `json:"status"` TaskState string `json:"task_state"` VolumeType string `json:"volume_type,omitempty"` ConsistencyGroupID string `json:"consistency_group_id"` // Used for filtering backends which either support or do not support share snapshots CreatedAt time.Time `json:"-"` }AvailabilityZone
Share contains all information associated with an OpenStack Share