Documentation
¶
Index ¶
Constants ¶
View Source
const ( Complete = "succeeded" Failed = "failed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlueprintOperation ¶
type BlueprintOperation struct {
RequestType string `json:"requestType,omitempty"`
Status string `json:"status,omitempty"`
Summary struct {
BlueprintID int `json:"blueprintId,omitempty"`
LocationID string `json:"locationId,omitempty"`
Links api.Links `json:"links,omitempty"`
} `json:"summary,omitempty"`
Source struct {
UserName string `json:"userName"`
RequestedAt time.Time `json:"requestedAt,omitempty"`
} `json:"source,omitempty"`
}
BlueprintOperation is a status object representing a running blueprint job
{
"requestType":"blueprintOperation",
"status":"succeeded",
"summary":{
"blueprintId":51229,
"locationId":"CA1",
"links":[
{
"rel":"network",
"href":"/v2-experimental/networks/ZZBB/CA1/6955e7c39b5648df91bfb32e5d0aa24b",
"id":"6955e7c39b5648df91bfb32e5d0aa24b"
}
]
},
"source":{"userName":"ack","requestedAt":"2016-03-24T16:47:04Z"}
}
type QueuedOperation ¶
type QueuedOperation struct {
OperationID string `json:"operationId,omitempty"`
URI string `json:"uri,omitempty"`
}
QueuedOperation may be a one-off and/or experimental version of QueuedResponse
eg. add secondary network
{"operationId": "2b70710dba4142dcaf3ab2de68e4f40c", "uri": "..."}
func (*QueuedOperation) GetHref ¶
func (q *QueuedOperation) GetHref() (bool, string)
func (*QueuedOperation) GetStatusID ¶
func (q *QueuedOperation) GetStatusID() (bool, string)
func (*QueuedOperation) Status ¶
func (q *QueuedOperation) Status() *Status
type QueuedResponse ¶
type QueuedResponse struct {
Server string `json:"server,omitempty"`
IsQueued bool `json:"isQueued,omitempty"`
Links api.Links `json:"links,omitempty"`
Error string `json:"errorMessage,omitempty"`
}
QueuedResponse represents a returned response for an async platform job
eg. create server
{"server":"web", "isQueued":true, "links":[
{"rel":"status", "href":"...", "id":"wa1-12345"},
{"rel":"self", "href":"...", "id":"8134c91a66784c6dada651eba90a5123"}]}
func (*QueuedResponse) GetStatusID ¶
func (q *QueuedResponse) GetStatusID() (bool, string)
type Response ¶
type Response struct {
Status string `json:"status"`
}
Response represents a running async job result from polling status {"status": "succeeded"}
type Service ¶
func (*Service) GetBlueprint ¶
func (s *Service) GetBlueprint(id string) (*BlueprintOperation, error)
Click to show internal directories.
Click to hide internal directories.