This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Command Line Interface to ease the use of OneView Driver for Ironic

Project Description


Ironic-OneView CLI is a command line interface tool for easing the use of the OneView Drivers for Ironic. It allows the user to easily create and configure Ironic nodes compatible with OneView Server Hardware objects and create Nova flavors to match available Ironic nodes that use OneView drivers.

This tool creates Ironic nodes based on the Ironic OneView drivers’ dynamic allocation model [1] [2].


This tool works with OpenStack Identity API v2.0 and v3.


This tool works with OpenStack Ironic API microversion ‘1.22’.

For more information on HPE OneView entities, see [3].


To install Ironic-OneView CLI from PyPI, use the following command:

$ pip install ironic-oneview-cli


Ironic-Oneview CLI uses credentials loaded into environment variables by the OpenStack RC and by the Ironic-OneView CLI RC files. You can download the OpenStack RC file from your cloud controller. An Ironic-OneView CLI RC sample file can be generated using the genrc subcommand:

$ ironic-oneview genrc >

Since you have the sample file, you can set the OneView credentials using your editor and load its environment variables by running:

$ source

You can also set credentials by passing them as command line parameters. To see which parameters to use for setting credentials, use the command:

$ ironic-oneview help

For more information how to obtain and load the OpenStack RC file, see [4].


Once the necessary environment variables and command line parameters are set, Ironic-OneView CLI is ready to be used.

In the current version of Ironic-OneView CLI, the available subcommands are:

node-create Creates nodes based on available HPE OneView Server Hardware.
flavor-create Creates flavors based on available Ironic nodes.
genrc Generates a sample Ironic-OneView CLI RC file.
help Displays help about this program or one of its subcommands.

The ironic-oneview-cli can be run in debugging mode with the –debug parameter, as in:

$ ironic-oneview --debug node-create


Node creation

To create Ironic nodes based on available HPE OneView Server Hardware objects, use the following command:

$ ironic-oneview node-create

The tool will ask you to choose a valid Server Profile Template from those retrieved from HPE OneView appliance.:

Retrieving Server Profile Templates from OneView...
| Id | Name                   | Enclosure Group Name | Server Hardware Type Name |
| 1  | template-dcs-virt-enc3 | virt-enclosure-group | BL460c Gen8 3             |
| 2  | template-dcs-virt-enc4 | virt-enclosure-group | BL660c Gen9 1             |

Once you have chosen a valid Server Profile Template, the tool lists the available Server Hardware that match the chosen Server Profile Template. Choose a Server Hardware to be used as base to the Ironic node you are creating.:

Listing compatible Server Hardware objects...
| Id | Name            | CPUs | Memory MB | Local GB | Enclosure Group Name | Server Hardware Type Name |
| 1  | VIRT-enl, bay 5 | 8    | 32768     | 120      | virt-enclosure-group | BL460c Gen8 3             |
| 2  | VIRT-enl, bay 8 | 8    | 32768     | 120      | virt-enclosure-group | BL460c Gen8 3             |

Notice that you can create multiple Ironic nodes at once. For that, type multiple Server Hardware IDs separated by blank spaces. The created Ironic nodes will be in the enroll provisioning state.


If you have the parameter os_inspection_enabled = True, the created node will not have the hardware properties (cpus, memory_mb, local_gb, cpu_arch) set in the node properties. This will be discovered during the Ironic Hardware Inspection.

Alternatively, you can set a Server Profile Template through command line and the tool prompt the list of Server Hardware to be used. For that, use the following command:

$ ironic-oneview node-create --server-profile-template-name <spt_name>

Or set the number of nodes you want to create and the tool will show the list of Server Profile Template to be chosen. For that, use the following command:

$ ironic-oneview node-create --number <number>


You can use both arguments at once.

If you have the Networking OneView ML2 Driver enabled, use the following command to add this information in the node driver_info:

$ ironic-oneview node-create --use-oneview-ml2-driver

For more information on Networking OneView ML2 Driver, see [5].

To list all nodes in Ironic, use the command:

$ ironic node-list

For more information about the created Ironic node, use the command:

$ ironic node-show <node_uuid>

Flavor creation

To create Nova flavors compatible with available Ironic nodes, use the following command:

$ ironic-oneview flavor-create

The tool will now prompt you to choose a valid flavor configuration, according to available Ironic nodes.:

| Id | CPUs | Disk GB | Memory MB | Server Profile Template             | Server Hardware Type | Enclosure Group Name    |
| 1  | 8    | 120     | 8192      | second-virt-server-profile-template | BL460c Gen9 1        | virtual-enclosure-group |

After choosing a valid configuration ID, you’ll be prompted to name the new flavor. If you leave the field blank, a default name will be used.

To list all flavors in Nova, use the command:

$ nova flavor-list

For more information about the created Nova flavor, use the command:

$ nova flavor-show <flavor>

Node delete

The tool also offers the option to delete a specific number of Ironic nodes. For that use the following command:

$ ironic-oneview node-delete --number <number>

To delete all Ironic nodes, use the command:

$ ironic-oneview node-delete --all
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ironic-oneview-cli-1.0.0.tar.gz (30.2 kB) Copy SHA256 Checksum SHA256 Source May 29, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting