• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Heat
  5. Software Configuration
  6. Create Configuration

Create Configuration

Function Description

This interface is used to create a configuration.

Interface Format

Method

URI

Description

POST

/v1/{tenant_id}/software_configs

Creates a software configuration.

Request Parameter

Parameter

Type

Mandatory

Description

config

String

No

Specifies the script used for defining the configuration.

group

String

No

Specifies the name of the software configuration group.

name

String

No

Specifies the name of the software configuration.

inputs

List

No

Specifies the software configuration input.

outputs

List

No

Specifies the software configuration output.

options

String

No

Specifies options used by a software configuration management tool.

Response Parameter

Parameter

Type

Mandatory

Description

inputs

List

Yes

Specifies the software configuration input.

name

String

Yes

Specifies the name of the software configuration.

outputs

List

Yes

Specifies the software configuration output.

creation_time

Date Time

Yes

Specifies the time when a configuration is created.

group

String

Yes

Specifies the name of the software configuration group.

config

String

Yes

Specifies the configuration code.

options

String

Yes

Specifies configuration options.

Request Example

{
    "inputs": [
        {
            "default": null,
            "type": "String",
            "name": "foo",
            "description": null
        },
        {
            "default": null,
            "type": "String",
            "name": "bar",
            "description": null
        }
    ],
    "group": "script",
    "name": "a-config-we5zpvyu7b5o",
    "outputs": [
        {
            "type": "String",
            "name": "result",
            "error_output": false,
            "description": null
        }
    ],
    "config": "#!/bin/sh -x\necho \"Writing to /tmp/$bar\"\necho $foo > /tmp/$bar\necho -n \"The file /tmp/$bar contains `cat /tmp/$bar` for server $deploy_server_id during $deploy_action\" > $heat_outputs_path.result\necho \"Written to /tmp/$bar\"\necho \"Output to stderr\" 1>&2",
    "options": null
}

Response Example

{
    "software_config": {
        "creation_time": "2015-01-31T15:12:36Z",
        "inputs": [
            {
                "default": null,
                "type": "String",
                "name": "foo",
                "description": null
            },
            {
                "default": null,
                "type": "String",
                "name": "bar",
                "description": null
            }
        ],
        "group": "script",
        "name": "a-config-we5zpvyu7b5o",
        "outputs": [
            {
                "type": "String",
                "name": "result",
                "error_output": false,
                "description": null
            }
        ],
        "options": null,
        "config": "#!/bin/sh -x\necho \"Writing to /tmp/$bar\"\necho $foo > /tmp/$bar\necho -n \"The file /tmp/$bar contains `cat /tmp/$bar` for server $deploy_server_id during $deploy_action\" > $heat_outputs_path.result\necho \"Written to /tmp/$bar\"\necho \"Output to stderr\" 1>&2",
        "id": "ddee7aca-aa32-4335-8265-d436b20db4f1"
    }
}

Returned Code

For details, see section Return Code Processing.