• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Heat
  5. Templates
  6. Validate Template

Validate Template

Function Description

This interface is used to validate a template.

Interface Format

Method

URI

Description

POST

/v1/{tenant_id}/validate

Validates a template.

Request Parameter

Parameter

Type

Mandatory

Description

environment

Json

No

Specifies the environment information about the stack.

files

Json

No

Specifies files used in the environment.

template

Json

No

Specifies the template.

Response Parameter

Parameter

Type

Mandatory

Description

description

String

Yes

Specifies the template description.

parameters

Dict

Yes

Specifies the template input.

Request Example

POST  /v1/95d02433133a4c0a87ba6967474a2ad3/validate

Response Example

{
   "Description": "Hello world HOT template that just defines a single compute instance. Contains just base features to verify base HOT support.\n",
   "Parameters":    {
      "ImageId":       {
         "Type": "String",
         "Description": "ID of the image to use for the instance"
      },
      "KeyName":       {
         "Type": "String",
         "Description": "Name of an existing key pair to use for the instance"
      },
      "Network":       {
         "Type": "String",
         "Description": "instance network"
      },
      "InstanceType":       {
         "Default": "m1.small",
         "Type": "String",
         "Description": "Instance type for the instance to be created",
         "constraints": [         {
            "description": "Value must be one of 'm1.tiny', 'm1.small' or 'm1.large'",
            "allowed_values": [
               "m1.tiny",
               "m1.small",
               "m1.large"
            ]
         }]
      }
   }
}

Returned Code

For details, see section Return Code Processing.