python-tripleoclient provides the following openstack baremetal
commands:
openstack baremetal instackenv validate:
openstack baremetal import:
openstack baremetal introspection bulk start:
openstack baremetal introspection bulk status:
openstack baremetal configure ready state:
openstack baremetal configure boot:
Based on the data below several of these are already deprecated and have
been so longer enough to be removed.
openstack baremetal instackenv validate:
tripleoclient.v1.baremetal:ValidateInstackEnv
NOT Deprecated
openstack baremetal import:
tripleoclient.v1.baremetal:ImportBaremetal
DEPRECATED in b272a5c6 2017-01-03
New command: openstack overcloud node import
openstack baremetal introspection bulk start:
tripleoclient.v1.baremetal:StartBaremetalIntrospectionBulk
DEPRECATED in b272a5c6 2017-01-03
New command: openstack overcloud node introspect
openstack baremetal introspection bulk status:
tripleoclient.v1.baremetal:StatusBaremetalIntrospectionBulk
NOT Deprecated
openstack baremetal configure ready state:
tripleoclient.v1.baremetal:ConfigureReadyState
NOT Deprecated
openstack baremetal configure boot:
tripleoclient.v1.baremetal:ConfigureBaremetalBoot
DEPRECATED in b272a5c6 2017-01-03
New command: openstack overcloud node configure
This leaves:
openstack baremetal instackenv validate
- This is somewhat superceded by the mistral validation in
tripleo-common
openstack baremetal introspection bulk status
- This should have been deprecated along with
'openstack baremetal introspection bulk start' and isn't useful without
the former.
openstack baremetal configure ready state
- Seems to only support drac and requires a datafile no loner generated
by tools
As these commands have outlived their useful lifetime and do not require
deprecation we're free to remove them so let do it.
Change-Id: Ie6b6a8578e4d12503a3dbfa5747309033d53466e
This will allow the cli and tripleo UI to share a common queue,
which will help with scripting the frontend behaviour or track
the progress of the cli from the frontend.
Related-Bug: #1603345
Change-Id: I5849983eee82b5a56cae1bf38a3c2694b6b291db
The simplejson extends json library. It provides sufficient information about
JSON syntax errors, which often occurs during instackenv.json file creation.
Change-Id: Ied1c080678af728820e02b7b99c51762b49b1449
Closes-Bug: #1693442
Depends on external: https://review.rdoproject.org/r/#/c/7872/
Previously we did not handle exceptions from ironic_inspector_client, so nodes
that were never introspected (e.g. ones in maintenance mode) caused this
command to fail.
Change-Id: I58756256fe70992ff5618a3f307ce34f95e71efd
Closes-Bug: #1689540
The 'bulk introspection start' and 'overcloud node introspect' commands
can now enable the usage of the additional validations that are called
via workflows.
Commands now accept a '--run-validations' switch.
Change-Id: Ifcb30b9ceb15d82fffcda24cb98f2d03f4ded354
Partial-Bug: #1638697
Depends-On: I439361ae20c4e302b83870cdc06a5baa90ea683c
The new node management commands added during Newton as part of the
Mistral migration/API redesign should be used instead. For additional
background information, the thread at [1] is a good reference.
Closes-Bug: #1649541
[1] http://lists.openstack.org/pipermail/openstack-dev/2016-May/095456.html
Depends-On: I7f51190925f7ac1bfa9b122d3b746f2fd6858076
Change-Id: I5997905834f02d47811d28e337d6b2b4f85a75b7
The provide workflow is now called directly from the register_or_update
workflow. It should no longer be called from the client.
Change-Id: I127061eff8763c159f380dd47d3a06813184faba
Depends-On: I40f0b27a0f38447372181f9fae6a31e57dbd79e4
Closes-Bug: #1637474
The "import" command can update existing nodes, which are not necessary
in "manageable" state. However, we try to unconditionally run the "provide"
workflow for such nodes. This change limits it to only "manageable" nodes.
Change-Id: I15219e53abeb43712b25cb3098334f4805f762b5
Partial-Bug: #1635240
It has been in conflict with "baremetal show" command provided by Ironic
since Mitaka, and due to that has been completely broken. The only
reason we haven't noticed that is because nobody uses this command.
Let's just remove it.
Change-Id: I645536f0ae0af3bd318db26543a662de659a27a5
This new library provides the common logic used by openstack
clients. Replacing the imports from openstackclient and cliff.
Depends-On-External: https://review.rdoproject.org/r/#/c/2088/
Depends-On: I095209c241876c6ab48595962e07144fc5cc34a6
Closes-Bug: #1620964
Change-Id: I103a13ff6c0af94b82f5e48652380adfbf331d34
This updates the 'baremetal configure boot' command to work with the
new Mistral workflow. The Root Device tests have migrated to
tripleo-common where the main code now lives as a Mistral action (see
dependent patch).
Change-Id: I3acbfd7900177fc2159448b839b71599e8e51d5f
Depends-On: I5ba0a3710012c44822dd3b8e69662bbef04d3787
Related-Bug: #1595205
The new commands aim to simplify the node management workflow
[1]. Additional configuration will be possible via 'openstack overcloud
node configure.'
[1] http://lists.openstack.org/pipermail/openstack-dev/2016-May/095456.html
Change-Id: I704438da31a31a90f882ddd01ba02e3ca62549ac
Depends-On: Iea9b7f3b49f99f810ce759f65b45b88c1c40f010
Partial-Bug: #1595205
This is more readable that the current Ironic format, and tripleo-common
supports starting with fc05b1bdac1554ec81be9ead55e225cd2f59ccae.
Change-Id: I733ae03d04a96941285e2767bafa7d19083aba87
Updates the baremetal registration workflows to use Mistral
instead of python.
Co-Authored-By: Dougal Matthews <dougal@redhat.com>
Co-Authored-By: Ryan Brady <rbrady@redhat.com>
Change-Id: Ide8b7753829170f503ef962b4ad4fde388cbb0ba
Depends-On: Ifc6bdd273a8e129ea7c4269d00add64e72cd371b
Depends-On: I910f50a377bcbc2c23b527953e9df7eee9c938a4
In our default flow we already have all the images uploaded by the time we
import the Ironic nodes. So we can make the "configure boot" command optional
by setting images and the local boot capability right during the import.
This change also introduces 2 more flags to opt-out from these changes:
--no-deploy-image will skip setting the deploy image
--instance-boot-option allows setting the boot_option capability explicitly
(it still requires changing flavors to match)
It's still possible to override the capabilities in the instackenv.json.
Change-Id: I00bbdff724ecfd6b840a74767617126734d7a32c
This state was introduced in Liberty as a new state for freshly enrolled
nodes, but is only exposed to clients who specify an API version >=
1.11. We add a new --initial-state parameter to `openstack baremetal
import` to enable use of the new state.
Change-Id: If04889c3778827a77236f6d88617211ecc0f4161
...by removing the RAID related functionality because it only existed in
the rdo-management repos but not in upstream Ironic.
Change-Id: I0913a70c8f50ab6a80f527086ad7c78a5ddde3e1
This command was introduced to display node profiles. This job is now better
done by the "overcloud profiles list" command. As a result, this command is not
covered by our documentation at all.
Also, Ironic will have its own API and commands for handling capabilities
reasonably soon, so we risk clashing with them.
Change-Id: I423a03801280b9f9614214a7b8a615e8056b9b25
This change simplifies using Ironic root device hints for people who only need
to change the default strategy of selecting the default device.
E.g. we have a use case for selecting the first device instead of the smallest,
so that the root device does not change after upgrade Kilo -> Liberty.
Note that this feature does not replace per-node device hints, rather
complement them with a more global and easy to use setting.
This change introduces 3 new arguments to the command:
--root-device states how to find a root devices for a node.
If this argument is provided, the client will try to detect the root device
based on the stored introspection data. Possible values:
* smallest (the same thing as IPA does by default - the smallest device)
* largest (the opposite thing - pick the largest device)
* otherwise it's treated as a comma-separated list of possible device names,
e.g. sda,vda,hda rouchly matches the logic the Kilo ramdisk used.
The resulting device WWN or serial (whatever is available) is then recorded
in the root device hints (/properties/root_device) for a node.
--root-device-minimum-size minimum size of the considered devices
The default value of 4 GiB matches what IPA does.
--overwrite-root-device-hints allows overwriting root device hints set
previously. It's disabled by default to allow more precise control over the
root device for some subset of nodes.
Note that for these arguments to work, this command should be run after
introspection. A separate documentation change will be posted for that.
Change-Id: I9f19554c5e7f34c8f63c1603c32b4d470fb12592
JSON, and to a lesser extent CSV, are not friendly formats for human
users, so also support yaml.
Also make the --json/--csv options deprecated and optional - we can
just detect the filetype via the suffix instead of introducting a
new option enabling yaml support.
Note there are future improvements we can make around the test here,
e.g reducing duplication via testscenarios and improving the handling
of temporary files, but I've not considered that in this patch and
have stuck with the current conventions.
Change-Id: I8c5518d71c2db0d56af443c97212f5a63a36a545
We have 2 more workarounds in place for the same problem:
* ironic-inspector has its own delay logic, which is configurable (unlike this)
and is shared with anyone using inspector, not only this CLI
* puppet-ironic uses dhcp-sequential-ip option to reduce probability of a
conflict substantially (we can no longer artificially reproduce it)
Change-Id: I4f330541f1a62cb5e7ef3644b326a8ae68e13b4d
Right now we are using the ironic-inspector-client functions directly with
providing the auth token. This is deprecated in favor of providing the session.
However, inside the OSC plugin the introspection client is already available,
so just use it directly. This patch also stops redefining --inspector-url which
is already defined by ironic-inspector-client.
Change-Id: I9538e32967103f71c2af94077eb1994462a88d18
When configuring boot on the baremetal nodes, we first do a list
and then iterate over the results. This can be a minor hassle if
some of the nodes start out in a transitional power state because
the initial list results don't get updated before checking each
subsequent node. We end up waiting the sleep time unnecessarily
until the node status is refreshed for every node that was in
transition, even though most of them have probably finished by the
time the first one or two do.
Also removes a later call to node.get since it is now
redundant.
Change-Id: I88d4c57167729cbfb24a9c2ca554738a7fbac3ab
The Ironic client now supports the OSC plugin interface directly, so
this wrapper is no longer needed. Removing it will allow us to specify
which Ironic API version to use via the standard mechanisms.
Change-Id: If92855c307ecd389fbe6050e426d0ced959a9665
Depends-On: Icdbd28c487351af6d67205837aa536aedb31b41a
This state was introduced in Liberty as a new state for freshly
enrolled node. Transition from it is done by the same verb "manage",
but now involves validation of power credentials.
This commit also
- makes utils.wait_for_provision_state raise appropriate exceptions on
error rather than returning False
- adds a utils.nodes_in_states function to list baremetal nodes in a
given set of states.
- adds logic to baremetal/fakes.py to track states of fake nodes; this
is much simpler and less brittle than precisely mocking the results of
API calls in exactly the order the library code makes them.
- consistently mocks bulk introspection tests at the client layer,
rather than at a variety of layers.
- adds tests for timeout and power-credential error during bulk
introspection.
- doesn't set nodes to "available" if they fail introspection or power
credentials
Change-Id: I4da61491f60f7ebd42ca1f8fe45c3d4df6e49887
Currently it only prints an error message, but exists with success.
This makes it impossible to use this command in any kind of automated
scripts or test it in our gate. This patch makes it raise an exception.
Change-Id: I150c87252a48a8062aa7ef04c7a52433dd5ee37d
Some time ago ironic-discoverd used to require maintenance mode.
This was changed back in Kilo, and was deprecated in Liberty.
Also cleans up introspection code a bit.
Change-Id: Ib2ea84a8e7f0a42423199cd1db40136ab8495fdc
Use a property instead of a function. This is more in line with how the
clients are referenced with openstackclient, thereby making it easier
to switch to the Ironic OSC plugin in the future.
Change-Id: I0b4d35f0af6136dd1bce6c6d4202caa52f4c042e
In order to be able configure bm deploy with various images,
option --deploy-kernel and --deploy-ramdisk were added to baremetal boot
config command.
Change-Id: I43a7de21f965bc344a9eea20b289182c875b6a83
Closes-Bug: rhbz#1249836