Skip to content

st2 pack config <pack_name> does not handle object references #3455

Open
@nmaludy

Description

@nmaludy

When running st2 pack config vsphere .... if you look at the example config (https://github.com/StackStorm-Exchange/stackstorm-vsphere/blob/master/vsphere.yaml.example) and the schema (https://github.com/StackStorm-Exchange/stackstorm-vsphere/blob/master/config.schema.yaml) it does not seem to be generating a config that matches the example:

[root@stackstorm ~]# st2 pack config vsphere
ssl_verify (boolean) [y]: y
vcenters.passwd (secret): ********
vcenters.host: hostname
vcenters.port (integer): 1234
vcenters.user: username
taskinfo.vsphere [default]: 
taskinfo.tasknum (integer) [1]: 
---
Do you want to preview the config in an editor before saving? [y]: n
---
Do you want me to save it? [y]: y
+----------+------------------------------------+
| Property | Value                              |
+----------+------------------------------------+
| pack     | vsphere                            |
| values   | {                                  |
|          |     "ssl_verify": true,            |
|          |     "vsphere": {},                 |
|          |     "vcenters": {                  |
|          |         "passwd": "password",      |
|          |         "host": "hostname",        |
|          |         "port": 1234,              |
|          |         "user": "username"         |
|          |     },                             |
|          |     "sensors": {                   |
|          |         "taskinfo": {              |
|          |             "vsphere": "default",  |
|          |             "tasknum": 1           |
|          |         }                          |
|          |     }                              |
|          | }                                  |
+----------+------------------------------------+

The yaml file that is generated looks like:

[root@stackstorm ~]# cat /opt/stackstorm/configs/vsphere.yaml 
sensors:
  taskinfo:
    tasknum: 1
    vsphere: default
ssl_verify: true
vcenters:
  host: hostname
  passwd: password
  port: 1234
  user: username
vsphere: {}

What i want it to look like:

[root@stackstorm ~]# cat /opt/stackstorm/configs/vsphere.yaml 
sensors:
  taskinfo:
    tasknum: 1
    vsphere: default
ssl_verify: true
vsphere: 
  some-name-i-could-enter:
    host: hostname
    passwd: password
    port: 1234
    user: username

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions