Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessRight ¶
type AccessRight struct { string `json:"share_id"` // The access rule type that can be "ip", "cert" or "user". AccessType string `json:"access_type,omitempty"` // The value that defines the access that can be a valid format of IP, cert or user. AccessTo string `json:"access_to,omitempty"` // The access credential of the entity granted share access. AccessKey string `json:"access_key,omitempty"` // The access level to the share is either "rw" or "ro". AccessLevel string `json:"access_level,omitempty"` // The state of the access rule State string `json:"state,omitempty"` // The access rule ID. ID string `json:"id"` }ShareID
AccessRight contains all information associated with an OpenStack share Grant Access Response
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 response body and error from a Create request.
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 response body and error from a Delete request.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult)
Delete will delete an existing Share with the given UUID.
type ExportLocation ¶
type ExportLocation struct { // The export location path that should be used for mount operation. Path string `json:"path"` ShareInstanceID string `json:"share_instance_id"` // Defines purpose of an export location. // If set to true, then it is expected to be used for service needs // and by administrators only. // If it is set to false, then this export location can be used by end users. IsAdminOnly bool `json:"is_admin_only"` // The share export location UUID. ID string `json:"id"` // Drivers may use this field to identify which export locations are // most efficient and should be used preferentially by clients. // By default it is set to false value. New in version 2.14 Preferred bool `json:"preferred"` }
ExportLocation contains all information associated with a share export location
type GetExportLocationsResult ¶
type GetExportLocationsResult struct {
gophercloud.Result
}
GetExportLocationsResult contains the result body and error from an GetExportLocations request.
func GetExportLocations ¶
func GetExportLocations(client *gophercloud.ServiceClient, id string) (r GetExportLocationsResult)
GetExportLocations will get shareID's export locations. Client must have Microversion set; minimum supported microversion for GetExportLocations is 2.14.
func (GetExportLocationsResult) Extract ¶
func (r GetExportLocationsResult) Extract() ([]ExportLocation, error)
Extract will get the Export Locations from the commonResult
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult contains the response body and error from a Get request.
func Get ¶
func Get(client *gophercloud.ServiceClient, id string) (r GetResult)
Get will get a single share with given UUID
type GrantAccessOpts ¶
type GrantAccessOpts struct { // The access rule type that can be "ip", "cert" or "user". AccessType string `json:"access_type"` // The value that defines the access that can be a valid format of IP, cert or user. AccessTo string `json:"access_to"` // The access level to the share is either "rw" or "ro". AccessLevel string `json:"access_level"` }
GrantAccessOpts contains the options for creation of an GrantAccess request. For more information about these parameters, please, refer to the shared file systems API v2, Share Actions, Grant Access documentation
func (GrantAccessOpts) ToGrantAccessMap ¶
func (opts GrantAccessOpts) ToGrantAccessMap() (map[string]interface{}, error)
ToGrantAccessMap assembles a request body based on the contents of a GrantAccessOpts.
type GrantAccessOptsBuilder ¶
GrantAccessOptsBuilder allows extensions to add additional parameters to the GrantAccess request.
type GrantAccessResult ¶
type GrantAccessResult struct {
gophercloud.Result
}
GrantAccessResult contains the result body and error from an GrantAccess request.
func GrantAccess ¶
func GrantAccess(client *gophercloud.ServiceClient, id string, opts GrantAccessOptsBuilder) (r GrantAccessResult)
GrantAccess will grant access to a Share based on the values in GrantAccessOpts. To extract the GrantAccess object from the response, call the Extract method on the GrantAccessResult. Client must have Microversion set; minimum supported microversion for GrantAccess is 2.7.
func (GrantAccessResult) Extract ¶
func (r GrantAccessResult) Extract() (*AccessRight, error)
Extract will get the GrantAccess object from the commonResult
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