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

package stackevents

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

Package stackevents provides operations for finding, listing, and retrieving stack events. Stack events are events that take place on stacks such as updating and abandoning.

Index

Package Files

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

Variables

var (
    // ResourceStatusInProgress is used to filter a List request by the 'IN_PROGRESS' status.
    ResourceStatusInProgress ResourceStatus = "IN_PROGRESS"
    // ResourceStatusComplete is used to filter a List request by the 'COMPLETE' status.
    ResourceStatusComplete ResourceStatus = "COMPLETE"
    // ResourceStatusFailed is used to filter a List request by the 'FAILED' status.
    ResourceStatusFailed ResourceStatus = "FAILED"

    // ResourceActionCreate is used to filter a List request by the 'CREATE' action.
    ResourceActionCreate ResourceAction = "CREATE"
    // ResourceActionDelete is used to filter a List request by the 'DELETE' action.
    ResourceActionDelete ResourceAction = "DELETE"
    // ResourceActionUpdate is used to filter a List request by the 'UPDATE' action.
    ResourceActionUpdate ResourceAction = "UPDATE"
    // ResourceActionRollback is used to filter a List request by the 'ROLLBACK' action.
    ResourceActionRollback ResourceAction = "ROLLBACK"
    // ResourceActionSuspend is used to filter a List request by the 'SUSPEND' action.
    ResourceActionSuspend ResourceAction = "SUSPEND"
    // ResourceActionResume is used to filter a List request by the 'RESUME' action.
    ResourceActionResume ResourceAction = "RESUME"
    // ResourceActionAbandon is used to filter a List request by the 'ABANDON' action.
    ResourceActionAbandon ResourceAction = "ABANDON"

    // SortAsc is used to sort a list of stacks in ascending order.
    SortAsc SortDir = "asc"
    // SortDesc is used to sort a list of stacks in descending order.
    SortDesc SortDir = "desc"

    // SortName is used to sort a list of stacks by name.
    SortName SortKey = "name"
    // SortResourceType is used to sort a list of stacks by resource type.
    SortResourceType SortKey = "resource_type"
    // SortCreatedAt is used to sort a list of stacks by date created.
    SortCreatedAt SortKey = "created_at"
)

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 ListResourceEvents Uses

func ListResourceEvents(client *gophercloud.ServiceClient, stackName, stackID, resourceName string, opts ListResourceEventsOptsBuilder) pagination.Pager

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

type Event Uses

type Event struct {
    // The name of the resource for which the event occurred.
    ResourceName string `mapstructure:"resource_name"`
    // The time the event occurred.
    Time time.Time `mapstructure:"-"`
    // The URLs to the event.
    Links []gophercloud.Link `mapstructure:"links"`
    // The logical ID of the stack resource.
    LogicalResourceID string `mapstructure:"logical_resource_id"`
    // The reason of the status of the event.
    ResourceStatusReason string `mapstructure:"resource_status_reason"`
    // The status of the event.
    ResourceStatus string `mapstructure:"resource_status"`
    // The physical ID of the stack resource.
    PhysicalResourceID string `mapstructure:"physical_resource_id"`
    // The event ID.
    ID  string `mapstructure:"id"`
    // Properties of the stack resource.
    ResourceProperties map[string]interface{} `mapstructure:"resource_properties"`
}

Event represents a stack event.

func ExtractEvents Uses

func ExtractEvents(page pagination.Page) ([]Event, error)

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

func ExtractResourceEvents Uses

func ExtractResourceEvents(page pagination.Page) ([]Event, error)

ExtractResourceEvents interprets the results of a single page from a ListResourceEvents() call, producing a slice of Event entities.

type EventPage Uses

type EventPage struct {
    pagination.MarkerPageBase
}

EventPage 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 (EventPage) IsEmpty Uses

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

IsEmpty returns true if a page contains no Server results.

func (EventPage) LastMarker Uses

func (r EventPage) LastMarker() (string, error)

LastMarker returns the last stack ID in a ListResult.

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 events for the given stack name.

func (FindResult) Extract Uses

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

Extract returns a slice of Event 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, eventID string) GetResult

Get retreives data for the given stack resource.

func (GetResult) Extract Uses

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

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

type ListOpts Uses

type ListOpts struct {
    // The stack resource ID with which to start the listing.
    Marker string `q:"marker"`
    // Integer value for the limit of values to return.
    Limit int `q:"limit"`
    // Filters the event list by the specified ResourceAction. You can use this
    // filter multiple times to filter by multiple resource actions: CREATE, DELETE,
    // UPDATE, ROLLBACK, SUSPEND, RESUME or ADOPT.
    ResourceActions []ResourceAction `q:"resource_action"`
    // Filters the event list by the specified resource_status. You can use this
    // filter multiple times to filter by multiple resource statuses: IN_PROGRESS,
    // COMPLETE or FAILED.
    ResourceStatuses []ResourceStatus `q:"resource_status"`
    // Filters the event list by the specified resource_name. You can use this
    // filter multiple times to filter by multiple resource names.
    ResourceNames []string `q:"resource_name"`
    // Filters the event list by the specified resource_type. You can use this
    // filter multiple times to filter by multiple resource types: OS::Nova::Server,
    // OS::Cinder::Volume, and so on.
    ResourceTypes []string `q:"resource_type"`
    // Sorts the event list by: resource_type or created_at.
    SortKey SortKey `q:"sort_keys"`
    // The sort direction of the event list. Which is asc (ascending) or desc (descending).
    SortDir SortDir `q:"sort_dir"`
}

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

func (ListOpts) ToStackEventListQuery Uses

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

ToStackEventListQuery formats a ListOpts into a query string.

type ListOptsBuilder Uses

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

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

type ListResourceEventsOpts Uses

type ListResourceEventsOpts struct {
    // The stack resource ID with which to start the listing.
    Marker string `q:"marker"`
    // Integer value for the limit of values to return.
    Limit int `q:"limit"`
    // Filters the event list by the specified ResourceAction. You can use this
    // filter multiple times to filter by multiple resource actions: CREATE, DELETE,
    // UPDATE, ROLLBACK, SUSPEND, RESUME or ADOPT.
    ResourceActions []string `q:"resource_action"`
    // Filters the event list by the specified resource_status. You can use this
    // filter multiple times to filter by multiple resource statuses: IN_PROGRESS,
    // COMPLETE or FAILED.
    ResourceStatuses []string `q:"resource_status"`
    // Filters the event list by the specified resource_name. You can use this
    // filter multiple times to filter by multiple resource names.
    ResourceNames []string `q:"resource_name"`
    // Filters the event list by the specified resource_type. You can use this
    // filter multiple times to filter by multiple resource types: OS::Nova::Server,
    // OS::Cinder::Volume, and so on.
    ResourceTypes []string `q:"resource_type"`
    // Sorts the event list by: resource_type or created_at.
    SortKey SortKey `q:"sort_keys"`
    // The sort direction of the event list. Which is asc (ascending) or desc (descending).
    SortDir SortDir `q:"sort_dir"`
}

ListResourceEventsOpts allows the filtering and sorting of paginated resource events through the API. Marker and Limit are used for pagination.

func (ListResourceEventsOpts) ToResourceEventListQuery Uses

func (opts ListResourceEventsOpts) ToResourceEventListQuery() (string, error)

ToResourceEventListQuery formats a ListResourceEventsOpts into a query string.

type ListResourceEventsOptsBuilder Uses

type ListResourceEventsOptsBuilder interface {
    ToResourceEventListQuery() (string, error)
}

ListResourceEventsOptsBuilder allows extensions to add additional parameters to the ListResourceEvents request.

type ResourceAction Uses

type ResourceAction string

ResourceAction is a type for specifying by which resource action to filter a list of events.

type ResourceStatus Uses

type ResourceStatus string

ResourceStatus is a type for specifying by which resource status to filter a list of events.

type SortDir Uses

type SortDir string

SortDir is a type for specifying in which direction to sort a list of events.

type SortKey Uses

type SortKey string

SortKey is a type for specifying by which key to sort a list of events.

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