profiletypes

package
v1.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

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.Printf("%+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

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

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 Schema

type Schema map[string]interface{}

type SupportStatus

type SupportStatus map[string]interface{}

Directories

Path Synopsis
clustering_profiletypes_v1
clustering_profiletypes_v1

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL