Documentation ¶
Index ¶
- func IDFromName(client *gophercloud.ServiceClient, name string) (string, error)
- func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type AccessOpts
- type AddAccessOptsBuilder
- type AddAccessResult
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type ExtraSpecs
- type ExtraSpecsOpts
- type GetDefaultResult
- type GetExtraSpecsResult
- type ListOpts
- type ListOptsBuilder
- type RemoveAccessOptsBuilder
- type RemoveAccessResult
- type SetExtraSpecsOpts
- type SetExtraSpecsOptsBuilder
- type SetExtraSpecsResult
- type ShareType
- type ShareTypeAccess
- type ShareTypePage
- type ShowAccessResult
- type UnsetExtraSpecsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IDFromName ¶ added in v0.3.0
func IDFromName(client *gophercloud.ServiceClient, name string) (string, error)
IDFromName is a convenience function that returns a share-type's ID given its name.
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns ShareTypes optionally limited by the conditions provided in ListOpts.
Types ¶
type AccessOpts ¶
type AccessOpts struct { // The UUID of the project to which access to the share type is granted. Project string `json:"project"` }
func (AccessOpts) ToAddAccessMap ¶
func (opts AccessOpts) ToAddAccessMap() (map[string]interface{}, error)
ToAddAccessMap assembles a request body based on the contents of a AccessOpts.
func (AccessOpts) ToRemoveAccessMap ¶
func (opts AccessOpts) ToRemoveAccessMap() (map[string]interface{}, error)
ToRemoveAccessMap assembles a request body based on the contents of a AccessOpts.
type AddAccessOptsBuilder ¶
AddAccessOptsBuilder allows extensions to add additional parameters to the AddAccess
type AddAccessResult ¶
type AddAccessResult struct {
gophercloud.ErrResult
}
AddAccessResult contains the response body and error from a Add Access request.
func AddAccess ¶
func AddAccess(client *gophercloud.ServiceClient, id string, opts AddAccessOptsBuilder) (r AddAccessResult)
AddAccess will add access to a ShareType based on the values in AccessOpts.
type CreateOpts ¶
type CreateOpts struct { // The share type name Name string `json:"name" required:"true"` // Indicates whether a share type is publicly accessible IsPublic bool `json:"os-share-type-access:is_public"` // The extra specifications for the share type ExtraSpecs ExtraSpecsOpts `json:"extra_specs" required:"true"` }
CreateOpts contains options for creating a ShareType. This object is passed to the sharetypes.Create function. For more information about these parameters, see the ShareType object.
func (CreateOpts) ToShareTypeCreateMap ¶
func (opts CreateOpts) ToShareTypeCreateMap() (map[string]interface{}, error)
ToShareTypeCreateMap 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 ShareType based on the values in CreateOpts. To extract the ShareType 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 the existing ShareType with the provided ID.
type ExtraSpecs ¶
type ExtraSpecs map[string]interface{}
ExtraSpecs contains all the information associated with extra specifications for an Openstack ShareType.
type ExtraSpecsOpts ¶
type ExtraSpecsOpts struct { bool `json:"driver_handles_share_servers" required:"true"` // An extra specification that filters back ends by whether they do or do not support share snapshots SnapshotSupport *bool `json:"snapshot_support,omitempty"` }DriverHandlesShareServers
ExtraSpecsOpts represent the extra specifications that can be selected for a share type
type GetDefaultResult ¶
type GetDefaultResult struct {
// contains filtered or unexported fields
}
GetDefaultResult contains the response body and error from a Get Default request.
func GetDefault ¶
func GetDefault(client *gophercloud.ServiceClient) (r GetDefaultResult)
GetDefault will retrieve the default ShareType.
type GetExtraSpecsResult ¶
type GetExtraSpecsResult struct {
// contains filtered or unexported fields
}
GetExtraSpecsResult contains the response body and error from a Get Extra Specs request.
func GetExtraSpecs ¶
func GetExtraSpecs(client *gophercloud.ServiceClient, id string) (r GetExtraSpecsResult)
GetExtraSpecs will retrieve the extra specifications for a given ShareType.
func (GetExtraSpecsResult) Extract ¶
func (r GetExtraSpecsResult) Extract() (ExtraSpecs, error)
Extract will get the ExtraSpecs object out of the commonResult object.
type ListOpts ¶
type ListOpts struct { // Select if public types, private types, or both should be listed IsPublic string `q:"is_public"` }
ListOpts holds options for listing ShareTypes. It is passed to the sharetypes.List function.
func (ListOpts) ToShareTypeListQuery ¶
ToShareTypeListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
type ListOptsBuilder interface {
}ListOptsBuilder allows extensions to add additional parameters to the List request.
type RemoveAccessOptsBuilder ¶
RemoveAccessOptsBuilder allows extensions to add additional parameters to the RemoveAccess
type RemoveAccessResult ¶
type RemoveAccessResult struct {
gophercloud.ErrResult
}
RemoveAccessResult contains the response body and error from a Remove Access request.
func RemoveAccess ¶
func RemoveAccess(client *gophercloud.ServiceClient, id string, opts RemoveAccessOptsBuilder) (r RemoveAccessResult)
RemoveAccess will remove access to a ShareType based on the values in AccessOpts.
type SetExtraSpecsOpts ¶
type SetExtraSpecsOpts struct { // A list of all extra specifications to be added to a ShareType ExtraSpecs map[string]interface{} `json:"extra_specs" required:"true"` }
func (SetExtraSpecsOpts) ToShareTypeSetExtraSpecsMap ¶
func (opts SetExtraSpecsOpts) ToShareTypeSetExtraSpecsMap() (map[string]interface{}, error)
ToShareTypeSetExtraSpecsMap assembles a request body based on the contents of a SetExtraSpecsOpts.
type SetExtraSpecsOptsBuilder ¶
type SetExtraSpecsOptsBuilder interface {
}SetExtraSpecsOptsBuilder allows extensions to add additional parameters to the SetExtraSpecs request.
type SetExtraSpecsResult ¶
type SetExtraSpecsResult struct {
// contains filtered or unexported fields
}
SetExtraSpecsResult contains the response body and error from a Set Extra Specs request.
func SetExtraSpecs ¶
func SetExtraSpecs(client *gophercloud.ServiceClient, id string, opts SetExtraSpecsOptsBuilder) (r SetExtraSpecsResult)
SetExtraSpecs will set new specifications for a ShareType based on the values in SetExtraSpecsOpts. To extract the extra specifications object from the response, call the Extract method on the SetExtraSpecsResult.
func (SetExtraSpecsResult) Extract ¶
func (r SetExtraSpecsResult) Extract() (ExtraSpecs, error)
Extract will get the ExtraSpecs object out of the commonResult object.
type ShareType ¶
type ShareType struct { string `json:"id"` Name string `json:"name"` IsPublic bool `json:"os-share-type-access:is_public"` RequiredExtraSpecs map[string]interface{} `json:"required_extra_specs"` ExtraSpecs map[string]interface{} `json:"extra_specs"` }ID
ShareType contains all the information associated with an OpenStack ShareType.
func ExtractShareTypes ¶
func ExtractShareTypes(r pagination.Page) ([]ShareType, error)
ExtractShareTypes extracts and returns ShareTypes. It is used while iterating over a sharetypes.List call.
type ShareTypeAccess ¶
type ShareTypeAccess struct { string `json:"share_type_id"` ProjectID string `json:"project_id"` }ShareTypeID
ShareTypeAccess contains all the information associated with an OpenStack ShareTypeAccess.
type ShareTypePage ¶
type ShareTypePage struct {
}ShareTypePage is a pagination.pager that is returned from a call to the List function.
func (ShareTypePage) IsEmpty ¶
func (r ShareTypePage) IsEmpty() (bool, error)
IsEmpty returns true if a ListResult contains no ShareTypes.
type ShowAccessResult ¶
type ShowAccessResult struct {
// contains filtered or unexported fields
}
ShowAccessResult contains the response body and error from a Show access request.
func ShowAccess ¶
func ShowAccess(client *gophercloud.ServiceClient, id string) (r ShowAccessResult)
ShowAccess will show access details for an existing ShareType.
func (ShowAccessResult) Extract ¶
func (r ShowAccessResult) Extract() ([]ShareTypeAccess, error)
Extract will get the ShareTypeAccess objects out of the shareTypeAccessResult object.
type UnsetExtraSpecsResult ¶
type UnsetExtraSpecsResult struct {
gophercloud.ErrResult
}
UnsetExtraSpecsResult contains the response body and error from a Unset Extra Specs request.
func UnsetExtraSpecs ¶
func UnsetExtraSpecs(client *gophercloud.ServiceClient, id string, key string) (r UnsetExtraSpecsResult)
UnsetExtraSpecs will unset an extra specification for an existing ShareType.