gophercloud: github.com/rackspace/gophercloud/openstack/orchestration/v1/stackresources Index | Files

package stackresources

import "github.com/rackspace/gophercloud/openstack/orchestration/v1/stackresources"

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

Package Files

doc.go requests.go results.go urls.go

func List Uses

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 Uses

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

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

type FindResult Uses

type FindResult struct {
    gophercloud.Result
}

FindResult represents the result of a Find operation.

func Find Uses

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

Find retrieves stack resources for the given stack name.

func (FindResult) Extract Uses

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

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

type GetResult Uses

type GetResult struct {
    gophercloud.Result
}

GetResult represents the result of a Get operation.

func Get Uses

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

Get retreives data for the given stack resource.

func (GetResult) Extract Uses

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

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

type ListOpts Uses

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 Uses

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

ToStackResourceListQuery formats a ListOpts into a query string.

type ListOptsBuilder Uses

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

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

type MetadataResult Uses

type MetadataResult struct {
    gophercloud.Result
}

MetadataResult represents the result of a Metadata operation.

func Metadata Uses

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

Metadata retreives the metadata for the given stack resource.

func (MetadataResult) Extract Uses

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

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

type Resource Uses

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

Resource represents a stack resource.

func ExtractResources Uses

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

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

type ResourcePage Uses

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 Uses

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

IsEmpty returns true if a page contains no Server results.

type ResourceTypePage Uses

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 Uses

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

IsEmpty returns true if a ResourceTypePage contains no resource types.

type ResourceTypes Uses

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 Uses

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

ExtractResourceTypes extracts and returns resource types.

func (ResourceTypes) Len Uses

func (r ResourceTypes) Len() int

func (ResourceTypes) Less Uses

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

func (ResourceTypes) Swap Uses

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

type SchemaResult Uses

type SchemaResult struct {
    gophercloud.Result
}

SchemaResult represents the result of a Schema operation.

func Schema Uses

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

Schema retreives the schema for the given resource type.

func (SchemaResult) Extract Uses

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

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

type TemplateResult Uses

type TemplateResult struct {
    gophercloud.Result
}

TemplateResult represents the result of a Template operation.

func Template Uses

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

Template retreives the template representation for the given resource type.

func (TemplateResult) Extract Uses

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

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

type TypeSchema Uses

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

TypeSchema represents a stack resource schema.

Package stackresources imports 7 packages (graph). Updated 2019-05-10. Refresh now. Tools for package owners.