Hi @jameinel, it was not clear but I can see what you mean now. Indeed, a quick search for "compose" on Juju source code returns void, and any other similar reference.
Correct me if I am wrong, but MAAS provider is following this path:
Digging into Juju code, I can see machine allocation starts at: https://github.com/juju/juju/blob/cfda560669d10ca1883d24292e2817243c8c9928/provider/maas/environ.go#L983 Which will eventually lead to: https://github.com/juju/juju/blob/cfda560669d10ca1883d24292e2817243c8c9928/provider/maas/environ.go#L809
That is a call to your gomaasapi lib, which ends on: https://github.com/juju/gomaasapi/blob/65f2e261f089fd379297df942bf12193bd300825/controller.go#L570
Which actually is calling allocate machine: POST /MAAS/api/2.0/machines/?op=allocate
Indeed, on MAAS source code, that call boils down to a logic where, if I cannot find an available machine, MAAS will try to boot a composed machine (VM) out of a Pod: https://github.com/maas/maas/blob/5fe288985249afedadf4656b595238856b13ce4d/src/maasserver/api/machines.py#L2330 Which is exactly what I was looking for.
Regarding Juju logic, am I correct? Or is there any other path to allocate/create machines on MAAS provider?
Hi @jameinel, it was not clear but I can see what you mean now.
Indeed, a quick search for "compose" on Juju source code returns void, and any other similar reference.
Correct me if I am wrong, but MAAS provider is following this path:
Digging into Juju code, I can see machine allocation starts at: /github. com/juju/ juju/blob/ cfda560669d10ca 1883d24292e2817 243c8c9928/ provider/ maas/environ. go#L983 /github. com/juju/ juju/blob/ cfda560669d10ca 1883d24292e2817 243c8c9928/ provider/ maas/environ. go#L809
https:/
Which will eventually lead to:
https:/
That is a call to your gomaasapi lib, which ends on: /github. com/juju/ gomaasapi/ blob/65f2e261f0 89fd379297df942 bf12193bd300825 /controller. go#L570
https:/
Which actually is calling allocate machine: POST /MAAS/api/ 2.0/machines/ ?op=allocate
Indeed, on MAAS source code, that call boils down to a logic where, if I cannot find an available machine, MAAS will try to boot a composed machine (VM) out of a Pod: /github. com/maas/ maas/blob/ 5fe288985249afe dadf4656b595238 856b13ce4d/ src/maasserver/ api/machines. py#L2330
https:/
Which is exactly what I was looking for.
Regarding Juju logic, am I correct? Or is there any other path to allocate/create machines on MAAS provider?