[2.1, doc] `machines create` CLI and API docs need power_parameters reference

Bug #1658990 reported by Ryan Beisner
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Medium
Unassigned

Bug Description

When using the CLI on 2.1.3 for creating machines, and going by the help and API docs, there is no indication of power_parameters usage or requirements under "machine create." However, if omitted, it is announced as a requirement.

See also, "Create a new Machine" @ http://docs.maas.io/2.1/api.html

⟫ maas maas machines create hostname="test-machine" power_type="ipmi" mac_addresses="c0:ff:ee:00:00:00" architecture="amd64"

{"power_parameters": ["This field is required."]}

.

⟫ maas maas machines create --help
usage: /usr/bin/maas maas machines create [--help] [-d] [-k] [data [data ...]]

Create a new Machine.

This method accepts keyword arguments. Pass each argument as a
key-value pair with an equals sign between the key and the value:
key1=value1 key2=value key3=value3. Keyword arguments must come after
any positional arguments.

Adding a server to MAAS puts it on a path that will wipe its disks
and re-install its operating system, in the event that it PXE boots.
In anonymous enlistment (and when the enlistment is done by a
non-admin), the machine is held in the "New" state for approval by a
MAAS admin.

The minimum data required is:
architecture=<arch string> (e.g. "i386/generic")
mac_addresses=<value> (e.g. "aa:bb:cc:dd:ee:ff")

:param architecture: A string containing the architecture type of
    the machine. (For example, "i386", or "amd64".) To determine the
    supported architectures, use the boot-resources endpoint.
:type architecture: unicode

:param min_hwe_kernel: A string containing the minimum kernel version
    allowed to be ran on this machine.
:type min_hwe_kernel: unicode

:param subarchitecture: A string containing the subarchitecture type
    of the machine. (For example, "generic" or "hwe-t".) To determine
    the supported subarchitectures, use the boot-resources endpoint.
:type subarchitecture: unicode

:param mac_addresses: One or more MAC addresses for the machine. To
    specify more than one MAC address, the parameter must be specified
    twice. (such as "machines new mac_addresses=01:02:03:04:05:06
    mac_addresses=02:03:04:05:06:07")
:type mac_addresses: unicode

:param hostname: A hostname. If not given, one will be generated.
:type hostname: unicode

:param domain: The domain of the machine. If not given the default
    domain is used.
:type domain: unicode

:param power_type: A power management type, if applicable (e.g.
    "virsh", "ipmi").
:type power_type: unicode

Common command-line options:
    --help, -h
        Show this help message and exit.
    -d, --debug
        Display more information about API responses.
    -k, --insecure
        Disable SSL certificate check

Tags: uosci
Revision history for this message
Ryan Beisner (1chb1n) wrote :

Granted, one could say that it's understood that an ipmi power type would need ipmi power parameters. This is just a scratch, and a UX improvement opportunity.

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Note that power_parameters are *not* required if one specifies the 'manual' power type - however there is still room to improve the documentation here

Revision history for this message
Ryan Beisner (1chb1n) wrote :

For future travelers, the power_types_* parameters for the ipmi type can be found here:

http://docs.maas.io/2.1/api.html?_ga=1.169730914.2122921856.1469695708#ipmi-ipmi

And, a full usage example:

⟫ maas maas machines create hostname="test-machine" power_type="ipmi" mac_addresses="c0:ff:ee:00:00:00" architecture="amd64" power_parameters_power_address="10.1.1.27" power_parameters_power_user="TheUser" power_parameters_power_pass="ChangeMe"

summary: - [2.1] `machines create` CLI and API docs need power_parameters reference
+ [2.1, doc] `machines create` CLI and API docs need power_parameters
+ reference
Changed in maas:
milestone: none → 2.3.0
importance: Undecided → Medium
status: New → Triaged
Changed in maas:
milestone: 2.3.0 → 2.3.x
Revision history for this message
Adam Collard (adam-collard) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

MAAS Team

Changed in maas:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.