0

I would like to pre-populate MAAS with new machines for future OS deployments. For example, I have 10 servers, each with a quad port nic. I know the MAC addresses (40) that belong to the servers (10), but don't know which MAC will get connected when the server is wired up. How do I add these by script or CLI to MAAS.

Same question but for devices too. (routers, unmanaged hosts, etc.)

Currently, MAAS can discovery them, and I can add them to the database from the dashboard. But this is time consuming, and has to be re-done everytime we trial out a new MAAS server.

Unless I am missing something, or the --help is incomplete, the CLI commands don't have add/create functions.

Seems odd to me that this command doesn't exist:

maas <user> nodes create

...so I am wondering if this is just not implemented yet, there is another way to handle this, or I am making a conceptual/workflow error.

James
  • 1,103

1 Answers1

1

maas <user> nodes is a read-only endpoint to read nodes. Nodes are a generic term for all Machines, Devices, and Controllers in MAAS. To be able to add a machine or device you must use the correct endpoint.

Add a machine:

maas <user> machines create [params]...

Add a device:

maas <user> devices create [params]...

Blake R
  • 431