Documentation
¶
Overview ¶
Package shares provides information and interaction with the different API versions for the Shared File System service, code-named Manila.
For more information, see: https://docs.openstack.org/api-ref/shared-file-system/
Example to Revert a Share to a Snapshot ID
opts := &shares.RevertOpts{ // snapshot ID to revert to SnapshotID: "ddeac769-9742-497f-b985-5bcfa94a3fd6", } manilaClient.Microversion = "2.27" err := shares.Revert(manilaClient, shareID, opts).ExtractErr() if err != nil { panic(err) }
Example to Reset a Share Status
opts := &shares.ResetStatusOpts{ // a new Share Status Status: "available", } manilaClient.Microversion = "2.7" err := shares.ResetStatus(manilaClient, shareID, opts).ExtractErr() if err != nil { panic(err) }
Example to Force Delete a Share
manilaClient.Microversion = "2.7" err := shares.ForceDelete(manilaClient, shareID).ExtractErr() if err != nil { panic(err) }
Example to Unmanage a Share
manilaClient.Microversion = "2.7" err := shares.Unmanage(manilaClient, shareID).ExtractErr() if err != nil { panic(err) }
Index ¶
- func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type AccessRight
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteMetadatumResult
- type DeleteResult
- type ExportLocation
- type ExtendOpts
- type ExtendOptsBuilder
- type ExtendResult
- type ForceDeleteResult
- type GetExportLocationResult
- type GetMetadatumResult
- type GetResult
- type GrantAccessOpts
- type GrantAccessOptsBuilder
- type GrantAccessResult
- type ListAccessRightsResult
- type ListExportLocationsResult
- type ListOpts
- type ListOptsBuilder
- type MetadataResult
- func GetMetadata(client *gophercloud.ServiceClient, id string) (r MetadataResult)
- func SetMetadata(client *gophercloud.ServiceClient, id string, opts SetMetadataOptsBuilder) (r MetadataResult)
- func UpdateMetadata(client *gophercloud.ServiceClient, id string, opts UpdateMetadataOptsBuilder) (r MetadataResult)
- type ResetStatusOpts
- type ResetStatusOptsBuilder
- type ResetStatusResult
- type RevertOpts
- type RevertOptsBuilder
- type RevertResult
- type RevokeAccessOpts
- type RevokeAccessOptsBuilder
- type RevokeAccessResult
- type SetMetadataOpts
- type SetMetadataOptsBuilder
- type Share
- type SharePage
- type ShrinkOpts
- type ShrinkOptsBuilder
- type ShrinkResult
- type UnmanageResult
- type UpdateMetadataOpts
- type UpdateMetadataOptsBuilder
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListDetail ¶
func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
ListDetail returns []Share optionally limited by the conditions provided in ListOpts.
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 both // 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 DeleteMetadatumResult ¶ added in v0.3.0
type DeleteMetadatumResult struct {
gophercloud.ErrResult
}
DeleteMetadatumResult contains the response body and error from a DeleteMetadatum request.
func DeleteMetadatum ¶ added in v0.3.0
func DeleteMetadatum(client *gophercloud.ServiceClient, id, key string) (r DeleteMetadatumResult)
DeleteMetadatum deletes a single key-value pair from the metadata of the specified share.
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 ExtendOpts ¶
type ExtendOpts struct { // New size in GBs. NewSize int `json:"new_size"` }
ExtendOpts contains options for extending a Share. For more information about these parameters, please, refer to the shared file systems API v2, Share Actions, Extend share documentation
func (ExtendOpts) ToShareExtendMap ¶
func (opts ExtendOpts) ToShareExtendMap() (map[string]interface{}, error)
ToShareExtendMap assembles a request body based on the contents of a ExtendOpts.
type ExtendOptsBuilder ¶
type ExtendOptsBuilder interface {
}ExtendOptsBuilder allows extensions to add additional parameters to the Extend request.
type ExtendResult ¶
type ExtendResult struct {
gophercloud.ErrResult
}
ExtendResult contains the response body and error from an Extend request.
func Extend ¶
func Extend(client *gophercloud.ServiceClient, id string, opts ExtendOptsBuilder) (r ExtendResult)
Extend will extend the capacity of an existing share. ExtendResult contains only the error. To extract it, call the ExtractErr method on the ExtendResult. Client must have Microversion set; minimum supported microversion for Extend is 2.7.
type ForceDeleteResult ¶ added in v0.10.0
type ForceDeleteResult struct {
gophercloud.ErrResult
}
ForceDeleteResult contains the response error from an ForceDelete request.
func ForceDelete ¶ added in v0.10.0
func ForceDelete(client *gophercloud.ServiceClient, id string) (r ForceDeleteResult)
ForceDelete will delete the existing share in any state. ForceDeleteResult contains only the error. To extract it, call the ExtractErr method on the ForceDeleteResult. Client must have Microversion set; minimum supported microversion for ForceDelete is 2.7.
type GetExportLocationResult ¶ added in v0.10.0
type GetExportLocationResult struct {
gophercloud.Result
}
GetExportLocationResult contains the result body and error from a GetExportLocation request.
func GetExportLocation ¶ added in v0.10.0
func GetExportLocation(client *gophercloud.ServiceClient, shareID string, id string) (r GetExportLocationResult)
GetExportLocation will get shareID's export location by an ID. Client must have Microversion set; minimum supported microversion for GetExportLocation is 2.9.
func (GetExportLocationResult) Extract ¶ added in v0.10.0
func (r GetExportLocationResult) Extract() (*ExportLocation, error)
Extract will get the Export Location from the GetExportLocationResult
type GetMetadatumResult ¶ added in v0.3.0
type GetMetadatumResult struct {
gophercloud.Result
}
GetMetadatumResult contains the response body and error from a GetMetadatum request.
func GetMetadatum ¶ added in v0.3.0
func GetMetadatum(client *gophercloud.ServiceClient, id, key string) (r GetMetadatumResult)
GetMetadatum retrieves a single metadata item of the specified share. To extract the retrieved metadata from the response, call the Extract method on the GetMetadatumResult.
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 ListAccessRightsResult ¶
type ListAccessRightsResult struct {
gophercloud.Result
}
ListAccessRightsResult contains the result body and error from a ListAccessRights request.
func ListAccessRights ¶
func ListAccessRights(client *gophercloud.ServiceClient, id string) (r ListAccessRightsResult)
ListAccessRights lists all access rules assigned to a Share based on its id. To extract the AccessRight slice from the response, call the Extract method on the ListAccessRightsResult. Client must have Microversion set; minimum supported microversion for ListAccessRights is 2.7.
func (ListAccessRightsResult) Extract ¶
func (r ListAccessRightsResult) Extract() ([]AccessRight, error)
Extract will get a slice of AccessRight objects from the commonResult
type ListExportLocationsResult ¶ added in v0.10.0
type ListExportLocationsResult struct {
gophercloud.Result
}
ListExportLocationsResult contains the result body and error from a ListExportLocations request.
func ListExportLocations ¶ added in v0.10.0
func ListExportLocations(client *gophercloud.ServiceClient, id string) (r ListExportLocationsResult)
ListExportLocations will list shareID's export locations. Client must have Microversion set; minimum supported microversion for ListExportLocations is 2.9.
func (ListExportLocationsResult) Extract ¶ added in v0.10.0
func (r ListExportLocationsResult) Extract() ([]ExportLocation, error)
Extract will get the Export Locations from the ListExportLocationsResult
type ListOpts ¶
type ListOpts struct { // (Admin only). Defines whether to list the requested resources for all projects. AllTenants bool `q:"all_tenants"` // The share name. Name string `q:"name"` // Filters by a share status. Status string `q:"status"` ShareServerID string `q:"share_server_id"` // One or more metadata key and value pairs as a dictionary of strings. Metadata map[string]string `q:"metadata"` // The extra specifications for the share type. ExtraSpecs map[string]string `q:"extra_specs"` ShareTypeID string `q:"share_type_id"` // The maximum number of shares to return. Limit int `q:"limit"` // The offset to define start point of share or share group listing. Offset int `q:"offset"` // The key to sort a list of shares. SortKey string `q:"sort_key"` // The direction to sort a list of shares. SortDir string `q:"sort_dir"` // The UUID of the share’s base snapshot to filter the request based on. SnapshotID string `q:"snapshot_id"` // The share host name. Host string `q:"host"` ShareNetworkID string `q:"share_network_id"` // The UUID of the project in which the share was created. Useful with all_tenants parameter. ProjectID string `q:"project_id"` // The level of visibility for the share. IsPublic *bool `q:"is_public"` ShareGroupID string `q:"share_group_id"` // The export location UUID that can be used to filter shares or share instances. ExportLocationID string `q:"export_location_id"` // The export location path that can be used to filter shares or share instances. ExportLocationPath string `q:"export_location_path"` // The name pattern that can be used to filter shares, share snapshots, share networks or share groups. NamePattern string `q:"name~"` // The description pattern that can be used to filter shares, share snapshots, share networks or share groups. DescriptionPattern string `q:"description~"` // Whether to show count in API response or not, default is False. WithCount bool `q:"with_count"` // DisplayName is equivalent to Name. The API supports using both // This is an inherited attribute from the block storage API DisplayName string `q:"display_name"` // Equivalent to NamePattern. DisplayNamePattern string `q:"display_name~"` // VolumeTypeID is deprecated but supported. Either ShareTypeID or VolumeTypeID can be used VolumeTypeID string `q:"volume_type_id"` ShareGroupSnapshotID string `q:"share_group_snapshot_id"` // DisplayDescription is equivalent to Description. The API supports using both // This is an inherited attribute from the block storage API DisplayDescription string `q:"display_description"` // Equivalent to DescriptionPattern DisplayDescriptionPattern string `q:"display_description~"` }
ListOpts holds options for listing Shares. It is passed to the shares.List function.
func (ListOpts) ToShareListQuery ¶
ToShareListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
type ListOptsBuilder interface {
}ListOptsBuilder allows extensions to add additional parameters to the List request.
type MetadataResult ¶ added in v0.3.0
type MetadataResult struct {
gophercloud.Result
}
MetadataResult contains the response body and error from GetMetadata, SetMetadata or UpdateMetadata requests.
func GetMetadata ¶ added in v0.3.0
func GetMetadata(client *gophercloud.ServiceClient, id string) (r MetadataResult)
GetMetadata retrieves metadata of the specified share. To extract the retrieved metadata from the response, call the Extract method on the MetadataResult.
func SetMetadata ¶ added in v0.3.0
func SetMetadata(client *gophercloud.ServiceClient, id string, opts SetMetadataOptsBuilder) (r MetadataResult)
SetMetadata sets metadata of the specified share. Existing metadata items are either kept or overwritten by the metadata from the request. To extract the updated metadata from the response, call the Extract method on the MetadataResult.
func UpdateMetadata ¶ added in v0.3.0
func UpdateMetadata(client *gophercloud.ServiceClient, id string, opts UpdateMetadataOptsBuilder) (r MetadataResult)
UpdateMetadata updates metadata of the specified share. All existing metadata items are discarded and replaced by the metadata from the request. To extract the updated metadata from the response, call the Extract method on the MetadataResult.
type ResetStatusOpts ¶ added in v0.10.0
type ResetStatusOpts struct { // Status is a share status to reset to. Must be "new", "error" or "active". Status string `json:"status"` }
ResetStatusOpts contains options for resetting a Share status. For more information about these parameters, please, refer to the shared file systems API v2, Share Actions, ResetStatus share documentation.
func (ResetStatusOpts) ToShareResetStatusMap ¶ added in v0.10.0
func (opts ResetStatusOpts) ToShareResetStatusMap() (map[string]interface{}, error)
ToShareResetStatusMap assembles a request body based on the contents of a ResetStatusOpts.
type ResetStatusOptsBuilder ¶ added in v0.10.0
type ResetStatusOptsBuilder interface {
}ResetStatusOptsBuilder allows extensions to add additional parameters to the ResetStatus request.
type ResetStatusResult ¶ added in v0.10.0
type ResetStatusResult struct {
gophercloud.ErrResult
}
ResetStatusResult contains the response error from an ResetStatus request.
func ResetStatus ¶ added in v0.10.0
func ResetStatus(client *gophercloud.ServiceClient, id string, opts ResetStatusOptsBuilder) (r ResetStatusResult)
ResetStatus will reset the existing share status. ResetStatusResult contains only the error. To extract it, call the ExtractErr method on the ResetStatusResult. Client must have Microversion set; minimum supported microversion for ResetStatus is 2.7.
type RevertOpts ¶ added in v0.10.0
type RevertOpts struct { // SnapshotID is a Snapshot ID to revert a Share to SnapshotID string `json:"snapshot_id"` }
RevertOpts contains options for reverting a Share to a snapshot. For more information about these parameters, please, refer to the shared file systems API v2, Share Actions, Revert share documentation. Available only since Manila Microversion 2.27
func (RevertOpts) ToShareRevertMap ¶ added in v0.10.0
func (opts RevertOpts) ToShareRevertMap() (map[string]interface{}, error)
ToShareRevertMap assembles a request body based on the contents of a RevertOpts.
type RevertOptsBuilder ¶ added in v0.10.0
type RevertOptsBuilder interface {
}RevertOptsBuilder allows extensions to add additional parameters to the Revert request.
type RevertResult ¶ added in v0.10.0
type RevertResult struct {
gophercloud.ErrResult
}
RevertResult contains the response error from an Revert request.
func Revert ¶ added in v0.10.0
func Revert(client *gophercloud.ServiceClient, id string, opts RevertOptsBuilder) (r RevertResult)
Revert will revert the existing share to a Snapshot. RevertResult contains only the error. To extract it, call the ExtractErr method on the RevertResult. Client must have Microversion set; minimum supported microversion for Revert is 2.27.
type RevokeAccessOpts ¶
type RevokeAccessOpts struct {
AccessID string `json:"access_id"`
}
RevokeAccessOpts contains the options for creation of a RevokeAccess request. For more information about these parameters, please, refer to the shared file systems API v2, Share Actions, Revoke Access documentation
func (RevokeAccessOpts) ToRevokeAccessMap ¶
func (opts RevokeAccessOpts) ToRevokeAccessMap() (map[string]interface{}, error)
ToRevokeAccessMap assembles a request body based on the contents of a RevokeAccessOpts.
type RevokeAccessOptsBuilder ¶
RevokeAccessOptsBuilder allows extensions to add additional parameters to the RevokeAccess request.
type RevokeAccessResult ¶
type RevokeAccessResult struct {
gophercloud.ErrResult
}
RevokeAccessResult contains the response body and error from a Revoke access request.
func RevokeAccess ¶
func RevokeAccess(client *gophercloud.ServiceClient, id string, opts RevokeAccessOptsBuilder) (r RevokeAccessResult)
RevokeAccess will revoke an existing access to a Share based on the values in RevokeAccessOpts. RevokeAccessResult contains only the error. To extract it, call the ExtractErr method on the RevokeAccessResult. Client must have Microversion set; minimum supported microversion for RevokeAccess is 2.7.
type SetMetadataOpts ¶ added in v0.3.0
SetMetadataOpts contains options for setting share metadata. For more information about these parameters, please, refer to the shared file systems API v2, Share Metadata, Show share metadata documentation.
func (SetMetadataOpts) ToSetMetadataMap ¶ added in v0.3.0
func (opts SetMetadataOpts) ToSetMetadataMap() (map[string]interface{}, error)
ToSetMetadataMap assembles a request body based on the contents of an SetMetadataOpts.
type SetMetadataOptsBuilder ¶ added in v0.3.0
SetMetadataOptsBuilder allows extensions to add additional parameters to the SetMetadata request.
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:"-"` UpdatedAt time.Time `json:"-"` }AvailabilityZone
Share contains all information associated with an OpenStack Share
func ExtractShares ¶
func ExtractShares(r pagination.Page) ([]Share, error)
ExtractShares extracts and returns a Share slice. It is used while iterating over a shares.List call.
func (*Share) UnmarshalJSON ¶
type SharePage ¶
type SharePage struct {
}SharePage is a pagination.pager that is returned from a call to the List function.
func (SharePage) LastMarker ¶
LastMarker returns the last offset in a ListResult.
func (SharePage) NextPageURL ¶
NextPageURL generates the URL for the page of results after this one.
type ShrinkOpts ¶
type ShrinkOpts struct { // New size in GBs. NewSize int `json:"new_size"` }
ShrinkOpts contains options for shrinking a Share. For more information about these parameters, please, refer to the shared file systems API v2, Share Actions, Shrink share documentation
func (ShrinkOpts) ToShareShrinkMap ¶
func (opts ShrinkOpts) ToShareShrinkMap() (map[string]interface{}, error)
ToShareShrinkMap assembles a request body based on the contents of a ShrinkOpts.
type ShrinkOptsBuilder ¶
type ShrinkOptsBuilder interface {
}ShrinkOptsBuilder allows extensions to add additional parameters to the Shrink request.
type ShrinkResult ¶
type ShrinkResult struct {
gophercloud.ErrResult
}
ShrinkResult contains the response body and error from a Shrink request.
func Shrink ¶
func Shrink(client *gophercloud.ServiceClient, id string, opts ShrinkOptsBuilder) (r ShrinkResult)
Shrink will shrink the capacity of an existing share. ShrinkResult contains only the error. To extract it, call the ExtractErr method on the ShrinkResult. Client must have Microversion set; minimum supported microversion for Shrink is 2.7.
type UnmanageResult ¶ added in v0.10.0
type UnmanageResult struct {
gophercloud.ErrResult
}
UnmanageResult contains the response error from an Unmanage request.
func Unmanage ¶ added in v0.10.0
func Unmanage(client *gophercloud.ServiceClient, id string) (r UnmanageResult)
Unmanage will remove a share from the management of the Shared File System service without deleting the share. UnmanageResult contains only the error. To extract it, call the ExtractErr method on the UnmanageResult. Client must have Microversion set; minimum supported microversion for Unmanage is 2.7.
type UpdateMetadataOpts ¶ added in v0.3.0
UpdateMetadataOpts contains options for updating share metadata. For more information about these parameters, please, refer to the shared file systems API v2, Share Metadata, Update share metadata documentation.
func (UpdateMetadataOpts) ToUpdateMetadataMap ¶ added in v0.3.0
func (opts UpdateMetadataOpts) ToUpdateMetadataMap() (map[string]interface{}, error)
ToUpdateMetadataMap assembles a request body based on the contents of an UpdateMetadataOpts.
type UpdateMetadataOptsBuilder ¶ added in v0.3.0
UpdateMetadataOptsBuilder allows extensions to add additional parameters to the UpdateMetadata request.
type UpdateOpts ¶
type UpdateOpts struct { // Share name. Manila share update logic doesn't have a "name" alias. DisplayName *string `json:"display_name,omitempty"` // Share description. Manila share update logic doesn't have a "description" alias. DisplayDescription *string `json:"display_description,omitempty"` // Determines whether or not the share is public IsPublic *bool `json:"is_public,omitempty"` }
UpdateOpts contain options for updating an existing Share. This object is passed to the share.Update function. For more information about the parameters, see the Share object.
func (UpdateOpts) ToShareUpdateMap ¶
func (opts UpdateOpts) ToShareUpdateMap() (map[string]interface{}, error)
ToShareUpdateMap assembles a request body based on the contents of an UpdateOpts.
type UpdateOptsBuilder ¶
type UpdateOptsBuilder interface {
}UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult contains the response body and error from an Update request.
func Update ¶
func Update(client *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update will update the Share with provided information. To extract the updated Share from the response, call the Extract method on the UpdateResult.