Creating an action with a loosely defined parameter

Marco Ceppi marco.ceppi at canonical.com
Thu Feb 4 21:59:05 UTC 2016


I'm inclined to say "yes" but I'd need a bit more of an example to confirm.
Since actions are defined as jsonschema you can define nested parameters
and such so I believe your usecase will work. However, the parameters you
pass must be in the schema. Juju uses it to validate that the data passed
is correct.

EG:

http://paste.ubuntu.com/14882820/

I could do

juju action do network-qos device=eth1 delay.time=2000

but not

juju action do network-qos delay.non-existant-option=True

Marco

On Thu, Feb 4, 2016 at 3:34 PM Tom Barber <tom at analytical-labs.com> wrote:

> Alright then chaps.
>
> I want to create an action with a parameter that may or may not exist plus
> you might define it more than once.
>
> I see in the actions doc some stuff about aditional properties which may
> or maynot be relevant. Can i pass in an array of objects of the same type
> so my bash script can iterate over them and build my required string?
>
> Thanks
>
> Tom
> --------------
>
> Director Meteorite.bi - Saiku Analytics Founder
> Tel: +44(0)5603641316
>
> (Thanks to the Saiku community we reached our Kickstart
> <http://kickstarter.com/projects/2117053714/saiku-reporting-interactive-report-designer/>
> goal, but you can always help by sponsoring the project
> <http://www.meteorite.bi/products/saiku/sponsorship>)
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20160204/90dfd4c8/attachment.html>


More information about the Juju mailing list