`juju run-action` should treat parameter value with quotation marks as string
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
Hello,
I suggest adding support for treating a parameter value with quotation marks as a string when running `juju run-action`. The `--string-args` flag it has right now converts all parameter values to the type string, which causes errors if an action requires various input types for different parameters.
An example case:
To remove and purge a disk in a ceph-osd unit, one can run the following action
`juju run-action --wait ceph-osd/0 remove-disk osd-ids=1 purge=true`
osd-ids only accepts a string value, and purge only accepts a boolean value. Without using `--string-args`, the action fails because `1` is considered as an integer. With `--string-args`, the action again fails because `true` is considered as a string now.
If treating a value with quotation marks as string is supported, we no longer need to face the dilemma by simply running:
`juju run-action --wait ceph-osd/0 remove-disk osd-ids="1" purge=true`
tags: | added: actions |
Changed in juju: | |
milestone: | none → 2.9-next |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in juju: | |
milestone: | 2.9-next → none |
This Medium-priority bug has not been updated in 60 days, so we're marking it Low importance. If you believe this is incorrect, please update the importance.