Hi Daniel,
On Tue, Nov 14, 2017 at 10:11 AM, Daniel Souza <
[email protected]> wrote:
> I have a scrip that authenticate to MAAS API 2.0 and execute the request,
> then, I have tried:
>
> rubytesteapi.rb "/machines/{system_id}/?op=commission" "{skip_networking:
> *'1'*}"
> or
> rubytesteapi.rb "/machines/{system_id}/?op=commission" "{skip_networking:*
> 1*}"
> or
> rubytesteapi.rb /machines/{system_id}/?op=commission&*skip_networking=1*
>
> The same script works to other requests. I need to keep the node's network
> config when commissioning, that is why I am using "skip_networking". If I
> use MAAS CLI, this works fine "commission {system_id} skip_networking=1",
> but through API it doesn't work.
>
> Does someone know the correct way to use this parameter?
>
The MAAS API generally uses GET requests for reading and POST requests for
writing. My guess is that passing the parameters on the URL string instead
of the body of the POST request is causing this issue.
I also encourage you to look at our Python API, available here:
https://github.com/maas/python-libmaas
You might find it easier to use it directly, or you may find examples here
of the types of things you want to do.
Regards,
Mike
--
Maas-devel mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/maas-devel