Documentation ¶
Overview ¶
orchestration_stackresources_v1
Index ¶
- Constants
- Variables
- func HandleFindSuccessfully(t *testing.T, output string)
- func HandleGetSchemaSuccessfully(t *testing.T, output string)
- func HandleGetSuccessfully(t *testing.T, output string)
- func HandleGetTemplateSuccessfully(t *testing.T, output string)
- func HandleListSuccessfully(t *testing.T, output string)
- func HandleListTypesSuccessfully(t *testing.T, output string)
- func HandleMarkUnhealthySuccessfully(t *testing.T)
- func HandleMetadataSuccessfully(t *testing.T, output string)
Constants ¶
const FindOutput = `` /* 887-byte string literal not displayed */
FindOutput represents the response body from a Find request.
const GetOutput = `` /* 859-byte string literal not displayed */
GetOutput represents the response body from a Get request.
const GetSchemaOutput = `` /* 429-byte string literal not displayed */
GetSchemaOutput represents the response body from a Schema request.
const GetTemplateOutput = `` /* 1270-byte string literal not displayed */
GetTemplateOutput represents the response body from a Template request.
const ListOutput = `` /* 871-byte string literal not displayed */
ListOutput represents the response body from a List request.
const ListTypesOutput = `` /* 266-byte string literal not displayed */
ListTypesOutput represents the response body from a ListTypes request.
const MetadataOutput = `
{
"metadata": {
"number": "7",
"animal": "auk"
}
}`
MetadataOutput represents the response body from a Metadata request.
Variables ¶
var Create_time, _ = time.Parse(time.RFC3339, "2018-06-26T07:57:17Z")
var FindExpected = []stackresources.Resource{ { Name: "hello_world", Links: []gophercloud.Link{ { Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b/resources/hello_world", Rel: "self", }, { Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b", Rel: "stack", }, }, LogicalID: "hello_world", StatusReason: "state changed", UpdatedTime: Updated_time, CreationTime: Create_time, RequiredBy: []interface{}{}, Status: "CREATE_IN_PROGRESS", PhysicalID: "49181cd6-169a-4130-9455-31185bbfc5bf", Type: "OS::Nova::Server", Attributes: map[string]interface{}{"SXSW": "atx"}, Description: "Some resource", }, }
FindExpected represents the expected object from a Find request.
var GetExpected = &stackresources.Resource{ Name: "wordpress_instance", Links: []gophercloud.Link{ { Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/teststack/0b1771bd-9336-4f2b-ae86-a80f971faf1e/resources/wordpress_instance", Rel: "self", }, { Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/teststack/0b1771bd-9336-4f2b-ae86-a80f971faf1e", Rel: "stack", }, }, LogicalID: "wordpress_instance", Attributes: map[string]interface{}{"SXSW": "atx"}, StatusReason: "state changed", UpdatedTime: Updated_time, RequiredBy: []interface{}{}, Status: "CREATE_COMPLETE", PhysicalID: "00e3a2fe-c65d-403c-9483-4db9930dd194", Type: "OS::Nova::Server", }
GetExpected represents the expected object from a Get request.
var GetSchemaExpected = &stackresources.TypeSchema{ Attributes: map[string]interface{}{ "an_attribute": map[string]interface{}{ "description": "An attribute description .", }, }, Properties: map[string]interface{}{ "a_property": map[string]interface{}{ "update_allowed": false, "required": true, "type": "string", "description": "A resource description.", }, }, ResourceType: "OS::Heat::AResourceName", SupportStatus: map[string]interface{}{ "message": "A status message", "status": "SUPPORTED", "version": "2014.1", }, }
GetSchemaExpected represents the expected object from a Schema request.
var GetTemplateExpected = "" /* 1448-byte string literal not displayed */
GetTemplateExpected represents the expected object from a Template request.
var ListExpected = []stackresources.Resource{ { Name: "hello_world", Links: []gophercloud.Link{ { Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b/resources/hello_world", Rel: "self", }, { Href: "http://166.78.160.107:8004/v1/98606384f58d4ad0b3db7d0d779549ac/stacks/postman_stack/5f57cff9-93fc-424e-9f78-df0515e7f48b", Rel: "stack", }, }, LogicalID: "hello_world", StatusReason: "state changed", UpdatedTime: Updated_time, CreationTime: Create_time, RequiredBy: []interface{}{}, Status: "CREATE_IN_PROGRESS", PhysicalID: "49181cd6-169a-4130-9455-31185bbfc5bf", Type: "OS::Nova::Server", Attributes: map[string]interface{}{"SXSW": "atx"}, Description: "Some resource", }, }
ListExpected represents the expected object from a List request.
var ListTypesExpected = stackresources.ResourceTypes{
"OS::Nova::Server",
"OS::Heat::RandomString",
"OS::Swift::Container",
"OS::Trove::Instance",
"OS::Nova::FloatingIPAssociation",
"OS::Cinder::VolumeAttachment",
"OS::Nova::FloatingIP",
"OS::Nova::KeyPair",
}
ListTypesExpected represents the expected object from a ListTypes request.
var MetadataExpected = map[string]string{
"number": "7",
"animal": "auk",
}
MetadataExpected represents the expected object from a Metadata request.
var SortedListTypesExpected = stackresources.ResourceTypes{
"OS::Cinder::VolumeAttachment",
"OS::Heat::RandomString",
"OS::Nova::FloatingIP",
"OS::Nova::FloatingIPAssociation",
"OS::Nova::KeyPair",
"OS::Nova::Server",
"OS::Swift::Container",
"OS::Trove::Instance",
}
same as above, but sorted
var Updated_time, _ = time.Parse(time.RFC3339, "2018-06-26T07:58:17Z")
Functions ¶
func HandleFindSuccessfully ¶
HandleFindSuccessfully creates an HTTP handler at `/stacks/hello_world/resources` on the test handler mux that responds with a `Find` response.
func HandleGetSchemaSuccessfully ¶
HandleGetSchemaSuccessfully creates an HTTP handler at `/resource_types/OS::Heat::AResourceName` on the test handler mux that responds with a `Schema` response.
func HandleGetSuccessfully ¶
HandleGetSuccessfully creates an HTTP handler at `/stacks/teststack/0b1771bd-9336-4f2b-ae86-a80f971faf1e/resources/wordpress_instance` on the test handler mux that responds with a `Get` response.
func HandleGetTemplateSuccessfully ¶
HandleGetTemplateSuccessfully creates an HTTP handler at `/resource_types/OS::Heat::AResourceName/template` on the test handler mux that responds with a `Template` response.
func HandleListSuccessfully ¶
HandleListSuccessfully creates an HTTP handler at `/stacks/hello_world/49181cd6-169a-4130-9455-31185bbfc5bf/resources` on the test handler mux that responds with a `List` response.
func HandleListTypesSuccessfully ¶
HandleListTypesSuccessfully creates an HTTP handler at `/resource_types` on the test handler mux that responds with a `ListTypes` response.
func HandleMarkUnhealthySuccessfully ¶
HandleMarkUnhealthySuccessfully creates an HTTP handler at `/stacks/teststack/0b1771bd-9336-4f2b-ae86-a80f971faf1e/resources/wordpress_instance` on the test handler mux that responds with a `MarkUnhealthy` response.
func HandleMetadataSuccessfully ¶
HandleMetadataSuccessfully creates an HTTP handler at `/stacks/teststack/0b1771bd-9336-4f2b-ae86-a80f971faf1e/resources/wordpress_instance/metadata` on the test handler mux that responds with a `Metadata` response.
Types ¶
This section is empty.