This adds support for the node.resource_class field, introduced in
API 1.21. It can be modified on an existing node or passed when
creating a node, or used as a filter when fetching a list of nodes.
Change-Id: Id494a8b735a3532db84d90ba21da173f7e33ed1d
Depends-On: I936f2e7b2f4d26e01354e826e5595ff021c3a55c
Partial-Bug: #1604916
This patchset adds port creation with new optional parameters specifying
new port attributes (local_link_connection, pxe_enabled).
It also adds new parameter network_interface to node object.
Co-Authored-By: Vasyl Saienko (vsaienko@mirantis.com)
Co-Authored-By: William Stevenson (will.stevenson@sap.com)
Partial-bug: #1526403
Depends-on: I67495196c3334f51ed034f4ca6e32a3e01a58f15
Change-Id: If2fb996783b9ac26a5bae2aadd6387207750def9
This commits add the following:
* Ability to set target_raid_config for a node using
node-set-target-raid-config.
* Display target_raid_config and raid_config in node-show.
* Display logical disk properties for a driver using
driver-raid-logical-disk-properties.
NOTE: Client still defaults to version 1.9, so
'--ironic-api-version 1.15' (or above) should be
added to the CLI to use the feature as RAID can be
triggered only with manual cleaning which uses the
ironic-api-version 1.15.
Co-Authored-By: Nisha Agarwal <agarwalnisha1980@gmail.com>
Closes_bug: 1526400
Change-Id: Id7bb8a242838029e4cc3715d18b27fb1d5cd4dfa
This adds the manual cleaning CLI:
usage: ironic node-set-provision-state [--config-drive <config-drive>]
[--clean-steps <clean-steps>]
<node> <provision-state>
where <provision-state> is 'clean' and <clean-steps> is
the clean steps in JSON format. May be the path to a file containing
the clean steps; OR '-', with the clean steps being read from
standard input; OR a string. The value should be a list of clean-step
dictionaries; each dictionary should have keys 'interface' and
'step', and optional key 'args'. This argument must be specified
(and is only valid) when setting provision-state to 'clean'.
Change-Id: Id5907812935096c5c557c896daf72175ed138866
Partial-Bug: #1526290
Depends-On: I0e34407133684e34c4ab9446b3521a24f3038f92
Add CLI function to list nodes using the same driver.
Change-Id: I3ee3dd4fd52931a4eebb6ff037d83eb95e4fb1ba
Partial-Bug: #1530626
Depends-On: I998d6a0a6da44487d5ba90dafd417d81d1c7e504
without changing the API
This commit does refactoring regarding the base.Manager and the
specific managers that inherit from it (Chassis, Node, Port and
Driver).
The specific managers had a lot of duplicate code in methods like:
get, create, delete and update, they were literally equal, what does
not make sense once we already had the base.Manager inheritance to
avoid this type of problem.
This change moves the duplicate code to the parent (base.Manager) and
make the specific managers simpler by making the base.Manager more
useful regarding code reuse for these methods.
Change-Id: Ic77a86196d5bcd956f0a3ae517200824a4d70aa8
Closes-Bug: #1517631
node-port-list accecpts node_name but help say it only accecpt
node_uuid. Correct it and add related tests.
Change-Id: I37f7d505e249156e6a428c3b8d2648b43fcc3df4
This reverts commit 46b279bb36b2647bf04097fe271586fca76f5ed0.
The patch being reverted has broken the API compatibility. Until a fix
for this issue has been created, the patch should be reverted.
Change-Id: I1295c3e0d5ca228253874719befd7ed842d505fa
Closes-Bug: #1521429
This commit does refactoring regarding the base.Manager and the
specific managers that inherit from it (Chassis, Node, Port and
Driver).
The specific managers had a lot of duplicate code in methods like:
get, create and vendor_passthru, they were literally equal, what does
not make sense once we already had the base.Manager inheritance to
avoid this type of problem.
This change moves the duplicate code to the parent (base.Manager) and
make the specific managers simpler by making the base.Manager more
useful regarding code reuse for these methods.
Change-Id: I9acef9ecc815df61d7ddabe3fae9eccdafe2eeed
Closes-Bug: #1517631
The input of set_power_state() is different from the real string
it sends to Ironic service in json data. The power states were
translated in set_power_state(). Using a dict to map the translation
is more clear, and easier to add new power states.
Change-Id: I8c7dac1ac39f92b2031e7f1fa95cd5c398a708d5
Implements: blueprint enhance-power-interface-for-soft-reboot-and-nmi
Related-to: blueprint soft-reboot-poweroff
Related-to: blueprint instance-crash-dump
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