Add support for filtering nodes by provision state in the
node-list command. For provision states with spaces, like
'wait call-back' ironicclient will encode it to %20 in the
uri.
And bump the default version to 1.9.
Closes-Bug: #1468229
Depends-On: Ifcd554de04cdc42bffea1a116307b045f39c8416
Change-Id: I9967ff6124e2e7e9958098b41cc892f2c55df5d2
This patch add a "--fields" parameter to the "node-list", "node-show"
and "node-port-list" commands which the user can specify a subset of
fields that will be returned by the server.
This is supported by the Ironic API version >= 1.8, so this patch also
bumps the default API version to 1.8.
Related-Bug: #1466495
Change-Id: I40654ee9fbd92dd91b41f8596adcd26264634147
The set of valid input strings for Boolean values was inconsistent among
the subcommands of the Ironic CLI. egs:
-for node-set-console-mode: 'true', 'false'
-for node-set-maintenance: 'on', 'off', 'true', 'false', 'True', 'False'
This change allows the same set of valid values for all the subcommands:
'0', '1', 'f', 'false', 'n', 'no', 'off', 'on', 't', 'true', 'y', 'yes'.
For invalid strings, we output the subcommand usage along with the
argument, invalid string, and valid string choices.
At the API level, if NodeManager.set_maintenance() is passed an invalid
state (maintenance mode) value, an InvalidAttribute exception is raised.
Change-Id: I541695388489cdc640265df8ee6a9999e1442870
Closes-Bug: #1415943
This is basically a revert of commit:
af741ec2236619880fa902d68aef4a6ae6cef534
It was decided that only files that need to have the line:
# -*- coding: utf-8 -*-
Should have the line[1] as a general principle
This patch removes the 'utf-8' coding line from files that consist
entirely of ASCII characters.
[1]
http://eavesdrop.openstack.org/meetings/ironic/2015/ironic.2015-04-20-17.00.html
Partial-bug: #1325193
Change-Id: I88c1c37f7b580aa805eae9d4a1e66d33302a325f
This patch is adding support for generating the config drive as part of
the node-set-provision-state command. If a directory is passed via the
--config-drive parameter, the client will then generate a configdrive
with the contents of that directory and give it to Ironic.
Change-Id: I9163846acb30b34d34953f3b82b797ec944569d9
Add client support for node logical names.
- update help strings to indicate places where Names can be used instead
of UUIDs
- add new "-n" / "--name" parameter to "ironic node-create"
- add Name field to output of both "node-list" and "node-show"
Change-Id: Id16255e9611e95bd37a225ff475268f609726e37
Implements: blueprint logical-names
Fix PEP8 E126,E127,E128 errors, which were the only ones remaining.
Fix PEP8 errors:
E126: continuation line over-indented for hanging indent
E127: continuation line over-indented for visual indent
E128: continuation line under-indented for visual indent
Remove the ignore= entries for flake8 in tox.ini
Change-Id: I919551121d85d2aab528f4fa5ecdb3cfd940557a
ironicclient node-set-maintenance as of now accepts on/off, but this is not
consistent with the API which accepts true/false.
proposed changes to ironicclient to accept true/false for node-set-maintenance
to maintain consistency.
Change-Id: I93744384267b4670c7a14a90b14bd5afede45fc4
Closes-Bug: #1414804
This patch is extending the node-set-provision-state command and library
to accept a config drive as parameter. The config drive can be passed
as a string or as an actual file.
Implements: blueprint expose-configdrive
Change-Id: Ifa3e005ddbffb81f10febefc4e164eaa2a6924d3
Extend the vendor_passthru() library methods and clients to support
issuing different HTTP methods on the vendor endpoints.
Implements: blueprint extended-vendor-passthru
Change-Id: I32a4990ed3db0bc73ce845b9b4119d87ab2e1503
The vendor_passthru() method for the node and driver library was
expecting a **kwargs, that isn't helpful because you don't know exactly
how much parameters it expects, what are the parameters etc... This
patch is changing it since the parameters are well defined (we knew what
parameters we were expecting there).
Change-Id: Idb2002eb76e76f6e1b67a6ea1a7d31f41573abdd
This command accepts an optional reason and calls the new
/nodes/uuid/maintenance endpoint to set and clear maintenance
mode and maintenance reason.
It will reject setting maintenance mode to off with a reason,
as setting maintenance mode to off clears the reason.
Change-Id: I04e14bc239b343d8791747963e4feec1e2cbdda8
Implements: blueprint maintenance-reason
Ironic's REST API allows a client to supply a UUID when registering a node.
However, the client was incorrectly passing this value as the "node_id"
property, rather than the "uuid" property, resulting in the API service
ignoring the parameter and generating a new UUID anyway.
This corrects the behavior by passing the appropriately named parameter
if the user specified a UUID when registering a new node.
Closes-bug: #1381203
Change-Id: I23ebbf20d836f0afc507be5c9dbbe1d759a3cddb
This commit adds support for getting a list of ports, chassis, ports
associated with a node and nodes associated with a chassis with all
attributes, to both the client and the shell CLI.
Closes-Bug: #1366866
Change-Id: If1941de66d70cdbcc3f31cefdbcd4f634e6ce24e
These arguments are using for sorting the result on the server.
Small refactoring was conducted to seperate processing of
common arguments for all lists into the utility function.
Change-Id: I33be1fcecc665c8f2207e53b24ff47954d80dc60
Closes-Bug: #1339731
Previously this method was issuing two requests: One filtering the node
by instance_uuid and another to get all the informations about that
node. This patch optimize it by using the /detail flag which will filter
the node by the instance_uuid and return all informations in one request.
Change-Id: Ia22c5012af12b131d5a6601653d704b5a9f39d82
This commit adds support for getting a list of node with all
attributes, to both the client and the shell CLI.
Closes-Bug: 1354051
Change-Id: Ic95b865b6e1da5fa42bb8fa7302bb4cd4c98d540
Add set_boot_device, get_boot_device and get_supported_boot_devices
commands to the client library.
Implements: blueprint new-management-interface
Change-Id: Ib8ba6ef0da9113967f4135dea6e20284eda9d825
This commit adds support for calling vendor-passthru
methods for nodes and drivers.
Change-Id: I73dd6c74f4b069e297cbf2175ffbba39fc1d6df6
Closes-Bug: 1330777
the presence of a 'next' field is the indicator to continue pagination
until there're no more values to be returned.
On the CLI two new options were added to commands used to list resources:
* --marker: Optional, the UUID of an item, eg the last item from a
previous result set. Return the next result set.
* --limit: The maximum number of results to return per request, if:
1) limit > 0, the maximum number of items to return.
2) limit == 0, return the entire list of items.
3) limit param is NOT specified (None), the number of items
returned respect the maximum imposed by the Ironic API
(see Ironic's api.max_limit option).
Closes-Bug: #1314992
Change-Id: I77cc7a7df65c3d2a84144b12a001487ff6832045
While not strictly necessary for files containing only ASCII
characters, adding a line with "coding: utf-8" can guard against
future SyntaxError's in case someone inserts a Unicode literal.
This commit adds such lines to all .py files. The syntax used by this
commit works with Python (of course). It also works with Emacs, which
will recognize the special "-*-" marker and use the "coding" variable
to correctly decode the file, even in an environment where UTF-8 is
not the default file encoding.
Existing coding lines were normalized to match the new lines added.
Partial-bug: #1325193
Change-Id: I58bf93fea711fd25890356a397e594bd820c99e3
Module `ironicclient.exc` contains exceptions which equal to exceptions
from oslo common code.
This patch:
- sync latest code of `apiclient.exceptions`(hash of last commit in oslo
related to apiclient.exceptions: 3570f44d5ccf52c59cc586bed1446b874fc3c07c)
- reuses exceptions from common code
- removes needless exceptions from `ironicclient.exc`
Related to bp common-client-library-2
Change-Id: I784007f36dd6a63fc4c77e0d0f0f000e05eb792f
Get connection information about the console and enable/disable the
console on the node.
Shows the console_enabled field in the node-show command.
Change-Id: I1cc4c6d97297ab8631f2923a5e7bd800b7d3c11c
The node.states() does issue GET request at /nodes/<uuid>/states to get
the current states of that node.
Change-Id: I9e93447df53a0ba1e0f723e95af80fb126218626
The commit https://review.openstack.org/#/c/61160/ exposes in the Ironic
API a way to trigger the provisioning of a node. This patch add this
functionality on the client libraries (Not exposed on the CLI).
Change-Id: I8c0f339f2c76c153ecba961d0ca411d438c21ceb
The commit https://review.openstack.org/#/c/60299 refactored the /state
subresource of nodes in the Ironic API and one of the changes made was
to rename the subresource from /state to /states (plural) since now both
power and provision state can be retrieved in one request call.
Change-Id: I3e3cf29fa0fd48063ae0ca14eac6f685ccc44e65
The client library should be able to request that a node be rebooted by
passing the "reboot" state to the API. This functionality should be
exposed in the CLI as well.
This depends on commit Ic13c046c621211d9c1533325812955233441d2da
Change-Id: I7954c02a3b5fd8f6caa574fd581f2ae3b0c3d422
Add the node-validate command that triggers the validation of the 'core'
and 'standardized' driver interfaces of a given node. This will also be
used by the ironic driver on nova to validate the node driver interfaces
before deploying it.
Change-Id: I93811c9bfbfe4f7b8559fc4ce566c8d4e19a54ac
The commit https://review.openstack.org/#/c/57495/ introduced the
chassis_uuid attribute for Nodes in the Ironic API, this patch adjusts
the client to reflect that change.
Change-Id: Ia490fbe0bcf32fc474a3c74842003addc2a94e6d
This patch updates the node-show subcommand for ironic so that it
shows the node that matches the given instance UUID.
ironic node-show [--instance] id
It also updates node-list subcommand so that it can show all the
nodes that have instance UUID associated or the opposite.
ironic node-list [--associated true|false]
This patch also fixes a few strings for i18n support.
Change-Id: I2aec9ba6e296e0d1db9f3ef9eed7236ecfb32cf6
Closes-Bug: #1239026