machine allocate only documents old networks interface and not interfaces or storage constaints
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Mike Pontillo |
Bug Description
Document lacks information on constaints for storage/interface
POST /api/2.0/machines/ op=allocate
Allocate an available machine for deployment.
Constraints parameters can be used to allocate a machine that possesses certain characteristics. All the constraints are optional and when multiple constraints are provided, they are combined using ‘AND’ semantics.
param name: Hostname of the returned machine.
type name: unicode
param arch: Architecture of the returned machine (e.g. ‘i386/generic’, ‘amd64’, ‘armhf/highbank’, etc.).
type arch: unicode
param cpu_count:
The minium number of CPUs the returned machine must have.
type cpu_count: int
param mem: The minimum amount of memory (expressed in MB) the returned machine must have.
type mem: float
param tags: List of tags the returned machine must have.
type tags: list of unicodes
param not_tags: List of tags the acquired machine must not have.
type tags: List of unicodes.
param networks: List of networks (defined in MAAS) to which the machine must be attached. A network can be identified by the name assigned to it in MAAS; or by an ip: prefix followed by any IP address that falls within the network; or a vlan: prefix followed by a numeric VLAN tag, e.g. vlan:23 for VLAN number 23. Valid VLAN tags must be in the range of 1 to 4094 inclusive.
type networks: list of unicodes
param not_networks:
List of networks (defined in MAAS) to which the machine must not be attached. The returned machine won’t be attached to any of the specified networks. A network can be identified by the name assigned to it in MAAS; or by an ip: prefix followed by any IP address that falls within the network; or a vlan: prefix followed by a numeric VLAN tag, e.g. vlan:23 for VLAN number 23. Valid VLAN tags must be in the range of 1 to 4094 inclusive.
type not_networks:
list of unicodes
param zone: An optional name for a physical zone the acquired machine should be located in.
type zone: unicode
type not_in_zone:
Optional list of physical zones from which the machine should not be acquired.
type not_in_zone:
List of unicodes.
param agent_name:
An optional agent name to attach to the acquired machine.
type agent_name:
unicode
param comment: Optional comment for the event log.
type comment: unicode
param dry_run: Optional boolean to indicate that the machine should not actually be acquired (this is for support/
type dry_run: bool
param verbose: Optional boolean to indicate that the user would like additional verbosity in the constraints_by_type field (each constraint will be prefixed by verbose_, and contain the full data structure that indicates which machine(s) matched).
type verbose: bool
Related branches
- Blake Rouse (community): Approve
-
Diff: 117 lines (+58/-2)4 files modifiedsrc/maasserver/api/machines.py (+31/-1)
src/maasserver/api/tests/test_machines.py (+16/-0)
src/maasserver/node_constraint_filter_forms.py (+10/-1)
src/maasserver/tests/test_node_constraint_filter_forms.py (+1/-0)
Changed in maas: | |
milestone: | none → 2.0.0 |
tags: | added: doc |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in maas: | |
status: | Triaged → Fix Committed |
assignee: | nobody → Mike Pontillo (mpontillo) |
Changed in maas: | |
status: | Fix Committed → Fix Released |