stackresources

package
Version: v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package stackresources provides operations for working with stack resources. A resource is a template artifact that represents some component of your desired architecture (a Cloud Server, a group of scaled Cloud Servers, a load balancer, some configuration management system, and so forth).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(client *gophercloud.ServiceClient, stackName, stackID string, opts ListOptsBuilder) pagination.Pager

List makes a request against the API to list resources for the given stack.

func ListTypes

func ListTypes(client *gophercloud.ServiceClient) pagination.Pager

ListTypes makes a request against the API to list resource types.

Types

type FindResult

type FindResult struct {
	gophercloud.Result
}

FindResult represents the result of a Find operation.

func Find

func Find(c *gophercloud.ServiceClient, stackName string) (r FindResult)

Find retrieves stack resources for the given stack name.

func (FindResult) Extract

func (r FindResult) Extract() ([]Resource, error)

Extract returns a slice of Resource objects and is called after a Find operation.

type GetResult

type GetResult struct {
	gophercloud.Result
}

GetResult represents the result of a Get operation.

func Get

func Get(c *gophercloud.ServiceClient, stackName, stackID, resourceName string) (r GetResult)

Get retreives data for the given stack resource.

func (GetResult) Extract

func (r GetResult) Extract() (*Resource, error)

Extract returns a pointer to a Resource object and is called after a Get operation.

type ListOpts

type ListOpts struct {
	// Include resources from nest stacks up to Depth levels of recursion.
	Depth int `q:"nested_depth"`
}

ListOpts allows the filtering and sorting of paginated collections through the API. Marker and Limit are used for pagination.

func (ListOpts) ToStackResourceListQuery

func (opts ListOpts) ToStackResourceListQuery() (string, error)

ToStackResourceListQuery formats a ListOpts into a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToStackResourceListQuery() (string, error)
}

ListOptsBuilder allows extensions to add additional parameters to the List request.

type MetadataResult

type MetadataResult struct {
	gophercloud.Result
}

MetadataResult represents the result of a Metadata operation.

func Metadata

func Metadata(c *gophercloud.ServiceClient, stackName, stackID, resourceName string) (r MetadataResult)

Metadata retreives the metadata for the given stack resource.

func (MetadataResult) Extract

func (r MetadataResult) Extract() (map[string]string, error)

Extract returns a map object and is called after a Metadata operation.

type Resource

type Resource struct {
	Attributes   map[string]interface{} `json:"attributes"`
	CreationTime time.Time              `json:"-"`
	Description  string                 `json:"description"`
	Links        []gophercloud.Link     `json:"links"`
	LogicalID    string                 `json:"logical_resource_id"`
	Name         string                 `json:"resource_name"`
	PhysicalID   string                 `json:"physical_resource_id"`
	RequiredBy   []interface{}          `json:"required_by"`
	Status       string                 `json:"resource_status"`
	StatusReason string                 `json:"resource_status_reason"`
	Type         string                 `json:"resource_type"`
	UpdatedTime  time.Time              `json:"-"`
}

Resource represents a stack resource.

func ExtractResources

func ExtractResources(r pagination.Page) ([]Resource, error)

ExtractResources interprets the results of a single page from a List() call, producing a slice of Resource entities.

func (*Resource) UnmarshalJSON

func (r *Resource) UnmarshalJSON(b []byte) error

type ResourcePage

type ResourcePage struct {
	pagination.SinglePageBase
}

ResourcePage abstracts the raw results of making a List() request against the API. As OpenStack extensions may freely alter the response bodies of structures returned to the client, you may only safely access the data provided through the ExtractResources call.

func (ResourcePage) IsEmpty

func (r ResourcePage) IsEmpty() (bool, error)

IsEmpty returns true if a page contains no Server results.

type ResourceTypePage

type ResourceTypePage struct {
	pagination.SinglePageBase
}

ResourceTypePage abstracts the raw results of making a ListTypes() request against the API. As OpenStack extensions may freely alter the response bodies of structures returned to the client, you may only safely access the data provided through the ExtractResourceTypes call.

func (ResourceTypePage) IsEmpty

func (r ResourceTypePage) IsEmpty() (bool, error)

IsEmpty returns true if a ResourceTypePage contains no resource types.

type ResourceTypes

type ResourceTypes []string

ResourceTypes represents the type that holds the result of ExtractResourceTypes. We define methods on this type to sort it before output

func ExtractResourceTypes

func ExtractResourceTypes(r pagination.Page) (ResourceTypes, error)

ExtractResourceTypes extracts and returns resource types.

func (ResourceTypes) Len

func (r ResourceTypes) Len() int

func (ResourceTypes) Less

func (r ResourceTypes) Less(i, j int) bool

func (ResourceTypes) Swap

func (r ResourceTypes) Swap(i, j int)

type SchemaResult

type SchemaResult struct {
	gophercloud.Result
}

SchemaResult represents the result of a Schema operation.

func Schema

func Schema(c *gophercloud.ServiceClient, resourceType string) (r SchemaResult)

Schema retreives the schema for the given resource type.

func (SchemaResult) Extract

func (r SchemaResult) Extract() (*TypeSchema, error)

Extract returns a pointer to a TypeSchema object and is called after a Schema operation.

type TemplateResult

type TemplateResult struct {
	gophercloud.Result
}

TemplateResult represents the result of a Template operation.

func Template

func Template(c *gophercloud.ServiceClient, resourceType string) (r TemplateResult)

Template retreives the template representation for the given resource type.

func (TemplateResult) Extract

func (r TemplateResult) Extract() ([]byte, error)

Extract returns the template and is called after a Template operation.

type TypeSchema

type TypeSchema struct {
	Attributes    map[string]interface{} `json:"attributes"`
	Properties    map[string]interface{} `json:"properties"`
	ResourceType  string                 `json:"resource_type"`
	SupportStatus map[string]interface{} `json:"support_status"`
}

TypeSchema represents a stack resource schema.

Directories

Path Synopsis
orchestration_stackresources_v1
orchestration_stackresources_v1

Jump to

Keyboard shortcuts

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