I stopped using the API as the documentation is not that great.
hi
after some digging session , i arrvive to manage MAAS by ansible and call API , for the moment.
I look at some module but i prefer to do it myself ^^
Hi, yes, we deploy servers, both physical and virtual using the KVM hosts nightly:
This is where the process starts, but:
https://gitlab.com/utsa-ics/osias/-/blob/master/deploy.py#L209
For our physical servers:
https://gitlab.com/utsa-ics/osias/-/blob/master/maas_base.py
For our KVM hosts/virtual servers:
https://gitlab.com/utsa-ics/osias/-/blob/master/maas_virtual.py
But that said, our physical servers have static IPâs. But the whole process is there.
@cmills, whatâs offline?
Wow, i donât even understand why I posted that? must of been a typo (late night working on MAAS), during the last month/half I have been using the MAAS API (https://maas.io/docs/api) to automate hardware provisioning.
I was able to commission but Having issues deploying a server, more specifically passing the osystem parameters
POST /MAAS/api/2.0/machines/{system_id}/?op=deploy
Passing the optionally parameters is not straightforward. It would be helpful it you guys were to provide examples of how this would be done!!!
Thanks again for your help in the past
Actually, I remember now, I think stormrider was a website that you posted a while back that had documentation on.
taken under advisement. the api reference is automagically generated, but it does need some examples, i agree.
and stormrider.io is back, along with the doc youâre referencing. my bossâ boss asked me to put it back up, as others were linking to it. be careful what you post!
@cmills, iâm going to try and bring this up with my team in a couple of weeks. can you give me some more detailed examples of where the API doc is failing?
Hello Bill,
Sorry for the late reply.
Letâs start with the api docs page https://maas.io/docs/api, this page mentions the various methods for doing updates, post, get(s) and so forth. This page should include at the top of the page https://maas.io/docs/api-authentication-reference. This reference is very important and the only reference to this is on the side halfway down the page. The contents of that reference I think should be place at the top of this page.
I also include some coding examples of how to use the methods mentioned; It took me some time to figure a lot of this out
update_srv = maas.put(MAAS_HOST + â/api/2.0/machines/â + machine.get(âsystem_idâ) + â/â,data={âzoneâ: zone_info, âpoolâ: resource_pool, âdescriptionâ: description})
set_storage = (maas.post(MAAS_HOST + â/api/2.0/machines/â + machine.get(âsystem_idâ) + â/?op=set_storage_layoutâ, data={âstorage_layoutâ: âlvmâ, âroot_deviceâ: root_fs}))
Having references like this for each option or even some of the options mentioned would be very helpful
Hello Bill,
replied below
brilliant, @cmills! would OpenAPI conformance help with this, you think?
Yes, that will help greatly.
Hey, Clarence,
Thanks again for your feedback and suggestions regarding the MAAS CLI, and the API documentation. I wanted to take a minute apologize for any confusion or difficulties youâve experienced while using the CLI and the API.
I appreciate your detailed examples and examples of where the API documentation could be improved. I will bring your feedback to my team, and we will consider how we can enhance the documentation to provide clearer explanations and more comprehensive examples for each option.
Regarding OpenAPI conformance, weâre trying to get there. OpenAPI specifications do help standardize and improve the documentation of APIs, making them more user-friendly and facilitating integration with other tools. But itâs a process.
Thanks a lot for taking the time to share your insights and suggestions, and for all the time you spend bending metal to make MAAS better. Your feedback has been â and continues to be â valuable in helping us enhance the MAAS API documentation and improve the overall product.
If you have any further questions or need assistance with the MAAS API, please donât hesitate to reach out. Weâre here to help on a best-effort basis!