Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all MachineTags are strings #31

Open
sodre opened this issue Apr 12, 2016 · 1 comment
Open

Not all MachineTags are strings #31

sodre opened this issue Apr 12, 2016 · 1 comment

Comments

@sodre
Copy link

sodre commented Apr 12, 2016

Currently MachineTag values are assumed to be strings.
This is not the case for the tag "triton_cns_disable" tag, despite the documentation saying it accepts any string, CloudAPI only accepts booleans for that field.

This is called from triton since I can't quite get gosdc to work without using hashicorp/terraform

Setting it to an arbitrary string.

$ triton inst tag set smartos triton.cns.disable="blah"
triton inst: error (ValidationFailed): error adding tags: Invalid tag parameters
    tags: Invalid: "triton.cns.disable" must be a boolean

Setting it using the string "true" (something is converting it to bool before continuing)

$ triton inst tag set smartos triton.cns.disable="true"
{
    "triton.cns.disable": true
}

Setting it using "bool" false

$ triton inst tag set pgxl-smartos triton.cns.disable=false
{
    "triton.cns.disable": false
}
@twhiteman
Copy link

Joyent CloudAPI will actually return tags in any of String | Number | Boolean format (I think they are correcting the documentation for this as I type), which means the gosdc tags will need to be changed to use a map of String to Interface (and the underlying interface value must be one of string, bool or int64).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants