Documentation ¶
Index ¶
Constants ¶
View Source
const BasicListOutput = `
{
"resource_types": [
"OS::Nova::Server",
"OS::Heat::Stack"
]
}
`
View Source
const FilteredListOutput = `` /* 136-byte string literal not displayed */
View Source
const FullListOutput = `` /* 240-byte string literal not displayed */
View Source
const GenerateTemplateOutput = `` /* 517-byte string literal not displayed */
View Source
const GetSchemaOutput = `` /* 3058-byte string literal not displayed */
Variables ¶
View Source
var BasicListExpected = []resourcetypes.ResourceTypeSummary{
{
ResourceType: "OS::Nova::Server",
},
{
ResourceType: "OS::Heat::Stack",
},
}
View Source
var FilteredListExpected = []resourcetypes.ResourceTypeSummary{
{
ResourceType: "OS::Heat::Stack",
Description: "A Heat Stack",
},
}
View Source
var FullListExpected = []resourcetypes.ResourceTypeSummary{
{
ResourceType: "OS::Nova::Server",
Description: "A Nova Server",
},
{
ResourceType: "OS::Heat::Stack",
Description: "A Heat Stack",
},
}
View Source
var GetSchemaExpected = resourcetypes.ResourceSchema{ ResourceType: "OS::Test::TestServer", SupportStatus: resourcetypes.SupportStatusDetails{ Status: resourcetypes.SupportStatusDeprecated, Message: "Bye bye.", Version: "10.0.0", PreviousStatus: &resourcetypes.SupportStatusDetails{ Status: resourcetypes.SupportStatusSupported, }, }, Attributes: map[string]resourcetypes.AttributeSchema{ "show": { Description: "Detailed information about resource.", Type: resourcetypes.MapProperty, }, "tags": { Description: "Tags from the server.", Type: resourcetypes.ListProperty, }, "name": { Description: "Name of the server.", Type: resourcetypes.StringProperty, }, }, Properties: map[string]resourcetypes.PropertySchema{ "name": { Type: resourcetypes.StringProperty, Description: "Server name.", UpdateAllowed: true, }, "image": { Type: resourcetypes.StringProperty, Description: "The ID or name of the image to boot with.", Required: true, Constraints: []resourcetypes.ConstraintSchema{ { CustomConstraint: &glanceImageConstraint, }, }, }, "block_device_mapping": { Type: resourcetypes.ListProperty, Description: "Block device mappings for this server.", Schema: map[string]resourcetypes.PropertySchema{ "*": { Type: resourcetypes.MapProperty, Schema: map[string]resourcetypes.PropertySchema{ "ephemeral_format": { Type: resourcetypes.StringProperty, Description: "The format of the local ephemeral block device.", Constraints: []resourcetypes.ConstraintSchema{ { AllowedValues: &[]interface{}{ "ext3", "ext4", "xfs", }, }, }, }, "ephemeral_size": { Type: resourcetypes.IntegerProperty, Description: "The size of the local ephemeral block device, in GB.", Constraints: []resourcetypes.ConstraintSchema{ { Range: &resourcetypes.MinMaxConstraint{ Min: 1, }, }, }, }, "delete_on_termination": { Type: resourcetypes.BooleanProperty, Description: "Delete volume on server termination.", Default: true, Immutable: true, }, }, }, }, }, "image_update_policy": { Type: resourcetypes.StringProperty, Description: "Policy on how to apply an image-id update.", Default: "REBUILD", Constraints: []resourcetypes.ConstraintSchema{ { AllowedValues: &[]interface{}{ "REBUILD", "REPLACE", }, }, }, UpdateAllowed: true, }, }, }
Functions ¶
func HandleGenerateTemplateSuccessfully ¶
HandleGenerateTemplateSuccessfully creates an HTTP handler at `/resource_types/OS::Heat::None/template` on the test handler mux that responds with a template.
func HandleGetSchemaSuccessfully ¶
HandleGetSchemaSuccessfully creates an HTTP handler at `/resource_types/OS::Test::TestServer` on the test handler mux that responds with a `GetSchema` response.
func HandleListSuccessfully ¶
HandleListSuccessfully creates an HTTP handler at `/resource_types` on the test handler mux that responds with a `List` response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.