Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package profiletypes lists all profile types and shows details for a profile type from the OpenStack Clustering Service.
Example to List ProfileType
err = profiletypes.List(serviceClient).EachPage(func(page pagination.Page) (bool, error) {
	profileTypes, err := profiletypes.ExtractProfileTypes(page)
	if err != nil {
		return false, err
	}
	for _, profileType := range profileTypes {
		fmt.Println("%+v\n", profileType)
	}
	return true, nil
})
Example to Get a ProfileType
profileTypeName := "os.nova.server"
profileType, err := profiletypes.Get(clusteringClient, profileTypeName).Extract()
if err != nil {
	panic(err)
}
fmt.Printf("%+v\n", profileType)
Example of list operations supported by a profile type
serviceClient.Microversion = "1.5"
profileTypeName := "os.nova.server-1.0"
allPages, err := profiletypes.ListOps(serviceClient, profileTypeName).AllPages()
if err != nil {
	panic(err)
}
ops, err := profiletypes.ExtractOps(allPages)
if err != nil {
	panic(err)
}
for _, op := range ops {
	fmt.Printf("%+v\n", op)
}
Index ¶
- func ExtractOps(r pagination.Page) (map[string]interface{}, error)
 - func List(client *gophercloud.ServiceClient) pagination.Pager
 - func ListOps(client *gophercloud.ServiceClient, id string) pagination.Pager
 - type GetResult
 - type OperationPage
 - type ProfileType
 - type ProfileTypePage
 - type Schema
 - type SupportStatus
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractOps ¶
func ExtractOps(r pagination.Page) (map[string]interface{}, error)
ExtractOps provides access to the list of operations in a page acquired from the ListOps operation.
func List ¶
func List(client *gophercloud.ServiceClient) pagination.Pager
List makes a request against the API to list profile types.
func ListOps ¶
func ListOps(client *gophercloud.ServiceClient, id string) pagination.Pager
Types ¶
type GetResult ¶
type GetResult struct {
	// contains filtered or unexported fields
}
    GetResult is the response of a Get operations.
func Get ¶
func Get(client *gophercloud.ServiceClient, id string) (r GetResult)
func (GetResult) Extract ¶
func (r GetResult) Extract() (*ProfileType, error)
type OperationPage ¶
type OperationPage struct {
	pagination.SinglePageBase
}
    OperationPage contains a single page of all profile type operations from a ListOps call.
type ProfileType ¶
type ProfileType struct {
	Name          string                     `json:"name"`
	Schema        map[string]Schema          `json:"schema"`
	SupportStatus map[string][]SupportStatus `json:"support_status"`
}
    func ExtractProfileTypes ¶
func ExtractProfileTypes(r pagination.Page) ([]ProfileType, error)
ExtractProfileTypes provides access to the list of profiles in a page acquired from the List operation.
type ProfileTypePage ¶
type ProfileTypePage struct {
	pagination.LinkedPageBase
}
    ProfileTypePage contains a single page of all profiles from a List call.
func (ProfileTypePage) IsEmpty ¶
func (page ProfileTypePage) IsEmpty() (bool, error)
IsEmpty determines if ExtractProfileTypes contains any results.
type SupportStatus ¶
type SupportStatus map[string]interface{}