Documentation ¶
Index ¶
- func ExtractInstanceActionsInto(r pagination.Page, v interface{}) error
- func List(client *gophercloud.ServiceClient, id string, opts ListOptsBuilder) pagination.Pager
- type Event
- type InstanceAction
- type InstanceActionDetail
- type InstanceActionPage
- type InstanceActionResult
- type ListOpts
- type ListOptsBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractInstanceActionsInto ¶
func ExtractInstanceActionsInto(r pagination.Page, v interface{}) error
func List ¶
func List(client *gophercloud.ServiceClient, id string, opts ListOptsBuilder) pagination.Pager
List makes a request against the API to list the servers actions.
Types ¶
type Event ¶
type Event struct { // Event is the name of the event. Event string `json:"event"` // Host is the host of the event. // This requires microversion 2.62 or later. Host *string `json:"host"` // HostID is the host id of the event. // This requires microversion 2.62 or later. HostID *string `json:"hostId"` // Result is the result of the event. Result string `json:"result"` // Traceback is the traceback stack if an error occurred. Traceback string `json:"traceback"` // StartTime is the time the action started. StartTime time.Time `json:"-"` // FinishTime is the time the event finished. FinishTime time.Time `json:"-"` }
Event represents an event of instance action.
func (*Event) UnmarshalJSON ¶
UnmarshalJSON converts our JSON API response into our instance action struct.
type InstanceAction ¶
type InstanceAction struct { // Action is the name of the action. Action string `json:"action"` // InstanceUUID is the UUID of the instance. InstanceUUID string `json:"instance_uuid"` // Message is the related error message for when an action fails. Message string `json:"message"` // Project ID is the ID of the project which initiated the action. ProjectID string `json:"project_id"` // RequestID is the ID generated when performing the action. RequestID string `json:"request_id"` // StartTime is the time the action started. StartTime time.Time `json:"-"` // UserID is the ID of the user which initiated the action. UserID string `json:"user_id"` }
InstanceAction represents an instance action.
func ExtractInstanceActions ¶
func ExtractInstanceActions(r pagination.Page) ([]InstanceAction, error)
ExtractInstanceActions interprets a page of results as a slice of InstanceAction.
func (*InstanceAction) UnmarshalJSON ¶
func (i *InstanceAction) UnmarshalJSON(b []byte) error
UnmarshalJSON converts our JSON API response into our instance action struct
type InstanceActionDetail ¶
type InstanceActionDetail struct { // Action is the name of the Action. Action string `json:"action"` // InstanceUUID is the UUID of the instance. InstanceUUID string `json:"instance_uuid"` // Message is the related error message for when an action fails. Message string `json:"message"` // Project ID is the ID of the project which initiated the action. ProjectID string `json:"project_id"` // RequestID is the ID generated when performing the action. RequestID string `json:"request_id"` // UserID is the ID of the user which initiated the action. UserID string `json:"user_id"` // Events is the list of events of the action. // This requires microversion 2.50 or later. Events *[]Event `json:"events"` // UpdatedAt last update date of the action. // This requires microversion 2.58 or later. UpdatedAt *time.Time `json:"-"` // StartTime is the time the action started. StartTime time.Time `json:"-"` }
InstanceActionDetail represents the details of an Action.
func (*InstanceActionDetail) UnmarshalJSON ¶
func (i *InstanceActionDetail) UnmarshalJSON(b []byte) error
UnmarshalJSON converts our JSON API response into our instance action struct
type InstanceActionPage ¶
type InstanceActionPage struct {
pagination.SinglePageBase
}
InstanceActionPage 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 ExtractInstanceActions call.
func (InstanceActionPage) IsEmpty ¶
func (r InstanceActionPage) IsEmpty() (bool, error)
IsEmpty returns true if an InstanceActionPage contains no instance actions.
type InstanceActionResult ¶
type InstanceActionResult struct {
gophercloud.Result
}
InstanceActionResult is the result handler of Get.
func Get ¶
func Get(client *gophercloud.ServiceClient, serverID, requestID string) (r InstanceActionResult)
Get makes a request against the API to get a server action.
func (InstanceActionResult) Extract ¶
func (r InstanceActionResult) Extract() (InstanceActionDetail, error)
Extract interprets a result as an InstanceActionDetail.
func (InstanceActionResult) ExtractInto ¶
func (r InstanceActionResult) ExtractInto(v interface{}) error
type ListOpts ¶
type ListOpts struct { // Limit is an integer value to limit the results to return. // This requires microversion 2.58 or later. Limit int `q:"limit"` // Marker is the request ID of the last-seen instance action. // This requires microversion 2.58 or later. Marker string `q:"marker"` // ChangesSince filters the response by actions after the given time. // This requires microversion 2.58 or later. ChangesSince *time.Time `q:"changes-since"` // ChangesBefore filters the response by actions before the given time. // This requires microversion 2.66 or later. ChangesBefore *time.Time `q:"changes-before"` }
ListOpts represents options used to filter instance action results in a List request.
func (ListOpts) ToInstanceActionsListQuery ¶
ToInstanceActionsListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.