Here is a work around that I used.
1. Install jq, is like sed for json.
sudo apt install jq
2. Then execute this to obtain host Ids
maas admin machines read | jq ".[] | \ {hostname:.hostname, system_id: .system_id, status:.status}" --compact-output
3. On each host you want to configure, Where c8c3w is the id of the host, this will get You the Ids of the NICs.
maas admin interfaces read c8c3ew | jq ".[] | \ {id:.id, name:.name, mac:.mac_address, vid:.vlan.vid, fabric:.vlan.fabric}" --compact-output
4. Then You can configure the interfaces on the vlan/subnet of your choice. 9 is the id of the NIC
maas admin interface link-subnet c8c3ew 9 mode=DHCP subnet="192.168.xx.0/24" force=True
5. If you want to create Bonds
maas admin interfaces create-bond c8c3ew name=bond0 \ parents=9 parents=14 \ bond_mode=active-backup \ bond_updelay=200 bond_downdelay=200 mtu=9000
Here is a work around that I used.
1. Install jq, is like sed for json.
sudo apt install jq
2. Then execute this to obtain host Ids
maas admin machines read | jq ".[] | \ .hostname, system_id: .system_id, status:.status}" --compact-output
{hostname:
3. On each host you want to configure, Where c8c3w is the id of the host, this will get You the Ids of the NICs.
maas admin interfaces read c8c3ew | jq ".[] | \ .vlan.fabric} " --compact-output
{id:.id, name:.name, mac:.mac_address, vid:.vlan.vid, fabric:
4. Then You can configure the interfaces on the vlan/subnet of your choice. 9 is the id of the NIC
maas admin interface link-subnet c8c3ew 9 mode=DHCP subnet= "192.168. xx.0/24" force=True
5. If you want to create Bonds
maas admin interfaces create-bond c8c3ew name=bond0 \ active- backup \
parents=9 parents=14 \
bond_mode=
bond_updelay=200 bond_downdelay=200 mtu=9000