PYTHON-IRONICCLIENT(1)
π NAME π
okay bestie, welcome to PYTHON-IRONICCLIENT(1) β the manual page for python-ironicclient, version python-ironicclient 6.3.0. This is the client for the OpenStack Ironic API (https://wiki.openstack.org/wiki/Ironic). It gives you:
- a Python API: the
ironicclientmodule, and - command-line interface:
openstack baremetal
π CONTENTS π
π ironicclient Python API π
The ironicclient python API lets you access ironic, the OpenStack Bare Metal Provisioning Service.
For example, to manipulate nodes, you interact with an ironicclient.v1.node.Node <#ironicclient.v1.node.Node> object. You obtain access to nodes via attributes of the ironicclient.v1.client.Client <#ironicclient.v1.client.Client> object.
π§ Usage π§
π Get a Client object π
First, create an ironicclient.v1.client.Client <#ironicclient.v1.client.Client> instance by passing your credentials to ironicclient.client.get_client() <#ironicclient.client.get_client>. By default, the Bare Metal Provisioning system is configured so that only administrators (users with 'admin' role) have access.
π Note: Explicit instantiation ofironicclient.v1.client.Client <#ironicclient.v1.client.Client>may cause errors since it doesn't verify provided arguments, usingironicclient.client.get_client() <#ironicclient.client.get_client>is preferred way to get client object.
There are two different sets of credentials that can be used:
- ironic endpoint and auth token
- Identity Service (keystone) credentials
π Using ironic endpoint and auth token π
An auth token and the ironic endpoint can be used to authenticate:
os_auth_token: authentication token (from Identity Service)ironic_url: ironic API endpoint, eghttp://ironic.example.org:6385/v1
To create the client, you can use the API like so:
>>> from ironicclient import client
>>>
>>> kwargs = {'os_auth_token': '3bcc3d3a03f44e3d8377f9247b0ad155',
>>> 'ironic_url': 'http://ironic.example.org:6385/'}
>>> ironic = client.get_client(1, **kwargs)
πͺͺ Using Identity Service (keystone) credentials πͺͺ
These Identity Service credentials can be used to authenticate:
os_username: name of useros_password: user's passwordos_auth_url: Identity Service endpoint for authorizationinsecure: Boolean. If True, does not perform X.509 certificate validation when establishing SSL connection with identity service. default: False (optional)os_tenant_{name|id}: name or ID of tenant
Also the following parameters are required when using the Identity API v3:
os_user_domain_name: name of a domain the user belongs to, usually'default'os_project_domain_name: name of a domain the project belongs to, usually'default'
To create a client, you can use the API like so:
>>> from ironicclient import client
>>>
>>> kwargs = {'os_username': 'name',
>>> 'os_password': 'password',
>>> 'os_auth_url': 'http://keystone.example.org:5000/',
>>> 'os_project_name': 'project'}
>>> ironic = client.get_client(1, **kwargs)
β‘ Perform ironic operations β‘
Once you have an ironicclient.v1.client.Client <#ironicclient.v1.client.Client>, you can perform various tasks:
>>> ironic.driver.list() # list of drivers
>>> ironic.node.list() # list of nodes
>>> ironic.node.get(node_uuid) # information about a particular node
When the Client needs to propagate an exception, it will usually raise an instance subclassed from ironicclient.common.apiclient.exceptions.ClientException <#ironicclient.common.apiclient.exceptions.ClientException>.
Refer to the modules themselves, for more details.
π¦ ironicclient Modules π¦
Module Index <>
π python-ironicclient User Documentation π
π οΈ baremetal Standalone Command-Line Interface (CLI) π οΈ
π Synopsis π
baremetal [options] <command> [command-options]
baremetal help <command>
π Description π
The standalone baremetal tool allows interacting with the Bare Metal service without installing the OpenStack Client tool as in openstack baremetal Command-Line Interface (CLI) <>.
The standalone tool is mostly identical to its OSC counterpart, with two exceptions:
- No need to prefix commands with
openstack. - No authentication is assumed by default.
Check the OSC CLI reference <> for a list of available commands.
π Inspector support π
The standalone baremetal tool optionally supports the low-level bare metal introspection API provided by ironic-inspector (https://docs.openstack.org/ironic-inspector/). If ironic-inspector-client (https://docs.openstack.org/python-ironic-inspector-client/) is installed, its commands (https://docs.openstack.org/python-ironic-inspector-client/latest/cli/index.html) are automatically available (also without the openstack prefix).
π Standalone usage π
To use the CLI with a standalone bare metal service, you need to provide an endpoint to connect to. It can be done in three ways:
- Provide an explicit
--os-endpointargument, e.g.:
$ baremetal --os-endpoint https://ironic.host:6385 node list
- Set the corresponding environment variable, e.g.:
$ export OS_ENDPOINT=https://ironic.host:6385
$ baremetal node list
- Populate a
clouds.yaml(https://docs.openstack.org/openstacksdk/latest/user/guides/connect_from_config.html) file, settingbaremetal_endpoint_override, e.g.:
$ cat ~/.config/openstack/clouds.yaml
clouds:
ironic:
auth_type: none
baremetal_endpoint_override: http://127.0.0.1:6385
$ export OS_CLOUD=ironic
$ baremetal node list
βοΈ Usage with OpenStack βοΈ
The standalone CLI can also be used with the Bare Metal service installed as part of OpenStack. See Authentication <#osc-auth> for information on the required input.
π openstack baremetal Command-Line Interface (CLI) π
π Synopsis π
openstack [options] baremetal <command> [command-options]
openstack help baremetal <command>
π Description π
The OpenStack Client plugin interacts with the Bare Metal service through the openstack baremetal command line interface (CLI).
To use the openstack CLI, the OpenStackClient (python-openstackclient) package must be installed. There are two ways to do this:
- along with this
python-ironicclientpackage:
$ pip install python-ironicclient[cli]
- directly:
$ pip install python-openstackclient
This CLI is provided by python-openstackclient and osc-lib projects:
π Authentication π
To use the CLI, you must provide your OpenStack username, password, project, and auth endpoint. You can use configuration options --os-username, --os-password, --os-project-id (or --os-project-name), and --os-auth-url, or set the corresponding environment variables:
$ export OS_USERNAME=user
$ export OS_PASSWORD=password
$ export OS_PROJECT_NAME=project # or OS_PROJECT_ID
$ export OS_PROJECT_DOMAIN_ID=default
$ export OS_USER_DOMAIN_ID=default
$ export OS_IDENTITY_API_VERSION=3
$ export OS_AUTH_URL=http://auth.example.com:5000/identity
π Getting help π
To get a list of available (sub)commands and options, run:
$ openstack help baremetal
To get usage and options of a command, run:
$ openstack help baremetal <sub-command>
β¨ Examples β¨
Get information about the openstack baremetal node create command:
$ openstack help baremetal node create
Get a list of available drivers:
$ openstack baremetal driver list
Enroll a node with the ipmi driver:
$ openstack baremetal node create --driver ipmi --driver-info ipmi_address=1.2.3.4
Get a list of nodes:
$ openstack baremetal node list
The baremetal API version can be specified via:
- environment variable
OS_BAREMETAL_API_VERSION:
$ export OS_BAREMETAL_API_VERSION=1.25
- or optional command line argument
--os-baremetal-api-version:
$ openstack baremetal port group list --os-baremetal-api-version 1.25
π Command Reference π
π Command Reference π
List of released CLI commands available in openstack client. These commands can be referenced by doing openstack help baremetal.
π§Ύ baremetal allocation π§Ύ
π§Ύ baremetal allocation create π§Ύ
Create a new baremetal allocation.
openstack baremetal allocation create
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--resource-class RESOURCE_CLASS]
[--trait TRAITS]
[--candidate-node CANDIDATE_NODES]
[--name NAME]
[--uuid UUID]
[--owner OWNER]
[--extra <key=value>]
[--wait [<time-out>]]
[--node NODE]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β add a prefix to all variable names--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--resource-class <RESOURCE_CLASS>β Resource class to request.--trait <TRAITS>β A trait to request. Can be specified multiple times.--candidate-node <CANDIDATE_NODES>β A candidate node for this allocation. Can be specified multiple times. If at least one is specified, only the provided candidate nodes are considered for the allocation.--name <NAME>β Unique name of the allocation.--uuid <UUID>β UUID of the allocation.--owner <OWNER>β Owner of the allocation.--extra <key=value>β Record arbitrary key/value metadata. Can be specified multiple times.--wait <time-out>β Wait for the new allocation to become active. An error is returned if allocation fails and--waitis used. Optionally takes a timeout value (in seconds). The default value is 0, meaning it will wait indefinitely.--node <NODE>β Backfill this allocation from the provided node that has already been deployed. Bypasses the normal allocation process.
This command is provided by the python-ironicclient plugin. π
(that's the plugin doing the heavy lifting, bestie β slay)
baremetal allocation delete
Unregister your baremetal allocation(s). Like, yeet them from existence. Gone. π
openstack baremetal allocation delete <allocation> [<allocation> ...]
- allocation β the Allocation(s) you wanna delete (name or UUID). You can pass a whole lil squad of them.
This command is provided by the python-ironicclient plugin. π«Ά
baremetal allocation list
List out all the baremetal allocations. Window shopping, but for allocations π
openstack baremetal allocation list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--limit <limit>]
[--marker <allocation>]
[--sort <key>[:<direction>]]
[--node <node>]
[--resource-class <resource_class>]
[--state <state>]
[--owner <owner>]
[--long | --fields <field> [<field> ...]]
-f <FORMATTER>,--format <FORMATTER>β the output format you want, defaults totable-c COLUMN,--column COLUMNβ pick the column(s) to include; repeat it to show multiple columns--quote <QUOTE_MODE>β controls when quotes get included, defaults tononnumeric--noindentβ disables indenting the JSON (flat JSON energy)--max-width <integer>β maximum display width,<1to disable. You can also set theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence (it wins, periodt)--fit-widthβ fits the table to the display width. Implied if--max-widthis greater than 0. Set the env varCLIFF_FIT_WIDTH=1to always enable it--print-emptyβ prints an empty table if there's honestly no data to show--sort-column SORT_COLUMNβ specify the column(s) to sort the data by (columns listed first get priority, non-existing columns are just ignored, no drama), column names are case-insensitive and accept underscores for spaces, and you can repeat it--sort-ascendingβ sorts the column(s) in ascending order--sort-descendingβ sorts the column(s) in descending order--limit <limit>β maximum number of allocations to return per request,0for no limit. Default is the maximum number used by the Baremetal API Service--marker <allocation>β an Allocation UUID (for example, of the last allocation in the list from a previous request). Returns the list of allocations after this UUID, like "continue from here" β¨--sort <key>[:<direction>]β sort output by the specified allocation fields and directions (ascordesc) (default:asc). Multiple fields and directions can be specified, separated by comma--node <node>β only list allocations of this node (name or UUID)--resource-class <resource_class>β only list allocations with this resource class--state <state>β only list allocations in this state--owner <owner>β only list allocations with this owner--longβ show detailed information about the allocations (the full tea β)--fields <field>β one or more allocation fields. Only these fields will be fetched from the server. Can not be used when--longis specified (pick one, bestie)
This command is provided by the python-ironicclient plugin. π
baremetal allocation set
Set baremetal allocation properties. Glow-up time β¨
openstack baremetal allocation set
[--name <name>]
[--extra <key=value>]
<allocation>
--name <name>β sets the name of the allocation--extra <key=value>β extra property to set on this allocation (repeat the option to set multiple extra properties)- allocation β name or UUID of the allocation
This command is provided by the python-ironicclient plugin. πΈ
baremetal allocation show
Show baremetal allocation details. The full dossier π΅οΈββοΈ
openstack baremetal allocation show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--fields <field> [<field> ...]]
<id>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β adds a prefix to all variable names--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence--fit-widthβ fit the table to the display width. Implied if--max-widthis greater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ print an empty table if there is no data to show--fields <field>β one or more allocation fields. Only these fields will be fetched from the server- id β UUID or name of the allocation
This command is provided by the python-ironicclient plugin. π¦
baremetal allocation unset
Unset baremetal allocation properties. Undo button, but make it CLI π«
openstack baremetal allocation unset
[--name]
[--extra <key>]
<allocation>
--nameβ unset the name of the allocation--extra <key>β extra property to unset on this baremetal allocation (repeat the option to unset multiple extra property).- allocation β name or UUID of the allocation
This command is provided by the python-ironicclient plugin. π
baremetal chassis
baremetal chassis create
Create a brand new chassis. Fresh out of the box π
openstack baremetal chassis create
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--description <description>]
[--extra <key=value>]
[--uuid <uuid>]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β add a prefix to all variable names--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ print empty table if there is no data to show.--description <description>β description for the chassis--extra <key=value>β record arbitrary key/value metadata. Can be specified multiple times.--uuid <uuid>β unique UUID of the chassis
This command is provided by the python-ironicclient plugin. β
baremetal chassis delete
Delete a chassis. Byeee π
openstack baremetal chassis delete <chassis> [<chassis> ...]
- chassis β UUIDs of chassis to delete
This command is provided by the python-ironicclient plugin. π₯
baremetal chassis list
List the chassis. The whole lineup β¨
openstack baremetal chassis list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--fields <field> [<field> ...]]
[--limit <limit>]
[--long]
[--marker <chassis>]
[--sort <key>[:<direction>]]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric--noindentβ whether to disable indenting the JSON--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data by (columns specified first have priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated--sort-ascendingβ sort the column(s) in ascending order--sort-descendingβ sort the column(s) in descending order--fields <field>β one or more chassis fields. Only these fields will be fetched from the server. Cannot be used when--longis specified.--limit <limit>β maximum number of chassis to return per request,0for no limit. Default is the maximum number used by the Baremetal API Service.--longβ show detailed information about the chassis--marker <chassis>β Chassis UUID (for example, of the last chassis in the list from a previous request). Returns the list of chassis after this UUID.--sort <key>[:<direction>]β sort output by specified chassis fields and directions (ascordesc) (default:asc). Multiple fields and directions can be specified, separated by comma.
This command is provided by the python-ironicclient plugin. π§
baremetal chassis set
Set chassis properties. Tweaking era π
openstack baremetal chassis set
[--description <description>]
[--extra <key=value>]
<chassis>
--description <description>β set the description of the chassis--extra <key=value>β extra to set on this chassis (repeat the option to set multiple extras)- chassis β UUID of the chassis
This command is provided by the python-ironicclient plugin. π
baremetal chassis show
Show chassis details.
okay so continuing the chassis saga π next up we have showing off one specific chassis, and honestly it's giving "let me see the receipts."
openstack baremetal chassis show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--fields <field> [<field> ...]]
<chassis>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable. pick your aesthetic β¨-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns. stack 'em up, bestie.--noindentβ whether to disable indenting the JSON. no squish, just flat.--prefix <PREFIX>β add a prefix to all variable names.--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence. parameter's the main character here π--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ Print empty table if there is no data to show. (yes, an empty table is still a serve.)--fields <field>β One or more chassis fields. Only these fields will be fetched from the server.chassisβ UUID of the chassis.
This command is provided by the python-ironicclient plugin.
π¦ baremetal chassis unset π¦
Unset chassis properties. we're clearing the vibes, no cap.
openstack baremetal chassis unset
[--description]
[--extra <key>]
<chassis>
--descriptionβ Clear the chassis description. bye bye, backstory π--extra <key>β Extra to unset on this chassis (repeat option to unset multiple extras). lowkey handy.chassisβ UUID of the chassis.
This command is provided by the python-ironicclient plugin.
π baremetal conductor π
the conductor era. so iconic. let's get into it π«Ά
π baremetal conductor list π
List baremetal conductors. it's literally giving roster.
openstack baremetal conductor list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--limit <limit>]
[--marker <conductor>]
[--sort <key>[:<direction>]]
[--long | --fields <field> [<field> ...]]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric.--noindentβ whether to disable indenting the JSON.--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ Print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated. so thorough, we love her π--sort-ascendingβ sort the column(s) in ascending order.--sort-descendingβ sort the column(s) in descending order.--limit <limit>β Maximum number of conductors to return per request,0for no limit. Default is the maximum number used by the Baremetal API Service.--marker <conductor>β Hostname of the conductor (for example, of the last conductor in the list from a previous request). Returns the list of conductors after this conductor.--sort <key>[:<direction>]β Sort output by specified conductor fields and directions (ascordesc) (default:asc). Multiple fields and directions can be specified, separated by comma.--longβ Show detailed information about the conductors.--fields <field>β One or more conductor fields. Only these fields will be fetched from the server. Can not be used when--longis specified. (so it's--longOR--fields, pick your fighter βοΈ)
This command is provided by the python-ironicclient plugin.
πΈ baremetal conductor show πΈ
Show baremetal conductor details. the deep dive, bestie π«§
openstack baremetal conductor show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--fields <field> [<field> ...]]
<conductor>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--noindentβ whether to disable indenting the JSON.--prefix <PREFIX>β add a prefix to all variable names.--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ Print empty table if there is no data to show.--fields <field>β One or more conductor fields. Only these fields will be fetched from the server.conductorβ Hostname of the conductor.
This command is provided by the python-ironicclient plugin.
β baremetal create β
β baremetal create β
(yes it's listed twice, and yes we're doing it twice, consistency queen π )
Create resources from files. like a glow-up for your baremetal, from a file.
openstack baremetal create <file> [<file> ...]
fileβ File (.yamlor.json) containing descriptions of the resources to create. Can be specified multiple times. stack those files, babe β¨
This command is provided by the python-ironicclient plugin.
π§ baremetal deploy template π§
deploy templates! reusable step recipes, lowkey iconic.
π baremetal deploy template create π
Create a new deploy template. fresh out the oven π
openstack baremetal deploy template create
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--uuid <uuid>]
[--extra <key=value>]
--steps <steps>
<name>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--noindentβ whether to disable indenting the JSON.--prefix <PREFIX>β add a prefix to all variable names.--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ Print empty table if there is no data to show.--uuid <uuid>β UUID of the deploy template.--extra <key=value>β Record arbitrary key/value metadata. Can be specified multiple times. (extra, extra, read all about it π£)--steps <steps>β The deploy steps. May be the path to a YAML file containing the deploy steps; OR'-', with the deploy steps being read from standard input; OR a JSON string. The value should be a list of deploy-step dictionaries; each dictionary should have keys'interface','step','args'and'priority'. three input modes, main character energy fr fr.nameβ Unique name for this deploy template. Must be a valid trait name.
This command is provided by the python-ironicclient plugin.
π baremetal deploy template delete π
Delete deploy template(s). we're unaliving them, respectfully π
openstack baremetal deploy template delete <template> [<template> ...]
templateβ Name(s) or UUID(s) of the deploy template(s) to delete.
This command is provided by the python-ironicclient plugin.
π₯ baremetal deploy template list π₯
List baremetal deploy templates. the whole collection, curated β¨
openstack baremetal deploy template list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--limit <limit>]
[--marker <template>]
[--sort <key>[:<direction>]]
[--long | --fields <field> [<field> ...]]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric.--noindentβ whether to disable indenting the JSON.--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ Print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated.--sort-ascendingβ sort the column(s) in ascending order.--sort-descendingβ sort the column(s) in descending order.--limit <limit>β Maximum number of deploy templates to return per request,0for no limit. Default is the maximum number used by the Baremetal API Service.--marker <template>β DeployTemplate UUID (for example, of the last deploy template in the list from a previous request). Returns the list of deploy templates after this UUID.--sort <key>[:<direction>]β Sort output by specified deploy template fields and directions (ascordesc) (default:asc). Multiple fields and directions can be specified, separated by comma.--longβ Show detailed information about deploy templates.--fields <field>β one or more deploy template fields, bestie π only these fields get fetched from the server. And no, you literally can't use this when--longis also on the command β they do not coexist, periodt.
This command is provided by the python-ironicclient plugin.
π baremetal deploy template set π
Set baremetal deploy template properties. Glow-up szn for your template β¨
openstack baremetal deploy template set
[--name <name>]
[--steps <steps>]
[--extra <key=value>]
<template>
--name <name>β sets the unique name of the deploy template. It has to be a valid trait name (<red>don't try to be cute with it, the server will not be charmed).--steps <steps>β the deploy steps themselves. You can hand it over three ways, pick your fighter: the path to a YAML file that holds the deploy steps; OR-, which means the deploy steps get read from standard input; OR a JSON string, right there in the command. The value should be a list of deploy-step dictionaries, and each dictionary should have the keys'interface','step','args'and'priority'. iykyk π«Ά--extra <key=value>β extra to set on this baremetal deploy template. Repeat the option to set multiple extras β go off π
template β name or UUID of the deploy template.
This command is provided by the python-ironicclient plugin.
πΈ baremetal deploy template show πΈ
Show baremetal deploy template details. The vibe check for your template π
openstack baremetal deploy template show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--fields <field> [<field> ...]]
<template>
-f <FORMATTER>,--format <FORMATTER>β the output format. Defaults totable. π-c COLUMN,--column COLUMNβ specify the column(s) to include. Repeat it to show multiple columns, iconic behaviour fr.--noindentβ whether to disable indenting the JSON.--prefix <PREFIX>β adds a prefix to all variable names.--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence β it's giving main character energy over the env var π--fit-widthβ fit the table to the display width. Implied if--max-widthis greater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable it β--print-emptyβ print an empty table if there's no data to show. Empty but make it fashion.--fields <field>β one or more deploy template fields. Only these fields get fetched from the server.
template β name or UUID of the deploy template.
This command is provided by the python-ironicclient plugin.
π¦ baremetal deploy template unset π¦
Unset baremetal deploy template properties. Undo button, but make it CLI π
openstack baremetal deploy template unset [--extra <key>] <template>
--extra <key>β extra to unset on this baremetal deploy template. Repeat the option to unset multiple extras π
template β name or UUID of the deploy template.
This command is provided by the python-ironicclient plugin.
π baremetal driver π
The driver fam lives here β everything driver-related is right below, bestie π
β¨ baremetal driver list β¨
List the enabled drivers. The roster, if you will π«Ά
openstack baremetal driver list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--type <type>]
[--long | --fields <field> [<field> ...]]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric.--noindentβ whether to disable indenting the JSON.--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ fit the table to the display width. Implied if--max-widthis greater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data. Columns specified first have priority, and non-existing columns are just ignored (we don't see them π). Column names are case-insensitive and accept underscores for spaces. Can be repeated.--sort-ascendingβ sort the column(s) in ascending order β¬οΈ--sort-descendingβ sort the column(s) in descending order β¬οΈ--type <type>β type of driver ("classic"or"dynamic"). The default is to list all of them, no favourites π--longβ show detailed information about the drivers.--fields <field>β one or more node fields. Only these fields get fetched from the server. Can not be used when--longis specified (they're mutually exclusive, sorry bestie).
This command is provided by the python-ironicclient plugin.
π₯ baremetal driver passthru call π₯
Call a vendor passthru method for a driver. Poking the driver directly, we love to see it π
openstack baremetal driver passthru call
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--arg <key=value>]
[--http-method <http-method>]
<driver>
<method>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--noindentβ whether to disable indenting the JSON.--prefix <PREFIX>β add a prefix to all variable names.--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ print empty table if there is no data to show.--arg <key=value>β argument to pass to the passthru method. Repeat the option to specify multiple arguments π--http-method <http-method>β the HTTP method to use in the passthru request. One ofDELETE,GET,PATCH,POST,PUT. Defaults to'POST'.
driver β name of the driver.
method β vendor passthru method to be called.
This command is provided by the python-ironicclient plugin.
π baremetal driver passthru list π
List available vendor passthru methods for a driver. Showing you the whole menu π
openstack baremetal driver passthru list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
<driver>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric.--noindentβ whether to disable indenting the JSON.--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored). Column names are case-insensitive and accept underscores for spaces. Can be repeated.--sort-ascendingβ sort the column(s) in ascending order.--sort-descendingβ sort the column(s) in descending order.
driver β name of the driver.
This command is provided by the python-ironicclient plugin.
π§ baremetal driver property list π§
List the driver properties. All the little settings that make your driver, your driver π
openstack baremetal driver property list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
<driver>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric.--noindentβ whether to disable indenting the JSON.--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored). Column names are case-insensitive and accept underscores for spaces. Can be repeated.--sort-ascendingβ sort the column(s) in ascending order.--sort-descendingβ sort the column(s) in descending order.
driver β name of the driver.
This command is provided by the python-ironicclient plugin.
π baremetal driver raid property list π
List a driver's RAID logical disk properties. Yes, RAID β we're being fancy now π
openstack baremetal driver raid property list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
<driver>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ pick which column(s) you wanna include, and yeah you can repeat it to show multiple columns π--quote <QUOTE_MODE>β controls when quotes get included, defaults tononnumeric--noindentβ whether to disable indenting the JSON--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence β¨--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated--sort-ascendingβ sort the column(s) in ascending order--sort-descendingβ sort the column(s) in descending order
driver β Name of the driver.
This command is provided by the python-ironicclient plugin. π«Ά
baremetal driver show
Show information about a driver. Like, the whole lil profile bestie π
openstack baremetal driver show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--fields <field> [<field> ...]]
<driver>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β add a prefix to all variable names--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--fields <field>β One or more node fields. Only these fields will be fetched from the server.
driver β Name of the driver.
This command is provided by the python-ironicclient plugin. π¦
baremetal node
baremetal node abort
Set provision state of baremetal node to 'abort'. It's giving emergency brake energy π
openstack baremetal node abort <node> [<node> ...]
node β Names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin. π
baremetal node add trait
Add traits to a node. Glow-up time, no cap β¨
openstack baremetal node add trait <node> <trait> [<trait> ...]
node β Name or UUID of the node
trait β Trait(s) to add
This command is provided by the python-ironicclient plugin. π
baremetal node adopt
Set provision state of baremetal node to 'adopt'. Basically claiming it as your own, main character move π
openstack baremetal node adopt
[--wait [<time-out>]]
<node>
[<node> ...]
--wait <time-out>β Wait for a node to reach the desired state,active. Optionally takes a timeout value (in seconds). The default value is0, meaning it will wait indefinitely.
node β Names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin. π
baremetal node bios setting list
List a node's BIOS settings. The receipts, basically π
openstack baremetal node bios setting list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--long | --fields <field> [<field> ...]]
<node>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric--noindentβ whether to disable indenting the JSON--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated--sort-ascendingβ sort the column(s) in ascending order--sort-descendingβ sort the column(s) in descending order--longβ Show detailed information about the BIOS settings. The full lore π--fields <field>β One or more node fields. Only these fields will be fetched from the server. Can not be used when'--long'is specified.
node β Name or UUID of the node
This command is provided by the python-ironicclient plugin. β
baremetal node bios setting show
Show a specific BIOS setting for a node. Zooming in on one (1) detail π
openstack baremetal node bios setting show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
<node>
<setting name>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β add a prefix to all variable names--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.
node β Name or UUID of the node
setting name β Setting name to show
This command is provided by the python-ironicclient plugin. πΈ
baremetal node boot device set
Set the boot device for a node. Choosing where it wakes up, literally π₯Ύ
openstack baremetal node boot device set
[--persistent]
<node>
[<node> ...]
<device>
--persistentβ Make changes persistent for all future boots
node β Names or UUID's of the nodes
device β One of bios, cdrom, disk, pxe, safe, wanboot
This command is provided by the python-ironicclient plugin. π₯
baremetal node boot device show
Show the boot device information for a node. Receipts on where it boots from πΈ
openstack baremetal node boot device show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--supported]
<node>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β add a prefix to all variable names--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--supportedβ Show the supported boot devices
node β Name or UUID of the node
This command is provided by the python-ironicclient plugin. π
baremetal node boot mode set
Set the boot mode for the next baremetal node deployment π
openstack baremetal node boot mode set <node> [<node> ...] <boot_mode>
node β Names or UUID's of the nodes.
boot_mode β The boot mode to set for node (uefi/bios)
This command is provided by the python-ironicclient plugin. π§
baremetal node children list
Get a list of nodes associated as children. Found family fr fr π«Ά
openstack baremetal node children list
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
<node>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β add a prefix to all variable names--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.
node β Name or UUID of the node.
This command is provided by the python-ironicclient plugin. π
baremetal node clean
Set provision state of baremetal node to 'clean'. Self-care era π§Όβ¨
openstack baremetal node clean
[--wait [<time-out>]]
(--clean-steps <clean-steps> | --runbook <runbook>)
[--disable-ramdisk]
<node>
[<node> ...]
--wait <time-out>β Wait for a node to reach the desired state,manageable. Optionally takes a timeout value (in seconds). The default value is0, meaning it will wait indefinitely.--clean-steps <clean-steps>β the actual clean steps, bestie. It can be a path to a YAML file holding them; OR-and they get read in from standard input; OR just a JSON string right there in the command. Whatever you give it should be a list of clean-step dictionaries β each one needs keys'interface'and'step', plus an optional'args'key. π§Ό--runbook <runbook>β the identifier of a predefined runbook to use for cleaning. Like, the easy mode option instead of hand-writing steps, iykyk.--disable-ramdiskβironic-python-agentwill not be booted for cleaning. Heads up: with this set, only steps explicitly marked as not requiringironic-python-agentcan be executed. No ramdisk, no ramdisk steps, periodt. πnodeβ names or UUID's of the nodes.
Lowkey every one of these commands is served to you by the python-ironicclient plugin. π«Ά
π₯οΈ baremetal node console disable
Disable console access for a node. Sorry bestie, no console for you. π
openstack baremetal node console disable <node> [<node> ...]
nodeβ names or UUID's of the nodes
This command is provided by the python-ironicclient plugin.
β¨ baremetal node console enable
Enable console access for a node. We're so back. π
openstack baremetal node console enable <node> [<node> ...]
nodeβ names or UUID's of the nodes
This command is provided by the python-ironicclient plugin.
π baremetal node console show
Show console information for a node. The main character of console commands, honestly.
openstack baremetal node console show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
<node>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β add a prefix to all variable names--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ print empty table if there is no data to show.nodeβ name or UUID of the node
This command is provided by the python-ironicclient plugin.
π¦ baremetal node create
Register a new node with the baremetal service. This is the big one, the icon, the moment. So many flags. Buckle up. π’
openstack baremetal node create
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--chassis-uuid <chassis>]
--driver <driver>
[--driver-info <key=value>]
[--property <key=value>]
[--extra <key=value>]
[--uuid <uuid>]
[--name <name>]
[--instance-name <instance_name>]
[--bios-interface <bios_interface>]
[--boot-interface <boot_interface>]
[--console-interface <console_interface>]
[--deploy-interface <deploy_interface>]
[--inspect-interface <inspect_interface>]
[--management-interface <management_interface>]
[--network-data <network data>]
[--network-interface <network_interface>]
[--power-interface <power_interface>]
[--raid-interface <raid_interface>]
[--rescue-interface <rescue_interface>]
[--storage-interface <storage_interface>]
[--vendor-interface <vendor_interface>]
[--resource-class <resource_class>]
[--conductor-group <conductor_group>]
[--automated-clean | --no-automated-clean]
[--owner <owner>]
[--lessee <lessee>]
[--description <description>]
[--shard <shard>]
[--parent-node <parent_node>]
[--firmware-interface <firmware_interface>]
[--disable-power-off]
output-ish flags first π
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β add a prefix to all variable names--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ print empty table if there is no data to show.
now the actual node stuff πΈ
--chassis-uuid <chassis>β UUID of the chassis that this node belongs to.--driver <driver>β driver used to control the node [REQUIRED]. Like, you literally cannot skip this one, bestie. Non-negotiable.--driver-info <key=value>β key/value pair used by the driver, such as out-of-band management credentials. Can be specified multiple times.--property <key=value>β key/value pair describing the physical characteristics of the node. This is exported to Nova and used by the scheduler. Can be specified multiple times.--extra <key=value>β record arbitrary key/value metadata. Can be specified multiple times.--uuid <uuid>β unique UUID for the node.--name <name>β unique name for the node.--instance-name <instance_name>β name of the instance deployed on this node.--bios-interface <bios_interface>β BIOS interface used by the node's driver. This is only applicable when the specified--driveris a hardware type.--boot-interface <boot_interface>β boot interface used by the node's driver. This is only applicable when the specified--driveris a hardware type.--console-interface <console_interface>β console interface used by the node's driver. This is only applicable when the specified--driveris a hardware type.--deploy-interface <deploy_interface>β deploy interface used by the node's driver. This is only applicable when the specified--driveris a hardware type.--inspect-interface <inspect_interface>β inspect interface used by the node's driver. This is only applicable when the specified--driveris a hardware type.--management-interface <management_interface>β management interface used by the node's driver. This is only applicable when the specified--driveris a hardware type.--network-data <network data>β JSON string, or a YAML file, or-for stdin, to read static network configuration for the baremetal node associated with this ironic node. The format of this file should comply with Nova network data metadata (network_data.json). Depending on ironic boot interface capabilities being used, network configuration may or may not been served to the node for offline network configuration. π (yes, that's the original wording energy β read it twice and you'll get the vibe)--network-interface <network_interface>β network interface used for switching node to cleaning/provisioning networks.--power-interface <power_interface>β power interface used by the node's driver. This is only applicable when the specified--driveris a hardware type.--raid-interface <raid_interface>β RAID interface used by the node's driver. This is only applicable when the specified--driveris a hardware type.--rescue-interface <rescue_interface>β rescue interface used by the node's driver. This is only applicable when the specified--driveris a hardware type.--storage-interface <storage_interface>β storage interface used by the node's driver.--vendor-interface <vendor_interface>β vendor interface used by the node's driver. This is only applicable when the specified--driveris a hardware type.--resource-class <resource_class>β resource class for mapping nodes to Nova flavors--conductor-group <conductor_group>β conductor group the node will belong to--automated-cleanβ enable automated cleaning for the node--no-automated-cleanβ explicitly disable automated cleaning for the node--owner <owner>β owner of the node.--lessee <lessee>β lessee of the node.--description <description>β description for the node.--shard <shard>β shard for the node.--parent-node <parent_node>β parent node for the node being created.--firmware-interface <firmware_interface>β firmware interface used by the node's driver. This is only applicable when the specified--driveris a hardware type.--disable-power-offβ explicitly disable power off actions on the node
This command is provided by the python-ironicclient plugin.
Fr fr though, notice how literally every*interfaceflag has the same "only applicable when the specified--driveris a hardware type" caveat? That's not a typo on my end, that's just how it is. Hardware type driver = interfaces apply. π
π baremetal node delete
Unregister baremetal node(s). It's giving "block and delete", but for servers.
openstack baremetal node delete <node> [<node> ...]
nodeβ node(s) to delete (name or UUID)
This command is provided by the python-ironicclient plugin.
Careful bestie β there's no undo button on this one. Deletion is deletion. π
π₯ baremetal node deploy
Set provision state of baremetal node to 'deploy'. Time to make it real. π
openstack baremetal node deploy
[--wait [<time-out>]]
[--config-drive <config-drive>]
[--deploy-steps <deploy-steps>]
<node>
[<node> ...]
--wait <time-out>β wait for a node to reach the desired state,active. Optionally takes a timeout value (in seconds). The default value is0, meaning it will wait indefinitely. So like, forever. Bestie will be here a while if you don't set a number. β³--config-drive <config-drive>β a gzipped, base64-encoded configuration drive string OR the path to the configuration drive file OR the path to a directory containing the config drive files OR a JSON object to build config drive from OR the path to the JSON file. In case it's a directory, a config drive will be generated from it. In case it's a JSON object with optional keysmeta_data,user_dataandnetwork_dataor a JSON file, a config drive will be generated on the server side (see the bare metal API reference for more details). Okay so that's five different things it can be β pick your fighter. π₯--deploy-steps <deploy-steps>β the deploy steps. May be the path to a YAML file containing the deploy steps; OR-, with the deploy steps being read from standard input; OR a JSON string. The value should be a list of deploy-step dictionaries; each dictionary should have keys'interface'and'step', and optional key'args'.nodeβ names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin.
πΈ baremetal node firmware list
Bestie, this one lists, like, all the Firmware Components of a node. Every single one. No crumbs left. β¨
openstack baremetal node firmware list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
<node>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totableπ-c COLUMN,--column COLUMNβ specify the column(s) to include, and fr fr you can repeat it to show multiple columns π--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric--noindentβ whether to disable indenting the JSON--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence π--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated--sort-ascendingβ sort the column(s) in ascending order--sort-descendingβ sort the column(s) in descending order
node β Name or UUID of the node π¦
This command is provided by the python-ironicclient plugin.
π«Ά baremetal node history get
Get history event for a baremetal node. One (1) event. Singular. We're being specific today. π
openstack baremetal node history get
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
<node>
<event>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns β¨--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β add a prefix to all variable names--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.
node β Name or UUID of the node. πΈ
event β UUID of the event. πΈ
This command is provided by the python-ironicclient plugin.
π§ baremetal node history list
Get history events for a baremetal node β plural this time, we're getting the whole lore. π
openstack baremetal node history list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--long]
<node>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric--noindentβ whether to disable indenting the JSON--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence π--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated--sort-ascendingβ sort the column(s) in ascending order--sort-descendingβ sort the column(s) in descending order--longβ Show detailed information about the node history events. π₯
node β Name or UUID of the node.
This command is provided by the python-ironicclient plugin.
π baremetal node inject nmi
Inject NMI to baremetal node. That's it. That's the whole vibe. No flags, no extra credit, just inject. π«Ά
openstack baremetal node inject nmi <node> [<node> ...]
node β Names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin.
π baremetal node inspect
Set provision state of baremetal node to 'inspect'. Lowkey iconic behaviour tbh.
openstack baremetal node inspect
[--wait [<time-out>]]
<node>
[<node> ...]
--wait <time-out>β Wait for a node to reach the desired state, manageable. Optionally takes a timeout value (in seconds). The default value is0, meaning it will wait indefinitely. β³ (yes bestie, indefinitely β it will simply sit there. forever. patiently.)
node β Names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin.
π baremetal node inventory save
Get hardware inventory of a node (in JSON format) or save it to file. Your call, main character. β¨
openstack baremetal node inventory save [--file <filename>] <node>
--file <filename>β Save inspection data to file with name (default:stdout).
node β Name or UUID of the node
This command is provided by the python-ironicclient plugin.
π baremetal node list
List baremetal nodes. The big one. The whole friend group in one table. π
openstack baremetal node list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--limit <limit>]
[--marker <node>]
[--sort <key>[:<direction>]]
[--maintenance | --no-maintenance]
[--retired | --no-retired]
[--fault <fault>]
[--associated | --unassociated]
[--provision-state <provision state>]
[--driver <driver>]
[--resource-class <resource class>]
[--conductor-group <conductor_group>]
[--conductor <conductor>]
[--chassis <chassis UUID>]
[--owner <owner>]
[--lessee <lessee>]
[--description-contains <description_contains>]
[--instance-name <instance_name>]
[--sharded | --unsharded]
[--shards <shards> [<shards> ...]]
[--long | --fields <field> [<field> ...]]
[--include-children | --parent-node <parent_node>]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric--noindentβ whether to disable indenting the JSON--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated--sort-ascendingβ sort the column(s) in ascending order--sort-descendingβ sort the column(s) in descending order--limit <limit>β Maximum number of nodes to return per request,0for no limit. Default is the maximum number used by the Baremetal API Service.--marker <node>β Node UUID (for example, of the last node in the list from a previous request). Returns the list of nodes after this UUID. π--sort <key>[:<direction>]β Sort output by specified node fields and directions (ascordesc) (default:asc). Multiple fields and directions can be specified, separated by comma.--maintenanceβ Limit list to nodes in maintenance mode π§--no-maintenanceβ Limit list to nodes not in maintenance mode--retiredβ Limit list to retired nodes.--no-retiredβ Limit list to not retired nodes.--fault <fault>β List nodes in specified fault.--associatedβ List only nodes associated with an instance.--unassociatedβ List only nodes not associated with an instance.--provision-state <provision state>β List nodes in specified provision state.--driver <driver>β Limit list to nodes with driver<driver>--resource-class <resource class>β Limit list to nodes with resource class<resource class>--conductor-group <conductor_group>β Limit list to nodes with conductor group<conductor group>--conductor <conductor>β Limit list to nodes with conductor<conductor>--chassis <chassis UUID>β Limit list to nodes of this chassis--owner <owner>β Limit list to nodes with owner<owner>--lessee <lessee>β Limit list to nodes with lessee<lessee>--description-contains <description_contains>β Limit list to nodes with description contains<description_contains>π--instance-name <instance_name>β Filter the list of returned nodes by an instance name.--shardedβ List only nodes that are sharded.--unshardedβ List only nodes that are not sharded.--shards <shards>β List only nodes that are in shards<shards>.--longβ Show detailed information about the nodes. π₯--fields <field>β One or more node fields. Only these fields will be fetched from the server. Can not be used when'--long'is specified. β οΈ (like, genuinely can't β pick a lane bestie)--include-childrenβ Include children in the node list.--parent-node <parent_node>β only list the nodes that are tied to a parent node π«Ά
This command is provided by the python-ironicclient plugin.
baremetal node maintenance set
Okay so this one puts your baremetal node into maintenance mode β like, it's benched, do not touch π§
openstack baremetal node maintenance set
[--reason <reason>]
<node>
[<node> ...]
--reason <reason>β the reason you're slapping it into maintenance mode, bestie. Say why!nodeβ names or UUID's of the nodes. Yes, plural, you can do a whole squad.
This command is provided by the python-ironicclient plugin.
baremetal node maintenance unset
And this is the glow-up: yanking that node back out of maintenance mode β¨
openstack baremetal node maintenance unset <node> [<node> ...]
nodeβ names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin.
baremetal node manage
Flips the provision state of your baremetal node to 'manage' β very demure, very "I'm in control now" π
openstack baremetal node manage
[--wait [<time-out>]]
<node>
[<node> ...]
--wait <time-out>β literally waits for a node to reach the desired state,manageable. You can optionally hand it a timeout value (in seconds). Default is0, which means it waits indefinitely β no cap, it's committed πnodeβ names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin.
baremetal node passthru call
Calls a vendor passthru method for a node. Very "let me speak to the vendor directly" energy π
openstack baremetal node passthru call
[--arg <key=value>]
[--http-method <http-method>]
<node>
<method>
--arg <key=value>β an argument to pass to the passthru method. Repeat the option to specify multiple arguments, bestie, stack 'em π--http-method <http-method>β the HTTP method to use in the passthru request. One ofDELETE,GET,PATCH,POST,PUT. Defaults toPOST.nodeβ name or UUID of the node.methodβ vendor passthru method to be executed.
This command is provided by the python-ironicclient plugin.
baremetal node passthru list
Lists all the vendor passthru methods a node has. Window shopping, basically ποΈ
openstack baremetal node passthru list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
<node>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include. Can be repeated to show multiple columns.--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric.--noindentβ whether to disable indenting the JSON.--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence. Heads up, the flag wins π--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored). Column names are case-insensitive and accept underscores for spaces. Can be repeated.--sort-ascendingβ sort the column(s) in ascending order.--sort-descendingβ sort the column(s) in descending order.nodeβ name or UUID of the node.
This command is provided by the python-ironicclient plugin.
baremetal node power off
Powers a node off. Bye bestie ππ
openstack baremetal node power off
[--power-timeout <power-timeout>]
[--soft]
<node>
[<node> ...]
--power-timeout <power-timeout>β timeout (in seconds, positive integer) to wait for the target power state before erroring out.--softβ request graceful power-off. Polite! πnodeβ names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin.
baremetal node power on
Powers a node on. Wake up, main character energy β‘
openstack baremetal node power on
[--power-timeout <power-timeout>]
<node>
[<node> ...]
--power-timeout <power-timeout>β timeout (in seconds, positive integer) to wait for the target power state before erroring out.nodeβ names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin.
baremetal node provide
Sets the provision state of your baremetal node to 'provide' β handing it back out into the world π
openstack baremetal node provide
[--wait [<time-out>]]
<node>
[<node> ...]
--wait <time-out>β wait for a node to reach the desired state,available. Optionally takes a timeout value (in seconds). The default value is0, meaning it will wait indefinitely. Down bad, no limits πnodeβ names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin.
baremetal node reboot
Reboots a baremetal node. The classic "have you tried turning it off and on again" π
openstack baremetal node reboot
[--soft]
[--power-timeout <power-timeout>]
<node>
[<node> ...]
--softβ request Graceful reboot.--power-timeout <power-timeout>β timeout (in seconds, positive integer) to wait for the target power state before erroring out.nodeβ names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin.
baremetal node rebuild
Sets the provision state of a baremetal node to 'rebuild'. Fresh start, new me π¦
openstack baremetal node rebuild
[--wait [<time-out>]]
[--config-drive <config-drive>]
[--deploy-steps <deploy-steps>]
<node>
[<node> ...]
--wait <time-out>β wait for a node to reach the desired state,active. Optionally takes a timeout value (in seconds). The default value is0, meaning it will wait indefinitely.--config-drive <config-drive>β okay so this is a lot, stay with me π«Ά it's a gzipped, base64-encoded configuration drive string OR the path to the configuration drive file OR the path to a directory containing the config drive files OR a JSON object to build config drive from OR the path to the JSON file. In case it's a directory, a config drive will be generated from it. In case it's a JSON object with optional keysmeta_data,user_dataandnetwork_dataor a JSON file, a config drive will be generated on the server side (see the bare metal API reference for more details).--deploy-steps <deploy-steps>β the deploy steps in JSON format. May be the path to a file containing the deploy steps; OR'-', with the deploy steps being read from standard input; OR a string. The value should be a list of deploy-step dictionaries; each dictionary should have keys'interface','step','priority'and optional key'args'.nodeβ names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin.
baremetal node remove trait
Removes trait(s) from a node. Marie Kondo-ing that node's vibes π§Ήβ¨
openstack baremetal node remove trait [--all] <node> [<trait> ...]
--allβ remove all traits. All of them. No survivors πnodeβ name or UUID of the node.traitβ trait(s) to remove.
This command is provided by the python-ironicclient plugin.
baremetal node rescue
Sets the provision state of a baremetal node to 'rescue' β it's giving lifeguard on duty π
openstack baremetal node rescue
[--wait [<time-out>]]
--rescue-password <rescue-password>
<node>
[<node> ...]
--wait <time-out>β wait for a node to reach the desired state,rescue. Optionally takes a timeout value (in seconds). The default value is0, meaning it will wait indefinitely.--rescue-password <rescue-password>β the password that will be used to login to the rescue ramdisk. The value should be a non-empty string. Don't leave it blank, bestie πnodeβ names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin.
baremetal node secure boot off
Turns secure boot off π
openstack baremetal node secure boot off <node> [<node> ...]
nodeβ name or UUID of the node.
This command is provided by the python-ironicclient plugin.
baremetal node secure boot on
Turns secure boot on π
openstack baremetal node secure boot on <node> [<node> ...]
nodeβ name or UUID of the node.
This command is provided by the python-ironicclient plugin.
baremetal node service
Sets the provision state of a baremetal node to 'service' β the node is literally at your service π
openstack baremetal node service
[--wait [<time-out>]]
(--service-steps <service-steps> | --runbook <runbook>)
[--disable-ramdisk]
<node>
[<node> ...]
--wait <time-out>β wait for a node to reach the desired state,active. Optionally takes a timeout value (in seconds). The default value is0, meaning it will wait indefinitely.--service-steps <service-steps>β the service steps. May be the path to a YAML file containing the service steps; OR'-', with the service steps being read from standard input; OR a JSON string. The value should be a list of service-step dictionaries; each dictionary should have keys'interface'and'step', and optional key'args'.--runbook <runbook>β the identifier of a predefined runbook to use for servicing.--disable-ramdiskβironic-python-agentwill not be booted for cleaning. Only steps explicitly marked as not requiringironic-python-agentcan be executed with this set. Read that twice, fr fr πnodeβ names or UUID's of the nodes.
This command is provided by the python-ironicclient plugin.
baremetal node set
Set baremetal properties
openstack baremetal node set
[--instance-uuid <uuid>]
[--instance-name <instance_name>]
[--name <name>]
[--chassis-uuid <chassis UUID>]
[--driver <driver>]
[--bios-interface <bios_interface> | --reset-bios-interface]
[--boot-interface <boot_interface> | --reset-boot-interface]
[--console-interface <console_interface> | --reset-console-interface]
[--deploy-interface <deploy_interface> | --reset-deploy-interface]
[--firmware-interface <firmware_interface> | --reset-firmware-interface]
[--inspect-interface <inspect_interface> | --reset-inspect-interface]
[--management-interface <management_interface> | --reset-management-interface]
[--network-interface <network_interface> | --reset-network-interface]
[--network-data <network data>]
[--power-interface <power_interface> | --reset-power-interface]
[--raid-interface <raid_interface> | --reset-raid-interface]
[--rescue-interface <rescue_interface> | --reset-rescue-interface]
[--storage-interface <storage_interface> | --reset-storage-interface]
[--vendor-interface <vendor_interface> | --reset-vendor-interface]
[--reset-interfaces]
[--resource-class <resource_class>]
[--conductor-group <conductor_group>]
[--automated-clean | --no-automated-clean]
[--protected]
[--protected-reason <protected_reason>]
[--retired]
[--retired-reason <retired_reason>]
[--target-raid-config <target_raid_config>]
[--property <key=value>]
[--extra <key=value>]
[--driver-info <key=value>]
[--instance-info <key=value>]
[--owner <owner>]
[--lessee <lessee>]
[--description <description>]
[--shard <shard>]
[--parent-node <parent_node>]
[--enable-power-off | --disable-power-off]
<node>
[<node> ...]
--instance-uuid <uuid>β sets the node's instance UUID to <uuid>, bestie. Slap a UUID on it.--instance-name <instance_name>β sets the name of the instance that's deployed on this node.--name <name>β renames the node to <name>. Glow-up, but for hostnames β¨--chassis-uuid <chassis UUID>β puts the node in a different chassis. Real "moving in with a new roommate" energy.--driver <driver>β sets the driver for the node.--bios-interface <bios_interface>β sets the BIOS interface. Very demure, very firmware.--reset-bios-interfaceβ nukes the BIOS interface back to its hardware type default. Iconic reset behavior π--boot-interface <boot_interface>β sets the boot interface.--reset-boot-interfaceβ puts the boot interface back to its hardware type default.--console-interface <console_interface>β sets the console interface.--reset-console-interfaceβ console interface β hardware type default. Poof.--deploy-interface <deploy_interface>β sets the deploy interface.--reset-deploy-interfaceβ deploy interface back to its hardware type default, no cap.--firmware-interface <firmware_interface>β sets the firmware interface.--reset-firmware-interfaceβ resets the firmware interface for its hardware type default. (Yes, the original says "for", we're not fixing it, we're respecting it π«Ά)--inspect-interface <inspect_interface>β sets the inspect interface.--reset-inspect-interfaceβ inspect interface back to hardware type default.--management-interface <management_interface>β sets the management interface.--reset-management-interfaceβ management interface back to hardware type default.--network-interface <network_interface>β sets the network interface.--reset-network-interfaceβ network interface back to hardware type default.--network-data <network data>β okay so this one's a whole thing π you give it a JSON string, OR a YAML file, OR-to read from stdin, and it reads static network configuration for the baremetal node associated with this ironic node. The format of this file should comply with Nova network data metadata (network_data.json). And here's the tea: depending on which ironic boot interface capabilities are being used, the network configuration may or may not have been served to the node for offline network configuration. It's giving "it depends" and we respect that.--power-interface <power_interface>β sets the power interface.--reset-power-interfaceβ power interface back to hardware type default β‘--raid-interface <raid_interface>β sets the RAID interface.--reset-raid-interfaceβ RAID interface back to hardware type default.--rescue-interface <rescue_interface>β sets the rescue interface.--reset-rescue-interfaceβ rescue interface back to hardware type default. Rescuing the rescuers.--storage-interface <storage_interface>β sets the storage interface.--reset-storage-interfaceβ storage interface back to hardware type default.--vendor-interface <vendor_interface>β sets the vendor interface.--reset-vendor-interfaceβ vendor interface back to hardware type default.--reset-interfacesβ resets all interfaces that you didn't explicitly specify back to their default implementations. Heads up bestie: this one is only valid with--driver. No driver, no dice.--resource-class <resource_class>β sets the resource class. Main character label energy π--conductor-group <conductor_group>β sets the conductor group for the node.--automated-cleanβ enables automated cleaning for the node π§Ό--no-automated-cleanβ explicitly disables automated cleaning for the node. Like, you really mean it.--protectedβ marks the node as protected. Hands off, she's guarded π--protected-reason <protected_reason>β sets the reason for marking the node as protected. Gotta cite your sources.--retiredβ marks the node as retired. She's living her retired life now.--retired-reason <retired_reason>β sets the reason for marking the node as retired.--target-raid-config <target_raid_config>β sets the target RAID configuration (JSON) for the node. And it can be one of: 1. a file containing YAML data of the RAID configuration; 2.-to read the contents from standard input; or 3. a valid JSON string. Three flavors, pick your fighter.--property <key=value>β a property to set on this baremetal node (repeat the option to set multiple properties).--extra <key=value>β an extra to set on this baremetal node (repeat the option to set multiple extras).--driver-info <key=value>β driver information to set on this baremetal node (repeat the option to set multiple driver infos).--instance-info <key=value>β instance information to set on this baremetal node (repeat the option to set multiple instance infos).--owner <owner>β sets the owner for the node.--lessee <lessee>β sets the lessee for the node.--description <description>β sets the description for the node. Give her a little bio βοΈ--shard <shard>β sets the shard for the node.--parent-node <parent_node>β sets the parent node for the node. Family tree but make it infrastructure π³--enable-power-offβ explicitly enables power off actions on nodes.--disable-power-offβ explicitly disables power off actions on nodes.- node β names or UUID's of the nodes. Yep, plural allowed, you can pass a whole squad.
This command is provided by the python-ironicclient plugin.
π baremetal node show π
Shows baremetal node details. The reveal. The moment. β
openstack baremetal node show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--instance]
[--fields <field> [<field> ...]]
<node>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--noindentβ whether to disable indenting the JSON.--prefix <PREFIX>β add a prefix to all variable names.--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence. (Parameter wins, always π )--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ print an empty table if there is no data to show. At least the table ate, even if it's empty.--instanceβ treats <node> as an instance UUID. Plot twist.--fields <field>β one or more node fields. Only these fields will be fetched from the server. Selective, and honestly valid.- node β name or UUID of the node (or instance UUID if
--instanceis specified).
This command is provided by the python-ironicclient plugin.
πΈ baremetal node trait add πΈ
Adds traits to a node. Little personality tags π·οΈβ¨
openstack baremetal node trait add <node> <trait> [<trait> ...]
- node β name or UUID of the node.
- trait β trait(s) to add. Bring a whole list, she can hold them.
This command is provided by the python-ironicclient plugin.
π¦ baremetal node trait list π¦
Lists a node's traits. A full personality read π
openstack baremetal node trait list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
<node>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric.--noindentβ whether to disable indenting the JSON.--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ print an empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated. So forgiving, we love her.--sort-ascendingβ sort the column(s) in ascending order.--sort-descendingβ sort the column(s) in descending order.- node β name or UUID of the node.
This command is provided by the python-ironicclient plugin.
π baremetal node trait remove
Bye-bye traits! Pull one (or a whole bunch) off a node.
openstack baremetal node trait remove [--all] <node> [<trait> ...]
--allβ remove all the traits, like, every single one πnodeβ name or UUID of the nodetraitβ the trait(s) you wanna remove
This command is provided by the python-ironicclient plugin.
π«Ά baremetal node undeploy
Sets the provision state of a baremetal node to 'deleted'. Iconic teardown moment.
openstack baremetal node undeploy
[--wait [<time-out>]]
<node>
[<node> ...]
--wait <time-out>β wait for a node to reach the desired state,available. Optionally takes a timeout value (in seconds). The default value is0, meaning it will wait indefinitely π (yes, forever-forever)nodeβ names or UUID's of the nodes
This command is provided by the python-ironicclient plugin.
β¨ baremetal node unhold
Sets the provision state of a baremetal node to 'unhold'.
openstack baremetal node unhold <node> [<node> ...]
nodeβ names or UUID's of the nodes
This command is provided by the python-ironicclient plugin.
π¦ baremetal node unrescue
Sets the provision state of a baremetal node to 'unrescue' β time to come back from the rescue era.
openstack baremetal node unrescue
[--wait [<time-out>]]
<node>
[<node> ...]
--wait <time-out>β wait for a node to reach the desired state,active. Optionally takes a timeout value (in seconds). The default value is0, meaning it will wait indefinitely π«nodeβ names or UUID's of the nodes
This command is provided by the python-ironicclient plugin.
π§Ή baremetal node unset
Unset baremetal properties. Basically the "never mind π" of commands β you're taking stuff back off the node.
openstack baremetal node unset
[--instance-uuid]
[--instance-name]
[--name]
[--resource-class]
[--target-raid-config]
[--property <key>]
[--extra <key>]
[--driver-info <key>]
[--instance-info <key>]
[--chassis-uuid]
[--bios-interface]
[--boot-interface]
[--console-interface]
[--deploy-interface]
[--firmware-interface]
[--inspect-interface]
[--network-data]
[--management-interface]
[--network-interface]
[--power-interface]
[--raid-interface]
[--rescue-interface]
[--storage-interface]
[--vendor-interface]
[--conductor-group]
[--automated-clean]
[--protected]
[--protected-reason]
[--retired]
[--retired-reason]
[--owner]
[--lessee]
[--description]
[--shard]
[--parent-node]
<node>
[<node> ...]
--instance-uuidβ unset instance UUID on this baremetal node--instance-nameβ unset instance name on this baremetal node--nameβ unset the name of the node--resource-classβ unset the resource class of the node--target-raid-configβ unset the target RAID configuration of the node--property <key>β property to unset on this baremetal node (repeat the option to unset multiple properties)--extra <key>β extra to unset on this baremetal node (repeat the option to unset multiple extras)--driver-info <key>β driver information to unset on this baremetal node (repeat the option to unset multiple items in driver information)--instance-info <key>β instance information to unset on this baremetal node (repeat the option to unset multiple instance information)--chassis-uuidβ unset chassis UUID on this baremetal node--bios-interfaceβ unset BIOS interface on this baremetal node--boot-interfaceβ unset boot interface on this baremetal node--console-interfaceβ unset console interface on this baremetal node--deploy-interfaceβ unset deploy interface on this baremetal node--firmware-interfaceβ unset firmware interface on this baremetal node--inspect-interfaceβ unset inspect interface on this baremetal node--network-dataβ unset network data on this baremetal port. (yep, the page says port here, not node β copying it exactly, don't @ me π)--management-interfaceβ unset management interface on this baremetal node--network-interfaceβ unset network interface on this baremetal node--power-interfaceβ unset power interface on this baremetal node--raid-interfaceβ unset RAID interface on this baremetal node--rescue-interfaceβ unset rescue interface on this baremetal node--storage-interfaceβ unset storage interface on this baremetal node--vendor-interfaceβ unset vendor interface on this baremetal node--conductor-groupβ unset conductor group for this baremetal node (the default group will be used)--automated-cleanβ unset automated clean option on this baremetal node (the value from configuration will be used)--protectedβ unset the protected flag on the node--protected-reasonβ unset the protected reason (gets unset automatically whenprotectedis unset)--retiredβ unset the retired flag on the node--retired-reasonβ unset the retired reason (gets unset automatically whenretiredis unset)--ownerβ unset the owner field of the node--lesseeβ unset the lessee field of the node--descriptionβ unset the description field of the node--shardβ unset the shard field of the node--parent-nodeβ unset the parent node field of the nodenodeβ names or UUID's of the nodes
This command is provided by the python-ironicclient plugin.
π baremetal node validate
Vibe-checks a node's driver interfaces. Does this node actually work? Let's find out bestie.
openstack baremetal node validate
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
<node>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric--noindentβ whether to disable indenting the JSON--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated--sort-ascendingβ sort the column(s) in ascending order--sort-descendingβ sort the column(s) in descending ordernodeβ name or UUID of the node
This command is provided by the python-ironicclient plugin.
πΈ baremetal node vif attach
Attach a VIF to a given node. Networking era π
openstack baremetal node vif attach
[--port-uuid <port-uuid>]
[--portgroup-uuid <portgroup-uuid>]
[--vif-info <key=value>]
<node>
<vif-id>
--port-uuid <port-uuid>β UUID of the baremetal port to attach the VIF to.--portgroup-uuid <portgroup-uuid>β UUID of the baremetal portgroup to attach the VIF to.--vif-info <key=value>β record arbitrary key/value metadata. Can be specified multiple times. The mandatory'id'parameter cannot be specified as a key. (rude but true)nodeβ name or UUID of the nodevif-idβ name or UUID of the VIF to attach to a node.
This command is provided by the python-ironicclient plugin.
π baremetal node vif detach
Detach VIF from a given node. Un-attach, un-attach πΆ
openstack baremetal node vif detach <node> <vif-id>
nodeβ name or UUID of the nodevif-idβ name or UUID of the VIF to detach from a node.
This command is provided by the python-ironicclient plugin.
π baremetal node vif list
Show attached VIFs for a node β the whole guest list, bestie.
openstack baremetal node vif list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
<node>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric--noindentβ whether to disable indenting the JSON--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated--sort-ascendingβ sort the column(s) in ascending order--sort-descendingβ sort the column(s) in descending ordernodeβ name or UUID of the node
This command is provided by the python-ironicclient plugin.
π baremetal port
π baremetal port create
Create a new port πβ¨
ok bestie, next up is the full breakdown of baremetal port create and its flags β coming in the next part, don't go anywhere π
openstack baremetal port create
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
--node <uuid>
[--uuid <uuid>]
[--extra <key=value>]
[--local-link-connection <key=value>]
[--pxe-enabled <boolean>]
[--port-group <uuid>]
[--physical-network <physical network>]
[--is-smartnic]
[--name <port name>]
[--description <port description>]
[--vendor <port vendor>]
[--category <port category>]
<address>
like, that's the whole shape of it bestie β <address> is mandatory, --node is mandatory, everything else is a vibe you can add or skip β¨
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totableπ-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β add a prefix to all variable names--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--node <uuid>β UUID of the node that this port belongs to.--uuid <uuid>β UUID of the port.--extra <key=value>β Record arbitrary key/value metadata. Argument can be specified multiple times.--local-link-connection <key=value>β Key/value metadata describing Local link connection information. Valid keys are'switch_info','switch_id','port_id'and'hostname'. The keys'switch_id'and'port_id'are required. In case of a Smart NIC port, the required keys are'port_id'and'hostname'. Argument can be specified multiple times.--pxe-enabled <boolean>β Indicates whether this Port should be used when PXE booting this Node.--port-group <uuid>β UUID of the port group that this port belongs to.--physical-network <physical network>β Name of the physical network to which this port is connected.--is-smartnicβ Indicates whether this Port is a Smart NIC port--name <port name>β Name of the port.--description <port description>β An optional description for the port.--vendor <port vendor>β An optional vendor for the port.--category <port category>β An optional category for the port.addressβ MAC address for this port.
This command is provided by the python-ironicclient plugin.
ποΈ baremetal port delete
Delete port(s). plural. multiple. go off, clean up that cluster π§Ήβ¨
openstack baremetal port delete <port> [<port> ...]
portβ UUID(s) of the port(s) to delete.
This command is provided by the python-ironicclient plugin.
π baremetal port group create
Create a new baremetal port group. it's giving found family but for ports π
openstack baremetal port group create
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
--node <uuid>
[--address <mac-address>]
[--name NAME]
[--uuid UUID]
[--extra <key=value>]
[--mode MODE]
[--property <key=value>]
[--support-standalone-ports | --unsupport-standalone-ports]
[--physical-network <physical network>]
[--category <port category>]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totableπ-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β add a prefix to all variable names--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--node <uuid>β UUID of the node that this port group belongs to.--address <mac-address>β MAC address for this port group.--name <NAME>β Name of the port group.--uuid <UUID>β UUID of the port group.--extra <key=value>β Record arbitrary key/value metadata. Can be specified multiple times.--mode <MODE>β Mode of the port group. For possible values, refer tohttps://www.kernel.org/doc/Documentation/networking/bonding.txt.--property <key=value>β Key/value property related to this port group's configuration. Can be specified multiple times.--support-standalone-portsβ Ports that are members of this port group can be used as stand-alone ports. (default)--unsupport-standalone-portsβ Ports that are members of this port group cannot be used as stand-alone ports.--physical-network <physical network>β Name of the physical network to which the ports in this port group are connected.--category <port category>β An optional category for the port group.
This command is provided by the python-ironicclient plugin.
π baremetal port group delete
Unregister baremetal port group(s). bye bestie, you will NOT be missed (jk, the ports will lowkey miss you) π«Ά
openstack baremetal port group delete <port group> [<port group> ...]
port groupβ Port group(s) to delete (name or UUID).
This command is provided by the python-ironicclient plugin.
π baremetal port group list
List baremetal port groups. window shopping for your fave groupies ποΈ
openstack baremetal port group list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--limit <limit>]
[--marker <port group>]
[--sort <key>[:<direction>]]
[--address <mac-address>]
[--node <node>]
[--shards <shard> [<shard> ...]]
[--long | --fields <field> [<field> ...]]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totableπ-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric--noindentβ whether to disable indenting the JSON--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ Print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated--sort-ascendingβ sort the column(s) in ascending order--sort-descendingβ sort the column(s) in descending order--limit <limit>β Maximum number of port groups to return per request,0for no limit. Default is the maximum number used by the Baremetal API Service.--marker <port group>β Port group UUID (for example, of the last port group in the list from a previous request). Returns the list of port groups after this UUID.--sort <key>[:<direction>]β Sort output by specified port group fields and directions (ascordesc) (default:asc). Multiple fields and directions can be specified, separated by comma.--address <mac-address>β Only show information for the port group with this MAC address.--node <node>β Only list port groups of this node (name or UUID).--shards <shard>β Only list port groups of nodes in these shards.--longβ Show detailed information about the port groups.--fields <field>β One or more port group fields. Only these fields will be fetched from the server. Can not be used when'--long'is specified.
This command is provided by the python-ironicclient plugin.
π¦ baremetal port group set
Set baremetal port group properties. glow-up time for your group β¨π
openstack baremetal port group set
[--node <uuid>]
[--address <mac-address>]
[--name <name>]
[--extra <key=value>]
[--mode MODE]
[--property <key=value>]
[--support-standalone-ports | --unsupport-standalone-ports]
[--physical-network <physical network>]
[--category <category>]
<port
group>
--node <uuid>β Update UUID of the node that this port group belongs to.--address <mac-address>β MAC address for this port group.--name <name>β Name of the port group.--extra <key=value>β Extra to set on this baremetal port group (repeat option to set multiple extras).--mode <MODE>β Mode of the port group. For possible values, refer tohttps://www.kernel.org/doc/Documentation/networking/bonding.txt.--property <key=value>β Key/value property related to this port group's configuration (repeat option to set multiple properties).--support-standalone-portsβ Ports that are members of this port group can be used as stand-alone ports.--unsupport-standalone-portsβ Ports that are members of this port group cannot be used as stand-alone ports.--physical-network <physical network>β Set a physical network for the ports in this port group--category <category>β Set a category for this port groupport groupβ Name or UUID of the port group.
This command is provided by the python-ironicclient plugin.
π baremetal port group show
Show baremetal port group details.
π openstack baremetal port group show
okay bestie, this is the port-group spotlight command β¨ it pulls up one port group and lets you pick exactly how the output looks.
openstack baremetal port group show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--address]
[--fields <field> [<field> ...]]
<id>
-f <FORMATTER>,--format <FORMATTER>β this is the output format, and it defaults totableπ-c COLUMN,--column COLUMNβ pick the column(s) you want included; repeat it to show multiple columns β¨--noindentβ turns off indenting the JSON, no cap π«Ά--prefix <PREFIX>β adds a prefix to all variable names π--max-width <integer>β maximum display width, with<1to disable it. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence β--fit-widthβ fits the table to the display width. This is implied if--max-widthis greater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable it πΈ--print-emptyβ prints an empty table if thereβs no data to show π--addressβ says that<id>is the MAC address (instead of UUID or name) of the port group π--fields <field>β one or more port group fields. Only these fields will be fetched from the server π₯idβ UUID or name of the port group (or MAC address if--addressis specified) π
This command is provided by the python-ironicclient plugin.
π¦ baremetal port group unset
this one is the βtake it backβ button for baremetal port group properties π
openstack baremetal port group unset
[--name]
[--address]
[--extra <key>]
[--property <key>]
[--physical-network]
[--category]
<port group>
--nameβ unsets the name of the port group π--addressβ unsets the address of the port group β¨--extra <key>β extra to unset on this baremetal port group; repeat the option to unset multiple extras π--property <key>β property to unset on this baremetal port group; repeat the option to unset multiple properties π₯--physical-networkβ unsets the physical network on this baremetal port group π--categoryβ unsets the category for this port group π¦port groupβ name or UUID of the port group π
This command is provided by the python-ironicclient plugin.
π
baremetal port list
listing baremetal ports, bestie β with so many little knobs for sorting, filtering, and formatting π
openstack baremetal port list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--address <mac-address>]
[--node <node>]
[--port-group <port group>]
[--limit <limit>]
[--marker <port>]
[--sort <key>[:<direction>]]
[--long | --fields <field> [<field> ...]]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totableβ¨-c COLUMN,--column COLUMNβ specify the column(s) to include; repeat it to show multiple columns π--quote <QUOTE_MODE>β when to include quotes, defaults tononnumericπ--noindentβ whether to disable indenting the JSON π«Ά--max-width <integer>β maximum display width, with<1to disable it. You can also useCLIFF_MAX_TERM_WIDTH, but the parameter takes precedence β--fit-widthβ fits the table to the display width. Implied if--max-widthis greater than 0. SetCLIFF_FIT_WIDTH=1to always enable πΈ--print-emptyβ prints an empty table if thereβs no data to show π--sort-column SORT_COLUMNβ specify the column(s) to sort the data; columns specified first have priority, non-existing columns are ignored, column names are case-insensitive and accept underscores for spaces, and it can be repeated π₯--sort-ascendingβ sorts the column(s) in ascending order π--sort-descendingβ sorts the column(s) in descending order π¦--address <mac-address>β only show information for the port with this MAC address π--node <node>β only list ports of this node (name or UUID) π--port-group <port group>β only list ports of this port group (name or UUID) π--limit <limit>β maximum number of ports to return per request,0for no limit. Default is the maximum number used by the Baremetal API Service π--marker <port>β port UUID (for example, of the last port in the list from a previous request). Returns the list of ports after this UUID β¨--sort <key>[:<direction>]β sort output by specified port fields and directions (ascordesc) (default:asc). Multiple fields and directions can be specified, separated by comma π₯--longβ show detailed information about ports π--fields <field>β one or more port fields. Only these fields will be fetched from the server. Can not be used when--longis specified π
This command is provided by the python-ironicclient plugin.
πΈ baremetal port set
setting baremetal port properties β yes, this is the glow-up command π
openstack baremetal port set
[--node <uuid>]
[--address <address>]
[--extra <key=value>]
[--port-group <uuid>]
[--local-link-connection <key=value>]
[--pxe-enabled | --pxe-disabled]
[--physical-network <physical network>]
[--is-smartnic]
[--name <name>]
[--description <description>]
[--vendor <vendor>]
[--category <category>]
<port>
--node <uuid>β set UUID of the node that this port belongs to π--address <address>β set MAC address for this port β¨--extra <key=value>β extra to set on this baremetal port; repeat the option to set multiple extras π--port-group <uuid>β set UUID of the port group that this port belongs to π¦--local-link-connection <key=value>β key/value metadata describing local link connection information. Valid keys are'switch_info','switch_id','port_id'and'hostname'. The keys'switch_id'and'port_id'are required. In case of a Smart NIC port, the required keys are'port_id'and'hostname'. Argument can be specified multiple times π₯--pxe-enabledβ indicates that this port should be used when PXE booting this node (default) π--pxe-disabledβ indicates that this port should not be used when PXE booting this node π--physical-network <physical network>β set the name of the physical network to which this port is connected π--is-smartnicβ set port to be a Smart NIC port β--name <name>β set name for this port π--description <description>β set a description for this port π--vendor <vendor>β set a vendor for this port π--category <category>β set a category for this port π¦portβ UUID of the port β¨
This command is provided by the python-ironicclient plugin.
π«Ά baremetal port show
port details, front and center β this is the main-character view π
openstack baremetal port show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--address]
[--fields <field> [<field> ...]]
<id>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totableβ¨-c COLUMN,--column COLUMNβ specify the column(s) to include; repeat it to show multiple columns π--noindentβ whether to disable indenting the JSON π--prefix <PREFIX>β adds a prefix to all variable names π«Ά--max-width <integer>β maximum display width, with<1to disable it. You can also useCLIFF_MAX_TERM_WIDTH, but the parameter takes precedence β--fit-widthβ fits the table to the display width. Implied if--max-widthis greater than 0. SetCLIFF_FIT_WIDTH=1to always enable πΈ--print-emptyβ prints an empty table if thereβs no data to show π--addressβ says that<id>is the MAC address (instead of the UUID) of the port π₯--fields <field>β one or more port fields. Only these fields will be fetched from the server πidβ UUID of the port (or MAC address if--addressis specified) π
This command is provided by the python-ironicclient plugin.
π§ baremetal port unset
the un-glow-up command for baremetal port properties β take those fields back, bestie π
openstack baremetal port unset
[--extra <key>]
[--local-link-connection <key>]
[--port-group]
[--physical-network]
[--is-smartnic]
[--name]
[--description]
[--vendor]
[--category]
<port>
--extra <key>β extra to unset on this baremetal port; repeat the option to unset multiple extras π--local-link-connection <key>β remove local link connection on this port; repeat the option to unset multiple keys β¨--port-groupβ remove port from the port group π--physical-networkβ unset the physical network on this baremetal port π--is-smartnicβ set Port as not Smart NIC port π--nameβ unset the name for this port π¦--descriptionβ unset the description for this port π--vendorβ unset the vendor for this port π--categoryβ unset the category for this port πportβ UUID of the port β
This command is provided by the python-ironicclient plugin.
π baremetal volume
okay, volume connector territory β buckle up, bestie πΎβ¨
π baremetal volume connector create
creating a new baremetal volume connector, and itβs giving required-options energy π₯
openstack baremetal volume connector create
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
--node <uuid>
--type <type>
--connector-id <connector id>
[--uuid <uuid>]
[--extra <key=value>]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totableβ¨-c COLUMN,--column COLUMNβ specify the column(s) to include; repeat it to show multiple columns π--noindentβ whether to disable indenting the JSON π--prefix <PREFIX>β bestie this one just sticks a little prefix on all the variable names so nothing gets confusing later π super simple, super useful.--max-width <integer>β caps the max display width. Anything<1disables it entirely. You can also set theCLIFF_MAX_TERM_WIDTHenvironment variable if env vars are more your vibe, but heads up β the parameter takes precedence. π--fit-widthβ makes the table actually fit your display width. It's implied if--max-widthis greater than 0, so like, it kinda turns itself on. Wanna always have it? Set the environment variableCLIFF_FIT_WIDTH=1and it's on fr fr. β¨--print-emptyβ prints an empty table when there's genuinely no data to show. No data, still got a table, we love a consistent aesthetic π--node <uuid>β the UUID of the node that this volume connector belongs to.--type <type>β the type of the volume connector. Valid values are'iqn','ip','mac','wwnn','wwpn','port','portgroup'β pick your fighter π--connector-id <connector id>β the ID of the volume connector within the specified type. Like, for example, the iSCSI initiator IQN for the node if the type is'iqn'. iykyk π§--uuid <uuid>β the UUID of the volume connector itself.--extra <key=value>β records arbitrary key/value metadata, and yes you can specify it multiple times. Stack 'em up π
This command is provided by the python-ironicclient plugin. Credit where credit is due, periodt. π
ποΈ baremetal volume connector delete
Unregister baremetal volume connector(s) β basically the "it's not me, it's you" of volume connectors π
openstack baremetal volume connector delete
<volume connector>
[<volume connector> ...]
volume connectorβ the UUID(s) of the volume connector(s) you're deleting. As many as you want, they can all go together π¦
This command is provided by the python-ironicclient plugin.
π baremetal volume connector list
List baremetal volume connectors β the full roster, the lineup, the group chat member list π
openstack baremetal volume connector list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--node <node>]
[--limit <limit>]
[--marker <volume connector>]
[--sort <key>[:<direction>]]
[--long | --fields <field> [<field> ...]]
-f <FORMATTER>,--format <FORMATTER>β the output format. Defaults totableπ-c COLUMN,--column COLUMNβ specify the column(s) to include. Repeat it to show multiple columns, very mix-and-match of you β¨--quote <QUOTE_MODE>β when to include quotes. Defaults tononnumeric.--noindentβ whether to disable indenting the JSON. Un-indent it, let it be free π¦--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ Print empty table if there is no data to show.--sort-column SORT_COLUMNβ specify the column(s) to sort the data β columns specified first have a priority, and non-existing columns are ignored (rude but ok). Column names are case-insensitive and accept underscores for spaces. Can be repeated π₯--sort-ascendingβ sort the column(s) in ascending order β¬οΈ--sort-descendingβ sort the column(s) in descending order β¬οΈ--node <node>β only list volume connectors of this node (name or UUID).--limit <limit>β maximum number of volume connectors to return per request,0for no limit. The default is the maximum number used by the Baremetal API Service. No cap fr fr π§’--marker <volume connector>β volume connector UUID (for example, of the last volume connector in the list from a previous request). Returns the list of volume connectors after this UUID β like a "continue where we left off" bookmark π--sort <key>[:<direction>]β sort output by specified volume connector fields and directions (ascordesc) (default:asc). Multiple fields and directions can be specified, separated by comma. Multitask slay π--longβ show detailed information about volume connectors. The full lore π--fields <field>β one or more volume connector fields. Only these fields will be fetched from the server. Can not be used when'--long'is specified β pick a lane bestie π«Ά
This command is provided by the python-ironicclient plugin.
π οΈ baremetal volume connector set
Set baremetal volume connector properties β glow-up time β¨
openstack baremetal volume connector set
[--node <uuid>]
[--type <type>]
[--connector-id <connector id>]
[--extra <key=value>]
<volume connector>
--node <uuid>β UUID of the node that this volume connector belongs to.--type <type>β Type of the volume connector. Can be'iqn','ip','mac','wwnn','wwpn','port','portgroup'.--connector-id <connector id>β ID of the volume connector in the specified type.--extra <key=value>β Record arbitrary key/value metadata. Can be specified multiple times.volume connectorβ UUID of the volume connector.
This command is provided by the python-ironicclient plugin.
π baremetal volume connector show
Show baremetal volume connector details β the deep dive, the full story π
openstack baremetal volume connector show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--fields <field> [<field> ...]]
<id>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--noindentβ whether to disable indenting the JSON.--prefix <PREFIX>β add a prefix to all variable names.--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ Print empty table if there is no data to show.--fields <field>β One or more volume connector fields. Only these fields will be fetched from the server.idβ UUID of the volume connector.
This command is provided by the python-ironicclient plugin.
π§Ή baremetal volume connector unset
Unset baremetal volume connector properties β the declutter era π§Ό
openstack baremetal volume connector unset
[--extra <key>]
<volume connector>
--extra <key>β Extra to unset (repeat option to unset multiple extras). Bye bye extras, love you, mean it πvolume connectorβ UUID of the volume connector.
This command is provided by the python-ironicclient plugin.
π± baremetal volume target create
Create a new baremetal volume target β new target just dropped π
openstack baremetal volume target create
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
--node <uuid>
--type <volume type>
[--property <key=value>]
--boot-index <boot index>
--volume-id <volume id>
[--uuid <uuid>]
[--extra <key=value>]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--noindentβ whether to disable indenting the JSON.--prefix <PREFIX>β add a prefix to all variable names.--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ Print empty table if there is no data to show.--node <uuid>β UUID of the node that this volume target belongs to.--type <volume type>β Type of the volume target, e.g.'iscsi','fibre_channel'.--property <key=value>β Key/value property related to the type of this volume target. Can be specified multiple times.--boot-index <boot index>β Boot index of the volume target.--volume-id <volume id>β ID of the volume associated with this target.--uuid <uuid>β UUID of the volume target.--extra <key=value>β Record arbitrary key/value metadata. Can be specified multiple times.
This command is provided by the python-ironicclient plugin.
ποΈ baremetal volume target delete
Unregister baremetal volume target(s) β clearing the roster π
openstack baremetal volume target delete
<volume target>
[<volume target> ...]
volume targetβ UUID(s) of the volume target(s) to delete.
This command is provided by the python-ironicclient plugin.
π baremetal volume target list
List baremetal volume targets β the whole squad, on display πΈ
openstack baremetal volume target list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--node <node>]
[--limit <limit>]
[--marker <volume target>]
[--sort <key>[:<direction>]]
[--long | --fields <field> [<field> ...]]
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable.-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns.--quote <QUOTE_MODE>β when to include quotes, defaults tononnumeric.--noindentβ whether to disable indenting the JSON.--max-width <integer>β Maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ Fit the table to the display width. Implied if--max-widthgreater than 0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable.--print-emptyβ Print empty table if there is no data to show.--sort-column SORT_COLUMNβ tells it which column(s) to sort the data by π«Ά the columns you name first get priority, and non-existent columns are just... ignored, no drama. Column names are case-insensitive and accept underscores instead of spaces, and yeah you can repeat this one.--sort-ascendingβ sort those column(s) in ascending order β¨--sort-descendingβ sort those column(s) in descending order, no cap π--node <node>β only list volume targets of this node (give it a name or a UUID, either eats).--limit <limit>β max number of volume targets to return per request,0means no limit. Default is the maximum number used by the Baremetal API Service.--marker <volume target>β a volume target UUID (like, say, the last volume target in the list from a previous request). Returns the list of volume targets after this UUID π--sort <key>[:<direction>]β sort output by specified volume target fields and directions (ascordesc) (default:asc). You can stack multiple fields and directions, separated by comma.--longβ show detailed information about volume targets π--fields <field>β one or more volume target fields. Only these fields will be fetched from the server. Can not be used when--longis specified π«
This command is provided by the python-ironicclient plugin.
πΈ baremetal volume target set πΈ
Set baremetal volume target properties.
openstack baremetal volume target set
[--node <uuid>]
[--type <volume type>]
[--property <key=value>]
[--boot-index <boot index>]
[--volume-id <volume id>]
[--extra <key=value>]
<volume
target>
--node <uuid>β UUID of the node that this volume target belongs to.--type <volume type>β type of the volume target, e.g.'iscsi','fibre_channel'.--property <key=value>β key/value property related to the type of this volume target. Can be specified multiple times.--boot-index <boot index>β boot index of the volume target.--volume-id <volume id>β ID of the volume associated with this target.--extra <key=value>β record arbitrary key/value metadata. Can be specified multiple times.volume targetβ UUID of the volume target.
This command is provided by the python-ironicclient plugin.
π baremetal volume target show π
Show baremetal volume target details.
openstack baremetal volume target show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--fields <field> [<field> ...]]
<id>
-f <FORMATTER>,--format <FORMATTER>β the output format, defaults totable-c COLUMN,--column COLUMNβ specify the column(s) to include, can be repeated to show multiple columns--noindentβ whether to disable indenting the JSON--prefix <PREFIX>β add a prefix to all variable names--max-width <integer>β maximum display width,<1to disable. You can also use theCLIFF_MAX_TERM_WIDTHenvironment variable, but the parameter takes precedence.--fit-widthβ fit the table to the display width. Implied if--max-widthgreater than0. Set the environment variableCLIFF_FIT_WIDTH=1to always enable--print-emptyβ print empty table if there is no data to show.--fields <field>β one or more volume target fields. Only these fields will be fetched from the server.idβ UUID of the volume target.
This command is provided by the python-ironicclient plugin.
π¦ baremetal volume target unset π¦
Unset baremetal volume target properties.
openstack baremetal volume target unset
[--extra <key>]
[--property <key>]
<volume
target>
--extra <key>β extra to unset (repeat option to unset multiple extras)--property <key>β property to unset on this baremetal volume target (repeat option to unset multiple properties).volume targetβ UUID of the volume target.
This command is provided by the python-ironicclient plugin.
π Creating the Bare Metal service resources from file π
Okay so β it is possible to create a set of resources using their descriptions in JSON or YAML format. It can be done in one of two ways:
- Using OpenStackClient bare metal plugin CLI's command
openstack baremetal create:
$ openstack -h baremetal create
usage: openstack baremetal create [-h] <file> [<file> ...]
Create resources from files
positional arguments:
<file> File (.yaml or .json) containing descriptions of the
resources to create. Can be specified multiple times.
- Programmatically using the Python API:
ironicclient.v1.create_resources.create_resources(client: Client <#
ironicclient.v1.client.Client>, filenames: list[str]) -> None
Create resources using their JSON or YAML descriptions.
Parameters
β’ client -- an instance of ironic client;
β’ filenames -- a list of filenames containing JSON or
YAML resources definitions.
Raises ClientException if any operation during files
processing/resource creation fails.
β File containing Resource Descriptions β
The resources to be created can be described either in JSON or YAML. A file ending with .json is assumed to contain valid JSON, and a file ending with .yaml is assumed to contain valid YAML. Specifying a file with any other extension leads to an error π
The resources that can be created are chassis, nodes, port groups and ports. A chassis can contain nodes (and resources of nodes) definitions nested under "nodes" key. A node can contain port groups definitions nested under "portgroups", and ports definitions under "ports" keys. Ports can be also nested under port groups in "ports" key.
The schema used to validate the supplied data is the following:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Schema for ironic resources file",
"type": "object",
"properties": {
"chassis": {
"type": "array",
"items": {
"type": "object"
}
},
"nodes": {
"type": "array",
"items": {
"type": "object"
}
}
},
"additionalProperties": false
}
More detailed description of the creation process can be seen in the following sections.
π Examples π
Here is an example of the JSON file that can be passed to the create command:
{
"chassis": [
{
"description": "chassis 3 in row 23",
"nodes": [
{
"name": "node-3",
"driver": "ipmi",
"portgroups": [
{
"name": "switch.cz7882.ports.1-2",
"ports": [
{
"address": "ff:00:00:00:00:00"
},
{
"address": "ff:00:00:00:00:01"
}
]
}
],
"ports": [
{
"address": "00:00:00:00:00:02"
},
{
"address": "00:00:00:00:00:03"
}
],
"driver_info": {
"ipmi_address": "192.168.1.23",
"ipmi_username": "BmcUsername",
"ipmi_password": "BmcPassword",
}
},
{
"name": "node-4",
"driver": "ipmi",
"ports": [
{
"address": "00:00:00:00:00:04"
},
{
"address": "00:00:00:00:00:01"
}
]
}
]
}
],
"nodes": [
{
"name": "node-5",
"driver": "ipmi",
"chassis_uuid": "74d93e6e-7384-4994-a614-fd7b399b0785",
"ports": [
{
"address": "00:00:00:00:00:00"
}
]
},
{
"name": "node-6",
"driver": "ipmi"
}
]
}
π₯ Creation Process π₯
- The client deserializes the files' contents and validates that the top-level dictionary in each of them contains only
"chassis"and/or"nodes"keys, and their values are lists. The creation process is aborted if any failure is encountered in this stage. The rest of the validation is done by theironic-apiservice. - Each resource is created via issuing a POST request (with the resource's dictionary representation in the body) to the
ironic-apiservice. In the case of nested resources ("nodes"key inside chassis,"portgroups"key inside nodes,"ports"key inside nodes or portgroups), the top-level resource is created first, followed by the sub-resources. For example, if a chassis contains a list of nodes, the chassis will be created first followed by the creation of each node. The same is true for ports and port groups described within nodes. - If a resource could not be created, it does not stop the entire process. Any sub-resources of the failed resource will not be created, but otherwise, the rest of the resources will be created if possible. Any failed resources will be mentioned in the response. π
π python-ironicclient Contributor Documentation π
π«Ά Contributing to python-ironicclient π«Ά
okay so if you're lowkey thinking "hmm I wanna contribute to the python-ironicclient project" β first of all, slay, love that for you π β the following will help get you started. no cap.
π¦ #openstack-ironic on OFTC IRC Network π¦
there is a very active chat channel at <irc://irc.oftc.net/#openstack-ironic> and honestly it's the main character of getting help. this is usually the best place to ask questions and find your way around. IRC stands for Internet Relay Chat (iykyk) and it is a way to chat online in real time. you can ask a question and come back later to read the answer in the log files. logs for the #openstack-ironic IRC channel are stored at <http://eavesdrop.openstack.org/irclogs/%23openstack-ironic/> β¨
π Developer Certificate of Origin π
in order to contribute to the python-ironicclient project, you need to adhere to the Developer Certificate of Origin <https://developercertificate.org/>. OpenStack utilizes the Developer Certificate of Origin (DCO) as a lightweight means to confirm that you are entitled to contribute the code you submit. this ensures that you are providing your contributions under the project's license and that you have the right to do so. periodt.
See also:
πΈ Project Hosting Details πΈ
- Bug tracker β <https://bugs.launchpad.net/python-ironicclient>
- Mailing list (prefix subjects with
[ironic]for faster responses) β <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss> - Code Hosting β <https://opendev.org/openstack/python-ironicclient>
- Code Review β <https://review.opendev.org/#/q/status:open+project:openstack/python-ironicclient,n,z>
π Testing π
β Python Guideline Enforcement β
all code has to pass the pep8 style guideline to merge into OpenStack, fr fr β no vibes-based merges here, bestie. to validate the code against these guidelines you can run:
$ tox -e pep8
π§ Unit Testing π§
it is strongly encouraged to run the unit tests locally under one or more test environments prior to submitting a patch. like, genuinely, do it β it's giving responsible. to run all the recommended environments sequentially and pep8 style guideline run:
$ tox
you can also selectively pick specific test environments by listing your chosen environments after a -e flag π
$ tox -e py3,pep8
Note: Tox sets up virtual environment and installs all necessary dependencies. Sharing the environment with devstack testing is not recommended due to conflicting configuration with system dependencies. π don't do it.
π Functional Testing π
functional tests have been removed as of November 2024. gone, but not forgotten π
π Full Ironic Client Python API Reference π
ironicclient
ironicclient package
Subpackages
ironicclient.common package
Subpackages
ironicclient.common.apiclient package
Submodules
ironicclient.common.apiclient.base module
Base utilities to build API operation managers and objects on top of. β¨
class ironicclient.common.apiclient.base.ManagerProtocol(*args, **kwargs)β Bases:Protocol
Minimal protocol for Resource's manager dependency.
client: Any
class ironicclient.common.apiclient.base.Resource(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)β Bases:object
Base class for OpenStack resources (tenant, user, etc.).
This is pretty much just a bag for attributes. π lowkey iconic honestly.
HUMAN_ID: bool = FalseNAME_ATTR: str = 'name'get() -> Noneβ Support for lazy loading details.
Some clients, such as novaclient have the option to lazy load the details, details which can be loaded with this function.
property human_id: str | Noneβ Human-readable ID which can be used for bash completion.is_loaded() -> boolset_loaded(val: bool) -> Noneto_dict() -> dict[str, Any]
π ironicclient.common.apiclient.exceptions module π
Exception definitions. buckle up bestie, there's a lot of them and every single one is here π
exception ironicclient.common.apiclient.exceptions.AmbiguousEndpoints(endpoints: object | None = None)β Bases:EndpointException
Found more than one matching endpoint in Service Catalog.
exception ironicclient.common.apiclient.exceptions.AuthPluginOptionsMissing(opt_names: list[str])β Bases:AuthorizationFailure
Auth plugin misses some options.
exception ironicclient.common.apiclient.exceptions.AuthSystemNotFound(auth_system: str)β Bases:AuthorizationFailure
User has specified an AuthSystem that is not installed.
exception ironicclient.common.apiclient.exceptions.AuthorizationFailureβ Bases:ClientException
Cannot authorize API client.
exception ironicclient.common.apiclient.exceptions.BadGateway(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)β Bases:HttpServerError
HTTP 502 - Bad Gateway.
The server was acting as a gateway or proxy and received an invalid response from the upstream server.
http_status: int = 502
message: str = 'Bad Gateway'
exception ironicclient.common.apiclient.exceptions.BadRequest(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)β Bases:HTTPClientError
HTTP 400 - Bad Request.
The request cannot be fulfilled due to bad syntax.
http_status: int = 400
message: str = 'Bad Request'
exception ironicclient.common.apiclient.exceptions.ClientExceptionβ Bases:Exception
The base exception class for all exceptions this library raises. π the mother of them all.
exception ironicclient.common.apiclient.exceptions.CommandErrorβ Bases:ClientException
Error in CLI tool.
exception ironicclient.common.apiclient.exceptions.Conflict(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)β Bases:HTTPClientError
HTTP 409 - Conflict.
Indicates that the request could not be processed because of conflict in the request, such as an edit conflict.
http_status: int = 409
message: str = 'Conflict'
exception ironicclient.common.apiclient.exceptions.ConnectionErrorβ Bases:ClientException
Cannot connect to API service.
exception ironicclient.common.apiclient.exceptions.ConnectionRefusedβ Bases:ConnectionError
Connection refused while trying to connect to API service.
exception ironicclient.common.apiclient.exceptions.EndpointExceptionβ Bases:ClientException
Something is rotten in Service Catalog. πΈ dramatic but true.
exception ironicclient.common.apiclient.exceptions.EndpointNotFoundβ Bases:EndpointException
Could not find requested endpoint in Service Catalog.
exception ironicclient.common.apiclient.exceptions.ExpectationFailed(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)β Bases:HTTPClientError
HTTP 417 - Expectation Failed.
The server cannot meet the requirements of the Expect request-header field.
http_status: int = 417
message: str = 'Expectation Failed'
exception ironicclient.common.apiclient.exceptions.Forbidden(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)β Bases:HTTPClientError
HTTP 403 - Forbidden.
The request was a valid request, but the server is refusing to respond to it.
http_status: int = 403
message: str = 'Forbidden'
exception ironicclient.common.apiclient.exceptions.GatewayTimeout(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)β Bases:HttpServerError
HTTP 504 - Gateway Timeout.
The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
http_status: int = 504
message: str = 'Gateway Timeout'
exception ironicclient.common.apiclient.exceptions.Gone(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)β Bases:HTTPClientError
HTTP 410 - Gone.
Indicates that the resource requested is no longer available and will not be available again.
http_status: int = 410
message: str = 'Gone'
exception ironicclient.common.apiclient.exceptions.HTTPClientError(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)β Bases:HttpError
Client-side HTTP error.
Exception for cases in which the client seems to have erred.
message: str = 'HTTP Client Error'
exception ironicclient.common.apiclient.exceptions.HTTPRedirection(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)β Bases:HttpError
HTTP Redirection.
message: str = 'HTTP Redirection'
exception ironicclient.common.apiclient.exceptions.HttpError(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)β Bases:ClientException
The base exception class for all HTTP exceptions.
http_status: int = 0
message: str = 'HTTP Error'
exception ironicclient.common.apiclient.exceptions.HttpNotImplemented(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)β Bases:HttpServerError
Like, the server literally either doesn't recognize the request method or it just doesn't have the range to fulfill it β no thoughts, head empty π«
http_status: int = 501
message: str = 'Not Implemented'
exception ironicclient.common.apiclient.exceptions.HttpServerError(...)
exception
ironicclient.common.apiclient.exceptions.HttpServerError(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HttpError
Server-side HTTP error, bestie β the β¨parentβ¨ of all the 5xx meltdowns. It's for cases where the server is fully aware it has erred or is incapable of performing the request. Self-aware king behavior, honestly π
message: str = 'HTTP Server Error'
exception ironicclient.common.apiclient.exceptions.HttpVersionNotSupported(...)
exception
ironicclient.common.apiclient.exceptions.HttpVersionNotSupported(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HttpServerError
HTTP 505 - HttpVersion Not Supported. The server doesn't support the HTTP protocol version used in the request β like bringing a vibe the server has simply never heard of π
http_status: int = 505
message: str = 'HTTP Version Not Supported'
exception ironicclient.common.apiclient.exceptions.InternalServerError(...)
exception
ironicclient.common.apiclient.exceptions.InternalServerError(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HttpServerError
HTTP 500 - Internal Server Error. The generic one, given when no more specific message is suitable β aka the "it's giving nothing, and it's giving it loudly" error π
http_status: int = 500
message: str = 'Internal Server Error'
exception ironicclient.common.apiclient.exceptions.LengthRequired(...)
exception
ironicclient.common.apiclient.exceptions.LengthRequired(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 411 - Length Required. The request didn't specify the length of its content, which the requested resource requires. Like showing up without your ID, girl πͺͺ
http_status: int = 411
message: str = 'Length Required'
exception ironicclient.common.apiclient.exceptions.MethodNotAllowed(...)
exception
ironicclient.common.apiclient.exceptions.MethodNotAllowed(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 405 - Method Not Allowed. A request was made of a resource using a request method that resource does not support. Wrong door, wrong key, wrong era π
http_status: int = 405
message: str = 'Method Not Allowed'
exception ironicclient.common.apiclient.exceptions.MultipleChoices(...)
exception
ironicclient.common.apiclient.exceptions.MultipleChoices(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPRedirection
HTTP 300 - Multiple Choices. Indicates multiple options for the resource that the client may follow β so many paths, so little commitment π¦
http_status: int = 300
message: str = 'Multiple Choices'
exception ironicclient.common.apiclient.exceptions.NoUniqueMatch
Bases: ClientException
Multiple entities found instead of one. Not a match, a situation β the search said "one (1)" and the database said "bestie, we have options" π
exception ironicclient.common.apiclient.exceptions.NotAcceptable(...)
exception
ironicclient.common.apiclient.exceptions.NotAcceptable(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 406 - Not Acceptable. The requested resource is only capable of generating content that isn't acceptable according to the Accept headers sent in the request. It can serve you, it just refuses to serve you like that π
http_status: int = 406
message: str = 'Not Acceptable'
exception ironicclient.common.apiclient.exceptions.NotFound(...)
exception
ironicclient.common.apiclient.exceptions.NotFound(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 404 - Not Found. The classic β¨iconicβ¨ one: the requested resource could not be found, but it may be available again in the future. So like, don't block them, they might come back π
http_status: int = 404
message: str = 'Not Found'
exception ironicclient.common.apiclient.exceptions.PaymentRequired(...)
exception
ironicclient.common.apiclient.exceptions.PaymentRequired(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 402 - Payment Required. Reserved for future use. That's literally it, that's the whole personality β a ghost, a placeholder, a mysterious queen who never shows up π»
http_status: int = 402
message: str = 'Payment Required'
exception ironicclient.common.apiclient.exceptions.PreconditionFailed(...)
exception
ironicclient.common.apiclient.exceptions.PreconditionFailed(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 412 - Precondition Failed. The server does not meet one of the preconditions that the requester put on the request. You set boundaries, the server did not respect them π©
http_status: int = 412
message: str = 'Precondition Failed'
exception ironicclient.common.apiclient.exceptions.ProxyAuthenticationRequired(...)
exception
ironicclient.common.apiclient.exceptions.ProxyAuthenticationRequired(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 407 - Proxy Authentication Required. The client has to authenticate itself with the proxy first. The middleman wants your ID before you get through the door ngl πͺ
http_status: int = 407
message: str = 'Proxy Authentication Required'
exception ironicclient.common.apiclient.exceptions.RequestEntityTooLarge(*args: Any, **kwargs: Any)
Bases: HTTPClientError
HTTP 413 - Request Entity Too Large. The request is larger than the server is willing or able to process. Your girl packed the entire luggage set for a weekend trip π§³
http_status: int = 413
message: str = 'Request Entity Too Large'
exception ironicclient.common.apiclient.exceptions.RequestTimeout(...)
exception
ironicclient.common.apiclient.exceptions.RequestTimeout(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 408 - Request Timeout. The server timed out waiting for the request. Left on read, technically π
http_status: int = 408
message: str = 'Request Timeout'
exception ironicclient.common.apiclient.exceptions.RequestUriTooLong(...)
exception
ironicclient.common.apiclient.exceptions.RequestUriTooLong(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 414 - Request-URI Too Long. The URI provided was too long for the server to process β a URL with main character energy that nobody asked to be that long π
http_status: int = 414
message: str = 'Request-URI Too Long'
exception ironicclient.common.apiclient.exceptions.RequestedRangeNotSatisfiable(...)
exception
ironicclient.common.apiclient.exceptions.RequestedRangeNotSatisfiable(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 416 - Requested Range Not Satisfiable. The client asked for a portion of the file, but the server cannot supply that portion. Bestie the slice you want does not exist π°
http_status: int = 416
message: str = 'Requested Range Not Satisfiable'
exception ironicclient.common.apiclient.exceptions.ServiceUnavailable(...)
exception
ironicclient.common.apiclient.exceptions.ServiceUnavailable(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HttpServerError
HTTP 503 - Service Unavailable. The server is currently unavailable. Not ghosting you on purpose (probably), it's just β¨going through somethingβ¨
http_status: int = 503
message: str = 'Service Unavailable'
exception ironicclient.common.apiclient.exceptions.Unauthorized(...)
exception
ironicclient.common.apiclient.exceptions.Unauthorized(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 401 - Unauthorized. Similar to 403 Forbidden, but specifically for when authentication is required and has failed or has not yet been provided. Like, do you even go here? πͺͺ
http_status: int = 401
message: str = 'Unauthorized'
exception ironicclient.common.apiclient.exceptions.UnprocessableEntity(...)
exception
ironicclient.common.apiclient.exceptions.UnprocessableEntity(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 422 - Unprocessable Entity. The request was well-formed but was unable to be followed due to semantic errors. Grammatically perfect, spiritually incorrect π
http_status: int = 422
message: str = 'Unprocessable Entity'
exception ironicclient.common.apiclient.exceptions.UnsupportedMediaType(...)
exception
ironicclient.common.apiclient.exceptions.UnsupportedMediaType(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None)
Bases: HTTPClientError
HTTP 415 - Unsupported Media Type. The request entity has a media type which the server or resource does not support. Wrong format, no vibes passed the check ποΈ
http_status: int = 415
message: str = 'Unsupported Media Type'
exception ironicclient.common.apiclient.exceptions.UnsupportedVersion
Bases: ClientException
User is trying to use an unsupported version of the API. Time traveler behavior, and the timeline said no π°οΈ
exception ironicclient.common.apiclient.exceptions.ValidationError
Bases: ClientException
Error in validation on the API client side β caught it in-house before it ever left the group chat, love that for us β
ironicclient.common.apiclient.exceptions.from_response(response: Response, method: str, url: str) -> HttpError
ironicclient.common.apiclient.exceptions.from_response(response: Response, method: str, url: str) -> HttpError <#ironicclient.common.apiclient.exceptions.HttpError>
Returns an instance of HttpError or a subclass, based on the response. The little matcher that looks at your response and goes "oh girl, I know exactly which one of these you are" π
Parameters
responseβ therequests.Responseinstance, slay πmethodβ the HTTP method used for the requesturlβ the URL used for the request
β¨ Module contents β¨
Submodules β okay bestie, this is where it gets spicy, buckle up π
ironicclient.common.base module π§±
Base utilities to build API operation managers and objects on top of. Literally the foundation, the main character of the whole operation π
class ironicclient.common.base.CreateManager(api: SessionClient)
Bases: Manager[ResourceT] β provides creation operations with a particular API. Iconic behavior only β¨
create(os_ironic_api_version: str | None = None, global_request_id: str | None = None, **kwargs: Any) -> ResourceT | None
Create a resource based on a kwargs dictionary of attributes. So you hand it a bag of attributes and it makes a thing π«Ά
Parameters (the receipts):
kwargsβ a dictionary containing the attributes of the resource that will be created.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing the global request ID header value (in form"req-<UUID>") to use for the request.
Raises exc.InvalidAttribute β for invalid attributes that are not needed to create the resource. So like, don't pass junk, bestie π
class ironicclient.common.base.Manager(api: SessionClient)
Bases: Generic[ResourceT] β provides CRUD operations with a particular API. The full alphabet of doing stuff, no cap π₯
resource_classβ abstract property, typetype[ResourceT]. It's the resource class. That's literally the whole vibe.
class ironicclient.common.base.Resource(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource β represents a particular instance of an object (tenant, user, etc). This is pretty much just a bag for attributes, lowkey π
to_dict() -> dict[str, Any]β turns it into a dict, obviously.
getid(obj: str | Resource) -> str
A lil wrapper to get an object's ID. Abstracts the common pattern of allowing both an object or an object's ID (UUID) as a parameter when dealing with relationships. Flexible queen behavior π
ironicclient.common.filecache module ποΈ
retrieve_data(host: str, port: str | int, expiry: int | None = None) -> str | None
Retrieve the version stored for an ironic 'host', if it's not stale. It checks to see if there is valid cached data for the host/port combination and returns that if it isn't stale β literally a vibe check on your cache π¦
- param
host: The host that we need to retrieve data for - param
port: The port on the host that we need to retrieve data for - param
expiry: The age in seconds before cached data is deemed invalid
save_data(host: str, port: str | int, data: str) -> None
Save 'data' for a particular 'host' in the appropriate cache dir. Put it in the vault bestie π
- param
host: The host that we need to save data for - param
port: The port on the host that we need to save data for - param
data: The data we want saved
ironicclient.common.http module π
class ironicclient.common.http.SessionClient(os_ironic_api_version: str | list[str], api_version_select_state: str, max_retries: int | None, retry_interval: int | None, **kwargs: Any)
Bases: VersionNegotiationMixin, LegacyJsonAdapter β HTTP client based on Keystone client session. The whole connection moment π«
json_request(method: str, url: str, **kwargs: Any) -> tuple[Response, dict[str, Any] | list[Any] | bytes | None]raw_request(method: str, url: str, **kwargs: dict[str, str]) -> Response
class ironicclient.common.http.VersionNegotiationMixin
Bases: object
api_version_select_state: strnegotiate_version(conn: Session, resp: Response | None) -> strβ Negotiate the server version. Assumption: called after receiving a 406 error when doing a request. Parameters:connβ A connection objectrespβ The response object from http request
os_ironic_api_version: str | list[str]
get_server(url: str | None) -> tuple[str | None, str | None]
Extract and return the server & port. Finders keepers π§
with_retries(func: Callable[[...], _RT]) -> Callable[[...], _RT]
Wrapper for _http_request adding support for retries. Because sometimes you gotta try again, fr fr π
ironicclient.common.i18n module π
That's it. That's the module. Empty page, no notes π
ironicclient.common.utils module π οΈ
class ironicclient.common.utils.HashColumn(value: _T)
Bases: FormattableColumn[Any]
human_readable() -> str | Noneβ Return a basic human readable version of the data. Making it make sense for the girlies π
class ironicclient.common.utils.ListCommandArgs(*args, **kwargs)
Bases: Protocol β Protocol for parsed args passed to list commands (marker, limit, etc). The whole "here's what you typed" situation β¨
detail: boolfields: list[list[str]] | Nonelimit: int | Nonemarker: str | Nonesort_dir: str | Nonesort_key: str | None
args_array_to_dict(kwargs: dict[str, Any], key_to_convert: str) -> dict[str, Any]
Convert the value in a dictionary entry to a dictionary. From the kwargs dictionary, it converts the value of the key_to_convert entry from a list of key-value pairs to a dictionary. Glow-up for data structures π¦
Parameters:
kwargsβ a dictionarykey_to_convertβ the key (inkwargs), whose value is expected to be a list ofkey=valuestrings. This value will be converted to a dictionary.
Returns: kwargs, the (modified) dictionary.
args_array_to_patch(op: str, attributes: list[str]) -> list[dict[str, Any]]
No description in the source, bestie β it's giving mystery, but that's the signature, keep it exact π
bool_argument_value(arg_name: str, bool_str: str, strict: bool = True, default: bool = False) -> bool
Returns the Boolean represented by bool_str. Returns the Boolean value for the argument named arg_name. The value is represented by the string bool_str. If the string is an invalid Boolean string: if strict is True, a CommandError exception is raised; otherwise the default value is returned. Yes/no but make it dramatic π
Parameters:
arg_nameβ The name of the argumentbool_strβ The string representing a Boolean valuestrictβ Used if the string is invalid. IfTrue, raises an exception. IfFalse, returns the default value.defaultβ The default value to return if the string is invalid and not strict
Returns: the Boolean value represented by bool_str or the default value if bool_str is invalid and strict is False.
RaisesCommandErrorβ ifbool_stris an invalid Boolean string. So like, keep your booleans legal or catch hands π
check_api_version_support(current_version: str | list[str], required_version: str) -> bool
Check if the current API version supports a required version.
Parameters:
current_versionβ Current API version being used (e.g."1.112")required_versionβ Minimum API version required (e.g."1.112")
Returns: True if the current version meets the requirement, False otherwise. Also returns True if the version format is invalid (let the server decide). We love a delegation moment π
check_empty_arg(arg: str, arg_descriptor: str) -> None
No description in the source β but there it is, untouched, exactly as written β¨
check_for_invalid_fields(fields: list[str] | None, valid_fields: list[str]) -> None
Check for invalid fields. The bouncer at the club of arguments πͺ
Parameters:
fieldsβ A list of fields specified by the user.valid_fieldsβ A list of valid fields.
Raises CommandError β if invalid fields were specified by the user. You're not on the list, babes π
common_filters(marker: str | None = None, limit: int | None = None, sort_key: str | None = None, sort_dir: str | None = None, fields: list[str] | None = None, detail: bool = False, project: str | None = None, public: bool | None = None) -> list[str]
Generate common filters for any list request. One function to serve all the list girlies πΈ
Parameters:
markerβ entity ID from which to start returning entities.limitβ maximum number of entities to return.sort_keyβ field to use for sorting.sort_dirβ direction of sorting:'asc'or'desc'.fieldsβ a list with a specified set of fields of the resource to be returned.detailβ Boolean,Trueto return detailed information. This parameter can be used for resources which accept'detail'as a URL parameter.
Returns: list of string filters.
common_params_for_list(args: ListCommandArgs, fields: list[str], field_labels: list[str]) -> dict[str, Any]
Generate the 'params' dict that is common for every 'list' command. Teamwork makes the dream work π«Ά
Parameters:
argsβ arguments from command line.fieldsβ possible fields for sorting.field_labelsβ possible field labels for sorting.
Returns: a dict with params to pass to the client method.
convert_list_props_to_comma_separated(data: dict[str, Any], props: list[str] | None = None) -> dict[str, Any]
Convert the list-type properties to comma-separated strings. Lists into vibes π¦
Parameters:
dataβ the input dict object.propsβ the properties whose values will be converted. Defaults toNoneto convert all list-type properties of the input.
Returns: the result dict instance.
format_hash(data: dict[str, Any] | None, prefix: str = '') -> str | None
No description in the source, so I'm not inventing one β signature only, bestie β¨
get_from_stdin</p> π«Ά
ironicclient.common.utils.get_from_stdin(info_desc: str) -> str
Okay so this one is literally just "read stuff from stdin" β it's giving very demure, very mindful. β¨
Parameters
info_descβ a string description of the info you want (so it can tell you what it's asking for, slay)
Raises
InvalidAttributeif there was a problem reading from stdin π
Returns
- the string that was read from stdin π
get_json_data</p> π
ironicclient.common.utils.get_json_data(data: bytes) -> dict[str, Any] | list[Any] | None
Checks whether the binary data is JSON, and parses it if it is. vibe check on your bytes fr fr.
Parameters
dataβ raw bytes to parse (e.g. the response body)
Returns
- the parsed
dictorlistif it's valid JSON, otherwiseNone
handle_json_arg</p> π¦
ironicclient.common.utils.handle_json_arg(json_arg: str | None, info_desc: str) -> list[Any] | dict[str, Any] | None
Reads a JSON argument from stdin, a file, or a plain string. three ways to serve looks π
Parameters
json_argβ may be a file name containing the JSON, a JSON string, or'-'which means "bestie read it from standard input"info_descβ a string description of the desired information
Returns
- a list or dictionary parsed from JSON, or
Noneifjson_argis empty (like, e.g. after reading from stdin with no input β tragic but valid)
Raises
InvalidAttributeif the argument can't be parsed π
handle_json_or_file_arg</p> πΈ
ironicclient.common.utils.handle_json_or_file_arg(json_arg: str) -> list[Any] | dict[str, Any]
Tries to read the JSON argument from a file or from a string. lowkey the same energy as above but it always gives you something back.
Parameters
json_argβ may be a file name containing the YAML or JSON, or a JSON string
Returns
- a list or dictionary parsed from JSON
Raises
InvalidAttributeif the argument can't be parsed π€
key_value_pairs_to_dict</p> π
ironicclient.common.utils.key_value_pairs_to_dict(key_value_pairs: list[str] | None) -> dict[str, Any]
Turns a list of key-value pairs into a dictionary. glow-up of the century honestly.
Parameters
key_value_pairsβ a list of strings, and each string is in the form<key>=<value>
Returns
- a dictionary, possibly empty (yes, empty dicts are still valid and we love them)
make_configdrive</p> π§
ironicclient.common.utils.make_configdrive(path: str) -> bytes
Makes the config drive file. arts and crafts but make it infrastructure β¨
Parameters
pathβ the directory containing the config drive files
Returns
- a gzipped and base64 encoded configdrive string
poll</p> π
ironicclient.common.utils.poll(timeout: int | float, poll_interval: int | float, poll_delay_function: Callable[[int | float], Any] | None, timeout_message: str | Callable[[], str]) -> Iterator[int]
No description in the docs β just the signature, sitting there, mysterious, main character energy. iykyk. π₯
split_and_deserialize</p> π
ironicclient.common.utils.split_and_deserialize(string: str) -> tuple[str, Any]
Splits a string and tries to JSON-deserialize it.
So it takes a string in the KEY=VALUE format, splits it (using '=' as the separator), and tries to JSON-deserialize the VALUE. not me doing string surgery π«Ά
Returns
- a tuple of
(key, value)
tempdir</p> β
ironicclient.common.utils.tempdir(suffix: str | None = None, prefix: str | None = None, dir: str | None = None) -> Generator[str, None, None]
Another one with no description β just vibes and a generator. iconic honestly.
Module contents π
ironicclient.osc package π
Subpackages
ironicclient.osc.v1 package β¨
Submodules
ironicclient.osc.v1.baremetal_allocation module π¦
class ironicclient.osc.v1.baremetal_allocation.CreateBaremetalAllocation(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ShowOne
Creates a new baremetal allocation. π making a whole allocation, no big deal.
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_allocation.CreateBaremetalAllocation (WARNING)>take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β runs the command. Returns a tuple containing the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_allocation.DeleteBaremetalAllocation(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Command
Unregisters baremetal allocation(s). bye bestie π
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_allocation.DeleteBaremetalAllocation (WARNING)>take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." the returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_allocation.ListBaremetalAllocation(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Lister
Lists the baremetal allocations. π
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_allocation.ListBaremetalAllocation (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β runs the command. Returns a tuple containing the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_allocation.SetBaremetalAllocation(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Command
Sets baremetal allocation properties. glow-up time β
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_allocation.SetBaremetalAllocation (WARNING)>take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." the returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_allocation.ShowBaremetalAllocation(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ShowOne
Shows baremetal allocation details. the receipts, basically π§Ύβ¨
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_allocation.ShowBaremetalAllocation (WARNING)>take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β runs the command. Returns a tuple containing the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_allocation.UnsetBaremetalAllocation(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Command
Unsets baremetal allocation properties. undoing, but make it chic π
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_allocation.UnsetBaremetalAllocation (WARNING)>take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." the returned value will be returned by the program.
ironicclient.osc.v1.baremetal_chassis module π
class ironicclient.osc.v1.baremetal_chassis.CreateBaremetalChassis(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ShowOne
Creates a new chassis. π¦
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_chassis.CreateBaremetalChassis (WARNING)>take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β runs the command. Returns a tuple containing the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_chassis.DeleteBaremetalChassis(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Command
Deletes a chassis. it's not personal, it's just cleanup π
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_chassis.DeleteBaremetalChassis (WARNING)>take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." the returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_chassis.ListBaremetalChassis(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Lister
Lists the chassis. all of them. every single one. π
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_chassis.ListBaremetalChassis (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β runs the command. Returns a tuple containing the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_chassis.SetBaremetalChassis(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Command
Sets chassis properties. β¨
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_chassis.SetBaremetalChassis (WARNING)>take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." the returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_chassis.ShowBaremetalChassis(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ShowOne
Shows chassis details. π
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_chassis.ShowBaremetalChassis (WARNING)>take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β runs the command.
Return a tuple containing the column names and an iterable containing the data to be listed. (yes, this is the same line you've seen like eight times now β the OSC command classes are very much copy my homework but change it slightly energy, and honestly? we respect the consistency π )
class ironicclient.osc.v1.baremetal_chassis.UnsetBaremetalChassis(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Command<#ironicclient.osc.command.Command>
Unset chassis properties. i.e. yeet the properties off a chassis, bestie π«Ά
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser. that's it, that's the whole job β¨log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_chassis.UnsetBaremetalChassis (WARNING)>β the class logger, sitting atWARNINGlevel, minding its own business πtake_action(parsed_args: Namespace) -> Noneβ Override to do something useful. The returned value will be returned by the program.
π¦ ironicclient.osc.v1.baremetal_conductor module
class ironicclient.osc.v1.baremetal_conductor.ListBaremetalConductor(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Lister<#ironicclient.osc.command.Lister>
List baremetal conductors π (the whole roster, bestie)
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_conductor.ListBaremetalConductor (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β Run command. Return a tuple containing the column names and an iterable containing the data to be listed. same drill, every single time fr fr
class ironicclient.osc.v1.baremetal_conductor.ShowBaremetalConductor(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ShowOne<#ironicclient.osc.command.ShowOne>
Show baremetal conductor details π the full dossier on one (1) conductor
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_conductor.ShowBaremetalConductor (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β Run command. Return a tuple containing the column names and an iterable containing the data to be listed.
πΈ ironicclient.osc.v1.baremetal_create module
class ironicclient.osc.v1.baremetal_create.CreateBaremetal(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Command<#ironicclient.osc.command.Command>
Create resources from files. point it at a file, get resources β extremely giving "load the preset" energy π
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_create.CreateBaremetal (WARNING)>take_action(parsed_args: Namespace) -> Noneβ Override to do something useful. The returned value will be returned by the program.
π§ ironicclient.osc.v1.baremetal_deploy_template module
class ironicclient.osc.v1.baremetal_deploy_template.CreateBaremetalDeployTemplate(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ShowOne<#ironicclient.osc.command.ShowOne>
Create a new deploy template β¨ brand new template, just dropped
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_deploy_template.CreateBaremetalDeployTemplate (WARNING)>take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β Run command. Return a tuple containing the column names and an iterable containing the data to be listed. (note the extra-tuple-y return type here β yes it's different from all the others, no we're not going to question it π)
class ironicclient.osc.v1.baremetal_deploy_template.DeleteBaremetalDeployTemplate(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Command<#ironicclient.osc.command.Command>
Delete deploy template(s). ποΈ plural, bestie β it'll take out more than one if you ask nicely
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_deploy_template.DeleteBaremetalDeployTemplate (WARNING)>take_action(parsed_args: Namespace) -> Noneβ Override to do something useful. The returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_deploy_template.ListBaremetalDeployTemplate(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Lister<#ironicclient.osc.command.Lister>
List baremetal deploy templates. π
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_deploy_template.ListBaremetalDeployTemplate (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β Run command. Return a tuple containing the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_deploy_template.SetBaremetalDeployTemplate(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Command<#ironicclient.osc.command.Command>
Set baremetal deploy template properties. π― poke the properties, make them yours
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_deploy_template.SetBaremetalDeployTemplate (WARNING)>take_action(parsed_args: Namespace) -> Noneβ Override to do something useful. The returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_deploy_template.ShowBaremetalDeployTemplate(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ShowOne<#ironicclient.osc.command.ShowOne>
Show baremetal deploy template details. π the full tea on exactly one template
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_deploy_template.ShowBaremetalDeployTemplate (WARNING)>take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β Run command. Return a tuple containing the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_deploy_template.UnsetBaremetalDeployTemplate(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Command<#ironicclient.osc.command.Command>
Unset baremetal deploy template properties. π the opposite of Set, obviously β properties are leaving the chat
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_deploy_template.UnsetBaremetalDeployTemplate (WARNING)>take_action(parsed_args: Namespace) -> Noneβ Override to do something useful. The returned value will be returned by the program.
π₯ ironicclient.osc.v1.baremetal_driver module
class ironicclient.osc.v1.baremetal_driver.ListBaremetalDriver(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Lister<#ironicclient.osc.command.Lister>
List the enabled drivers. π the ones actually turned on, not the whole catalogue
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_driver.ListBaremetalDriver (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β Run command. Return a tuple containing the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_driver.ListBaremetalDriverProperty(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Lister<#ironicclient.osc.command.Lister>
List the driver properties. π§Ύ
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_driver.ListBaremetalDriverProperty (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β Run command. Return a tuple containing the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_driver.ListBaremetalDriverRaidProperty(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Lister<#ironicclient.osc.command.Lister>
List a driver's RAID logical disk properties. π½ very specific, very niche, very slay
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_driver.ListBaremetalDriverRaidProperty (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β Run command. Return a tuple containing the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_driver.PassthruCallBaremetalDriver(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ShowOne<#ironicclient.osc.command.ShowOne>
Call a vendor passthru method for a driver. π "passthru" is literally right there in the name β you're calling straight through to the vendor's own method, iykyk
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_driver.PassthruCallBaremetalDriver (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β Run command. Return a tuple containing the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_driver.PassthruListBaremetalDriver(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Lister<#ironicclient.osc.command.Lister>
List available vendor passthru methods for a driver. ποΈ the menu of what you're allowed to call
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_driver.PassthruListBaremetalDriver (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β runs the command, bestie π returns a tuple with the column names plus an iterable holding all the data to be listed.
πΈ ironicclient.osc.v1.baremetal_inspection_rule module
Okay so this module is literally the inspection-rules era β create 'em, delete 'em, list 'em, set 'em, show 'em, unset 'em. Full cycle, no notes β¨
class ironicclient.osc.v1.baremetal_inspection_rule.CreateBaremetalInspectionRule(app: App, app_args: Namespace | None, cmd_name: str | None = None)β bases:ShowOne <#ironicclient.osc.command.ShowOne>. Does exactly what it says on the tin: Create a new rule πget_parser(prog_name: str) -> ArgumentParserβ hands you back anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_inspection_rule.CreateBaremetalInspectionRule (WARNING)>β the class's very own logger, living atWARNINGlevel.take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β runs the command. Returns a tuple with the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_inspection_rule.DeleteBaremetalInspectionRule(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)β bases:Command <#ironicclient.osc.command.Command>. Delete rule(s). plural, so go off πget_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_inspection_rule.DeleteBaremetalInspectionRule (WARNING)>take_action(parsed_args: Namespace) -> Noneβ described as "Override to do something useful", and the returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_inspection_rule.ListBaremetalInspectionRule(app: App, app_args: Namespace | None, cmd_name: str | None = None)β bases:Lister <#ironicclient.osc.command.Lister>. List baremetal rules. the main character of scrollable output π¦get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_inspection_rule.ListBaremetalInspectionRule (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β runs the command. Returns a tuple of column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_inspection_rule.SetBaremetalInspectionRule(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)β bases:Command <#ironicclient.osc.command.Command>. Set baremetal rule properties. glow-up time πget_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_inspection_rule.SetBaremetalInspectionRule (WARNING)>take_action(parsed_args: Namespace) -> Noneβ "Override to do something useful"; the returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_inspection_rule.ShowBaremetalInspectionRule(app: App, app_args: Namespace | None, cmd_name: str | None = None)β bases:ShowOne <#ironicclient.osc.command.ShowOne>. Show baremetal rule details. the receipts, fr fr πget_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_inspection_rule.ShowBaremetalInspectionRule (WARNING)>take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β runs the command. Returns a tuple containing the column names and an iterable with the data to be listed.
class ironicclient.osc.v1.baremetal_inspection_rule.UnsetBaremetalInspectionRule(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)β bases:Command <#ironicclient.osc.command.Command>. Unset baremetal rule properties. undoing the glow-up, iconic behaviour honestly π«Άget_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_inspection_rule.UnsetBaremetalInspectionRule (WARNING)>take_action(parsed_args: Namespace) -> Noneβ "Override to do something useful"; the returned value will be returned by the program.
π ironicclient.osc.v1.baremetal_node module
And now the big one β nodes!! This module is lowkey stacked, so like, buckle up bestie π
class ironicclient.osc.v1.baremetal_node.AbortBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)β bases:ProvisionStateBaremetalNode. Set provision state of baremetal node to 'abort' β stop right there, we're done πPROVISION_STATE: str = 'abort'log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.AbortBaremetalNode (WARNING)>
class ironicclient.osc.v1.baremetal_node.AddTraitBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)β bases:Command <#ironicclient.osc.command.Command>. Add traits to a node. giving nodes personality traits, literally πget_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.AddTraitBaremetalNode (WARNING)>take_action(parsed_args: Namespace) -> Noneβ "Override to do something useful"; the returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_node.AdoptBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)β bases:ProvisionStateWithWait. Set provision state of baremetal node to 'adopt' β we're taking this node in, no cap π«ΆPROVISION_STATE: str = 'adopt'log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.AdoptBaremetalNode (WARNING)>
class ironicclient.osc.v1.baremetal_node.BIOSSettingShowBaremetalNode(app: App, app_args: Namespace | None, cmd_name: str | None = None)β bases:ShowOne <#ironicclient.osc.command.ShowOne>. Show a specific BIOS setting for a node. just one setting, we're being specific today β¨get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.BIOSSettingShowBaremetalNode (WARNING)>take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β runs the command. Returns a tuple with the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_node.BootdeviceSetBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)β bases:Command <#ironicclient.osc.command.Command>. Set the boot device for a node πget_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.BootdeviceSetBaremetalNode (WARNING)>take_action(parsed_args: Namespace) -> Noneβ "Override to do something useful"; the returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_node.BootdeviceShowBaremetalNode(app: App, app_args: Namespace | None, cmd_name: str | None = None)β bases:ShowOne <#ironicclient.osc.command.ShowOne>. Show the boot device information for a node πget_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.BootdeviceShowBaremetalNode (WARNING)>take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β runs the command. Returns a tuple with the column names and an iterable containing the data to be listed.
class ironicclient.osc.v1.baremetal_node.BootmodeSetBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)β bases:Command <#ironicclient.osc.command.Command>. Set the boot mode for the next baremetal node deployment β setting the vibe for the next deployment, forward thinking queen π₯get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.BootmodeSetBaremetalNode (WARNING)>take_action(parsed_args: Namespace) -> Noneβ "Override to do something useful"; the returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_node.CleanBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)β bases:ProvisionStateWithWait. Set provision state of baremetal node to 'clean' β self-care era for your hardware π§PROVISION_STATE: str = 'clean'get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.CleanBaremetalNode (WARNING)>
class ironicclient.osc.v1.baremetal_node.ConsoleDisableBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)β bases:Command <#ironicclient.osc.command.Command>. Disable console access for a node β closing the door, respectfully πget_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ConsoleDisableBaremetalNode (WARNING)>take_action(parsed_args: Namespace) -> Noneβ "Override to do something useful"; the returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_node.ConsoleEnableBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)β bases:Command <#ironicclient.osc.command.Command>
So like, this class enables console access for a node, and here's the rest of its bag of tricks:
get_parser(prog_name: str) -> ArgumentParser : returns an argparse.ArgumentParser bestie, that's literally all it does π
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ConsoleEnableBaremetalNode (WARNING)>
take_action(parsed_args: Namespace) -> None : "Override to do something useful." And like, the returned value will be returned by the program. That's the whole deal β¨
π class ironicclient.osc.v1.baremetal_node.ConsoleShowBaremetalNode(app: App, app_args: Namespace | None, cmd_name: str | None = None) π
Bases: ShowOne <#ironicclient.osc.command.ShowOne>
Show console information for a node β the receipts, the tea βπ
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ConsoleShowBaremetalNode (WARNING)>
take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]] : Run command. : Return a tuple containing the column names and an iterable containing the data to be listed.
πΈ class ironicclient.osc.v1.baremetal_node.CreateBaremetalNode(app: App, app_args: Namespace | None, cmd_name: str | None = None) πΈ
Bases: ShowOne <#ironicclient.osc.command.ShowOne>
Register a new node with the baremetal service β new node just dropped, main character energy fr fr π
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.CreateBaremetalNode (WARNING)>
take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]] : Run command. : Return a tuple containing the column names and an iterable containing the data to be listed.
π¦ class ironicclient.osc.v1.baremetal_node.DeleteBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None) π¦
Bases: Command <#ironicclient.osc.command.Command>
Unregister baremetal node(s) β yeah we're evicting them, it's giving blocklist π
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.DeleteBaremetalNode (WARNING)>
take_action(parsed_args: Namespace) -> None : Override to do something useful. : The returned value will be returned by the program.
π class ironicclient.osc.v1.baremetal_node.DeployBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None) π
Bases: ProvisionStateWithWait
Set provision state of baremetal node to 'deploy' β time to actually ship it π
PROVISION_STATE: str = 'active'
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.DeployBaremetalNode (WARNING)>
π class ironicclient.osc.v1.baremetal_node.InjectNmiBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None) π
Bases: Command <#ironicclient.osc.command.Command>
Inject NMI to baremetal node β yeah, that NMI, it's going straight in π
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.InjectNmiBaremetalNode (WARNING)>
take_action(parsed_args: Namespace) -> None : Override to do something useful. : The returned value will be returned by the program.
π class ironicclient.osc.v1.baremetal_node.InspectBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None) π
Bases: ProvisionStateWithWait
Set provision state of baremetal node to 'inspect' β vibe check on the hardware, no cap π§
PROVISION_STATE: str = 'inspect'
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.InspectBaremetalNode (WARNING)>
β class ironicclient.osc.v1.baremetal_node.ListBIOSSettingBaremetalNode(app: App, app_args: Namespace | None, cmd_name: str | None = None) β
Bases: Lister <#ironicclient.osc.command.Lister>
List a node's BIOS settings. Like a little firmware show-and-tell π
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ListBIOSSettingBaremetalNode (WARNING)>
take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]] : Run command. : Return a tuple containing the column names and an iterable containing the data to be listed.
π class ironicclient.osc.v1.baremetal_node.ListBaremetalNode(app: App, app_args: Namespace | None, cmd_name: str | None = None) π
Bases: Lister <#ironicclient.osc.command.Lister>
List baremetal nodes β the full roster, everybody say hi π
PROVISION_STATES: list[str] = ['active', 'deleted', 'rebuild', 'inspect', 'provide', 'manage', 'clean', 'adopt', 'abort']
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ListBaremetalNode (WARNING)>
take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]] : Run command. : Return a tuple containing the column names and an iterable containing the data to be listed.
π class ironicclient.osc.v1.baremetal_node.ListFirmwareComponentBaremetalNode(app: App, app_args: Namespace | None, cmd_name: str | None = None) π
Bases: Lister <#ironicclient.osc.command.Lister>
List all Firmware Components of a node β every lil component getting its moment β¨
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ListFirmwareComponentBaremetalNode (WARNING)>
take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]] : Run command. : Return a tuple containing the column names and an iterable containing the data to be listed.
π«Ά class ironicclient.osc.v1.baremetal_node.ListTraitsBaremetalNode(app: App, app_args: Namespace | None, cmd_name: str | None = None) π«Ά
Bases: Lister <#ironicclient.osc.command.Lister>
List a node's traits. It's giving personality profile π¦
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ListTraitsBaremetalNode (WARNING)>
take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]] : Run command. : Return a tuple containing the column names and an iterable containing the data to be listed.
π§° class ironicclient.osc.v1.baremetal_node.MaintenanceSetBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None) π§°
Bases: Command <#ironicclient.osc.command.Command>
Set baremetal node to maintenance mode β going offline, do not perceive me π
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.MaintenanceSetBaremetalNode (WARNING)>
take_action(parsed_args: Namespace) -> None : Override to do something useful. : The returned value will be returned by the program.
π¦ class ironicclient.osc.v1.baremetal_node.MaintenanceUnsetBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None) π¦
Bases: Command <#ironicclient.osc.command.Command>
Unset baremetal node from maintenance mode β she's back online and thriving π
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.MaintenanceUnsetBaremetalNode (WARNING)>
take_action(parsed_args: Namespace) -> None : Override to do something useful. : The returned value will be returned by the program.
π class ironicclient.osc.v1.baremetal_node.ManageBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None) π
Bases: ProvisionStateWithWait
Set provision state of baremetal node to 'manage' β taking the wheel π
PROVISION_STATE: str = 'manage'
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ManageBaremetalNode (WARNING)>
π class ironicclient.osc.v1.baremetal_node.NodeChildrenList(app: App, app_args: Namespace | None, cmd_name: str | None = None) π
Bases: ShowOne <#ironicclient.osc.command.ShowOne>
Get a list of nodes associated as children. The nepo babies, basically π
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.NodeChildrenList (WARNING)>
take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]] : Run command. : Return a tuple containing the column names and an iterable containing the data to be listed.
π class ironicclient.osc.v1.baremetal_node.NodeHistoryEventGet(app: App, app_args: Namespace | None, cmd_name: str | None = None) π
Bases: ShowOne <#ironicclient.osc.command.ShowOne>
Get history event for a baremetal node. Receipts? Pulled. π§Ύ
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.NodeHistoryEventGet (WARNING)>
take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]] : Run command. : Return a tuple containing the column names and an iterable containing the data to be listed.
πΈ class ironicclient.osc.v1.baremetal_node.NodeHistoryList(app: App, app_args: Namespace | None, cmd_name: str | None = None) πΈ
Bases: Lister <#ironicclient.osc.command.Lister>
Get history events for a baremetal node β the whole lore drop, chronological bestie β³
get_parser(prog_name: str) -> ArgumentParser : Return an argparse.ArgumentParser.
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.NodeHistoryList (WARNING)>
take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]] : Run command.
Return a tuple containing the column names and an iterable containing the data to be listed. (Yeah, the take_action description carries on past this part β stay tuned π)
β¦and that take_action hands back a tuple containing the column names and an iterable containing the data to be listed. π
π§Έ class ironicclient.osc.v1.baremetal_node.NodeInventorySave(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Bestie, this one grabs the hardware inventory of a node β shoutout JSON format β or saves it straight to a file. Obsessed.
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser. That's literally it.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.NodeInventorySave (WARNING)>β the logger, sitting atWARNINGlevel, minding its business.take_action(parsed_args: Namespace) -> Noneβ the docs say "override to do something useful" π. And the returned value will be returned by the program, fr fr.
π§Έ class ironicclient.osc.v1.baremetal_node.PassthruCallBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Calls a vendor passthru method for a node. vendor passthru is such a vibe, iykyk.
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.PassthruCallBaremetalNode (WARNING)>β logger,WARNING, iconic.take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." The returned value will be returned by the program.
π§Έ class ironicclient.osc.v1.baremetal_node.PassthruListBaremetalNode(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Lister
Lists the vendor passthru methods for a node. also notice the arg here is just App, not _app.App β not me noticing that π.
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.PassthruListBaremetalNode (WARNING)>β logger atWARNING.take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β runs the command. Return a tuple containing the column names and an iterable containing the data to be listed. β¨
π§Έ class ironicclient.osc.v1.baremetal_node.PowerBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
The base power state class, for setting the power of a node. main character base class energy π
POWER_STATE: strβ declared, no value assigned. she's a placeholder, she contains multitudes.get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.PowerBaremetalNode (WARNING)>β logger,WARNING.take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." The returned value will be returned by the program.
π§Έ class ironicclient.osc.v1.baremetal_node.PowerOffBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: PowerBaremetalNode
Powers off a node. bye bestie π
POWER_STATE: str = 'off'β yeah, she's'off'.get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.PowerOffBaremetalNode (WARNING)>β logger,WARNING.
π§Έ class ironicclient.osc.v1.baremetal_node.PowerOnBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: PowerBaremetalNode
Powers a node on. wake up king π
POWER_STATE: str = 'on'β'on', periodt.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.PowerOnBaremetalNode (WARNING)>β logger,WARNING. (and notake_actionof her own listed here β she inherits the vibe.)
π§Έ class ironicclient.osc.v1.baremetal_node.ProvideBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ProvisionStateWithWait
Sets the provision state of a baremetal node to 'provide'.
PROVISION_STATE: str = 'provide'β literally'provide'.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ProvideBaremetalNode (WARNING)>β logger,WARNING.
π§Έ class ironicclient.osc.v1.baremetal_node.ProvisionStateBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
The base provision state class. the blueprint, the moment, the icon π
PROVISION_STATE: strβ declared, unset, mysterious.get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ProvisionStateBaremetalNode (WARNING)>β logger,WARNING.take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." The returned value will be returned by the program.
π§Έ class ironicclient.osc.v1.baremetal_node.ProvisionStateWithWait(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ProvisionStateBaremetalNode
Provision state class that adds the --wait flag. she waits π
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ProvisionStateWithWait (WARNING)>β logger,WARNING.take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." The returned value will be returned by the program.
π§Έ class ironicclient.osc.v1.baremetal_node.RebootBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Reboots a baremetal node. turn it off and on again, but make it fashion π₯
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.RebootBaremetalNode (WARNING)>β logger,WARNING.take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." The returned value will be returned by the program.
π§Έ class ironicclient.osc.v1.baremetal_node.RebuildBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ProvisionStateWithWait
Sets the provision state of a baremetal node to 'rebuild'. glow-up via reinstall β¨
PROVISION_STATE: str = 'rebuild'β literally'rebuild'.get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.RebuildBaremetalNode (WARNING)>β logger,WARNING.
π§Έ class ironicclient.osc.v1.baremetal_node.RemoveTraitBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Removes trait(s) from a node. one trait, many traits, all of them, gone π¦
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.RemoveTraitBaremetalNode (WARNING)>β logger,WARNING.take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." The returned value will be returned by the program.
π§Έ class ironicclient.osc.v1.baremetal_node.RescueBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ProvisionStateWithWait
Sets the provision state of a baremetal node to 'rescue'. she's here to save you π«Ά
PROVISION_STATE: str = 'rescue'β literally'rescue'.get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.RescueBaremetalNode (WARNING)>β logger,WARNING.
π§Έ class ironicclient.osc.v1.baremetal_node.SecurebootOffBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Turns secure boot off. no cap, it just turns it off.
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.SecurebootOffBaremetalNode (WARNING)>β logger,WARNING.take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." The returned value will be returned by the program.
π§Έ class ironicclient.osc.v1.baremetal_node.SecurebootOnBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Turns secure boot on. the sequel, and she ate π
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.SecurebootOnBaremetalNode (WARNING)>β logger,WARNING.take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." The returned value will be returned by the program.
π§Έ class ironicclient.osc.v1.baremetal_node.ServiceBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ProvisionStateWithWait
Sets the provision state of a baremetal node to 'service'. at your service π
PROVISION_STATE: str = 'service'β literally'service'.get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ServiceBaremetalNode (WARNING)>β logger,WARNING.
π§Έ class ironicclient.osc.v1.baremetal_node.SetBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Sets baremetal properties. setting the vibe check parameters πΈ
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.SetBaremetalNode (WARNING)>β logger,WARNING.take_action(parsed_args: Namespace) -> Noneβ "override to do something useful." The returned value will be returned by the program.
π§Έ class ironicclient.osc.v1.baremetal_node.ShowBaremetalNode(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
Shows baremetal node details. the reveal, the moment, the details π
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ShowBaremetalNode (WARNING)>β logger,WARNING.take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β runs the command. Return a tuple containing the column names and an iterable containing the data to be listed. (this one's atupleoftuples, note the difference bestie π«Ά)
UndeployBaremetalNode
ironicclient.osc.v1.baremetal_node.UndeployBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ProvisionStateWithWait - What it does: sets the provision state of a baremetal node to
'deleted'ποΈ PROVISION_STATE: str = 'deleted'log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.UndeployBaremetalNode (WARNING)>
UnholdBaremetalNode
ironicclient.osc.v1.baremetal_node.UnholdBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ProvisionStateBaremetalNode - What it does: sets the provision state of a baremetal node to
'unhold'π«Ά PROVISION_STATE: str = 'unhold'log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.UnholdBaremetalNode (WARNING)>
UnrescueBaremetalNode
ironicclient.osc.v1.baremetal_node.UnrescueBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ProvisionStateWithWait - What it does: sets the provision state of a baremetal node to
'unrescue'π PROVISION_STATE: str = 'unrescue'log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.UnrescueBaremetalNode (WARNING)>
UnsetBaremetalNode
ironicclient.osc.v1.baremetal_node.UnsetBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Command(the one and onlyironicclient.osc.command.Command) π - What it does: unset baremetal properties. like, bye-bye properties β¨
get_parser(prog_name: str) -> ArgumentParser- returns a whole
argparse.ArgumentParser. iconic behavior honestly.
- returns a whole
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.UnsetBaremetalNode (WARNING)>take_action(parsed_args: Namespace) -> None- "Override to do something useful." β which is literally what the docs say bestie π
- the returned value gets returned by the program, so whatever you hand back is the main character now.
ValidateBaremetalNode
ironicclient.osc.v1.baremetal_node.ValidateBaremetalNode(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Lister(akaironicclient.osc.command.Lister) - What it does: validates a node's driver interfaces. the vibe check for your drivers fr fr β
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser, as one does
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.ValidateBaremetalNode (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]- "Run command."
- returns a tuple containing the column names and an iterable containing the data to be listed. structure queen π
VifAttachBaremetalNode
ironicclient.osc.v1.baremetal_node.VifAttachBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Commandβironicclient.osc.command.Command - What it does: attaches a VIF to a given node π
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.VifAttachBaremetalNode (WARNING)>take_action(parsed_args: Namespace) -> None- "Override to do something useful." β the returned value will be returned by the program, no cap
VifDetachBaremetalNode
ironicclient.osc.v1.baremetal_node.VifDetachBaremetalNode(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Commandβironicclient.osc.command.Command - What it does: detaches a VIF from a given node π«³
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.VifDetachBaremetalNode (WARNING)>take_action(parsed_args: Namespace) -> None- "Override to do something useful." β and yeah, whatever it returns gets returned by the program
VifListBaremetalNode
ironicclient.osc.v1.baremetal_node.VifListBaremetalNode(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Listerβironicclient.osc.command.Lister - What it does: shows the attached VIFs for a node π
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_node.VifListBaremetalNode (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]- "Run command."
- returns a tuple of the column names plus an iterable holding the data to be listed. the classic Lister combo π
π ironicclient.osc.v1.baremetal_port module π
CreateBaremetalPort
ironicclient.osc.v1.baremetal_port.CreateBaremetalPort(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ShowOneβironicclient.osc.command.ShowOne - What it does: creates a new port β¨ (a baremetal one, obviously)
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_port.CreateBaremetalPort (WARNING)>take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]- "Run command."
- returns a tuple containing the column names and an iterable containing the data to be listed
DeleteBaremetalPort
ironicclient.osc.v1.baremetal_port.DeleteBaremetalPort(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Commandβironicclient.osc.command.Command - What it does: deletes port(s). plural, so you can go off and delete a bunch π
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_port.DeleteBaremetalPort (WARNING)>take_action(parsed_args: Namespace) -> None- "Override to do something useful." β returned value gets returned by the program, iykyk
ListBaremetalPort
ironicclient.osc.v1.baremetal_port.ListBaremetalPort(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Listerβironicclient.osc.command.Lister - What it does: lists baremetal ports π
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_port.ListBaremetalPort (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]- "Run command."
- returns a tuple containing the column names and an iterable containing the data to be listed
SetBaremetalPort
ironicclient.osc.v1.baremetal_port.SetBaremetalPort(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Commandβironicclient.osc.command.Command - What it does: sets baremetal port properties π οΈ
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_port.SetBaremetalPort (WARNING)>take_action(parsed_args: Namespace) -> None- "Override to do something useful." β and the returned value will be returned by the program
ShowBaremetalPort
ironicclient.osc.v1.baremetal_port.ShowBaremetalPort(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ShowOneβironicclient.osc.command.ShowOne - What it does: shows baremetal port details π the full tea
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_port.ShowBaremetalPort (WARNING)>take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]- "Run command."
- returns a tuple containing the column names and an iterable containing the data to be listed
UnsetBaremetalPort
ironicclient.osc.v1.baremetal_port.UnsetBaremetalPort(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Commandβironicclient.osc.command.Command - What it does: unsets baremetal port properties π§Ή
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_port.UnsetBaremetalPort (WARNING)>take_action(parsed_args: Namespace) -> None- "Override to do something useful." β returned value goes right back out of the program
π¦ ironicclient.osc.v1.baremetal_portgroup module π¦
CreateBaremetalPortGroup
ironicclient.osc.v1.baremetal_portgroup.CreateBaremetalPortGroup(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
ShowOneβironicclient.osc.command.ShowOne - What it does: creates a new baremetal port group β a whole squad of ports, highkey iconic π
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_portgroup.CreateBaremetalPortGroup (WARNING)>take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]- "Run command."
- returns a tuple containing the column names and an iterable containing the data to be listed
DeleteBaremetalPortGroup
ironicclient.osc.v1.baremetal_portgroup.DeleteBaremetalPortGroup(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Commandβironicclient.osc.command.Command - What it does: unregisters baremetal port group(s). yes, plural, go off π
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_portgroup.DeleteBaremetalPortGroup (WARNING)>take_action(parsed_args: Namespace) -> None- "Override to do something useful." β and the returned value will be returned by the program, fr fr
ListBaremetalPortGroup
ironicclient.osc.v1.baremetal_portgroup.ListBaremetalPortGroup(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Listerβironicclient.osc.command.Lister - What it does: lists baremetal port groups π
get_parser(prog_name: str) -> ArgumentParser- returns an
argparse.ArgumentParser
- returns an
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_portgroup.ListBaremetalPortGroup (WARNING)>take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]- "Run command."
- returns a tuple containing the column names and an iterable containing the data to be listed
SetBaremetalPortGroup
ironicclient.osc.v1.baremetal_portgroup.SetBaremetalPortGroup(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases:
Commandβironicclient.osc.command.Command take_action(parsed_args: Namespace) -> Noneβ literally just sets baremetal port group properties. That's the whole vibe.get_parser(prog_name: str) -> ArgumentParserβ hands you back anargparse.ArgumentParser, bestie. That's it, that's the function πlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_portgroup.SetBaremetalPortGroup (WARNING)>β yep, the logger, living at that dotted path, levelWARNINGπ«Άtake_action(parsed_args: Namespace) -> Noneβ "Override to do something useful." β and the returned value gets returned by the program. Iconic boilerplate, no notes.
class ironicclient.osc.v1.baremetal_portgroup.ShowBaremetalPortGroup(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
β¨ Show baremetal port group details. That's the whole assignment, and it ate. π
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_portgroup.ShowBaremetalPortGroup (WARNING)>β your trustedWARNING-level logger, fr fr.take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β Run command. Returns a tuple with the column names and an iterable holding the data to be listed. π
class ironicclient.osc.v1.baremetal_portgroup.UnsetBaremetalPortGroup(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Unset baremetal port group properties. The undoing of the doing, if you will. π¦
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_portgroup.UnsetBaremetalPortGroup (WARNING)>β same energy,WARNINGlevel, that exact dotted name.take_action(parsed_args: Namespace) -> Noneβ "Override to do something useful." The returned value gets returned by the program. Lowkey the most repeated sentence in this whole page and I respect the consistency π
π ironicclient.osc.v1.baremetal_runbook module π
Okay this whole module is runbook-coded and it's giving main character energy. Let's go one by one, bestie.
class ironicclient.osc.v1.baremetal_runbook.AddTraitBaremetalRunbook(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Add traits to a runbook. Simple, clean, slays. β¨
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log = <Logger ironicclient.osc.v1.baremetal_runbook.AddTraitBaremetalRunbook (WARNING)>β note: no type annotation on this one, just the plain assignment. Keeping it exactly as it is πtake_action(parsed_args: Namespace) -> Noneβ "Override to do something useful." The returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_runbook.CreateBaremetalRunbook(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
Create a new runbook. No period on that docstring either β character for character, bestie π
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_runbook.CreateBaremetalRunbook (WARNING)>β theWARNING-level logger, back at it again.take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β Run command. Returns a tuple of the column names plus an iterable containing the data to be listed. π«Ά
class ironicclient.osc.v1.baremetal_runbook.DeleteBaremetalRunbook(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Delete runbook(s). Yes, with the parenthetical "(s)" β plural possible, don't come for me, it's what the page says π
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_runbook.DeleteBaremetalRunbook (WARNING)>β you know the drill by now.take_action(parsed_args: Namespace) -> Noneβ "Override to do something useful." The returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_runbook.ListBaremetalRunbook(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Lister
List baremetal runbooks. A whole list of them, no cap. π
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_runbook.ListBaremetalRunbook (WARNING)>β<Logger ... (WARNING)>, unfailingly.take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β Run command. Returns a tuple containing the column names and an iterable containing the data to be listed. πΈ
class ironicclient.osc.v1.baremetal_runbook.ListTraitsBaremetalRunbook(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Lister
List a runbook's traits. Just the traits, bestie, nothing extra. π₯
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log = <Logger ironicclient.osc.v1.baremetal_runbook.ListTraitsBaremetalRunbook (WARNING)>β again, plain assignment, no annotation. Obsessed with the inconsistency ngl πtake_action(parsed_args: Namespace) -> tuple[tuple[str, ...], list[list[str]]]β Run command. Returns a tuple containing the column names and an iterable containing the data to be listed. Note the return type here islist[list[str]]and not the usualIterable[Any]β that's intentional, keep it π§
class ironicclient.osc.v1.baremetal_runbook.RemoveTraitBaremetalRunbook(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Remove trait(s) from a runbook. The inverse of AddTrait, if you're keeping score π
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log = <Logger ironicclient.osc.v1.baremetal_runbook.RemoveTraitBaremetalRunbook (WARNING)>β plain assignment, no type hint. As written.take_action(parsed_args: Namespace) -> Noneβ "Override to do something useful." The returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_runbook.SetBaremetalRunbook(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Set baremetal runbook properties. π
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_runbook.SetBaremetalRunbook (WARNING)>β annotated this time. We love a plot twist.take_action(parsed_args: Namespace) -> Noneβ "Override to do something useful." The returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_runbook.ShowBaremetalRunbook(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
Show baremetal runbook details. The spotlight moment. β
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_runbook.ShowBaremetalRunbook (WARNING)>βWARNINGlevel forever and always.take_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β Run command. Returns a tuple containing the column names and an iterable containing the data to be listed. π
class ironicclient.osc.v1.baremetal_runbook.UnsetBaremetalRunbook(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Unset baremetal runbook properties. Closing the loop π¦
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_runbook.UnsetBaremetalRunbook (WARNING)>β yes, that exact logger path,WARNINGand all.take_action(parsed_args: Namespace) -> Noneβ "Override to do something useful." The returned value will be returned by the program. Periodt.
π¦ ironicclient.osc.v1.baremetal_shard module π¦
One class in this module and she's serving efficiency.
class ironicclient.osc.v1.baremetal_shard.ListBaremetalShard(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Lister
List baremetal shards. That's the whole thing. Slay. β¨
log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_shard.ListBaremetalShard (WARNING)>β heads up: this class does not list aget_parsermethod in this page, so don't go looking for one, bestie. Just thelogand the action.take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β Run command. Returns a tuple containing the column names and an iterable containing the data to be listed. π
π§ ironicclient.osc.v1.baremetal_volume_connector module π§
Volume connectors, but make it a whole module. Three classes, all absolute icons.
class ironicclient.osc.v1.baremetal_volume_connector.CreateBaremetalVolumeConnector(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
Create a new baremetal volume connector. π
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_volume_connector.CreateBaremetalVolumeConnector (WARNING)>β yes, that is a very long dotted path. Type it out anyway. No shortcuts πtake_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β Run command. Returns a tuple containing the column names and an iterable containing the data to be listed. π«Ά
class ironicclient.osc.v1.baremetal_volume_connector.DeleteBaremetalVolumeConnector(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Unregister baremetal volume connector(s). Note the wording β "Unregister", not "Delete", in the docstring. Keep it exactly π
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_volume_connector.DeleteBaremetalVolumeConnector (WARNING)>β theWARNING-level logger, same long path, no cap.take_action(parsed_args: Namespace) -> Noneβ "Override to do something useful." The returned value will be returned by the program.
class ironicclient.osc.v1.baremetal_volume_connector.ListBaremetalVolumeConnector(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Lister
List baremetal volume connectors. All of them, lined up, vibing. π
get_parser(prog_name: str) -> ArgumentParserβ Return anargparse.ArgumentParser.log: logging.Logger = <Logger ironicclient.osc.v1.baremetal_volume_connector.ListBaremetalVolumeConnector (WARNING)>β that exact path, that exact level.take_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β Run command. Returns a tuple containing the column names and an iterable containing the data to be listed. π₯
class ironicclient.osc.v1.baremetal_volume_connector.SetBaremetalVolumeConnector(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command <#ironicclient.osc.command.Command>
okay so this one's whole personality is: set baremetal volume connector properties π that's the gig, that's the assignment, no notes.
get_parser(prog_name: str) -> ArgumentParserβ literally just hands you back anargparse.ArgumentParser, no cap π«Άlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_volume_connector.SetBaremetalVolumeConnector (WARNING)>β the logger, pre-baked, sitting pretty atWARNINGlevel β¨take_action(parsed_args: Namespace) -> Noneβ docstring says "Override to do something useful." and then "The returned value will be returned by the program." π it's giving "fill in the blank, bestie" β writing this one is on you
class ironicclient.osc.v1.baremetal_volume_connector.ShowBaremetalVolumeConnector(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne <#ironicclient.osc.command.ShowOne>
showing off baremetal volume connector details πΈ main character behavior, honestly.
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserπlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_volume_connector.ShowBaremetalVolumeConnector (WARNING)>β yup, theWARNING-level logger, iconic as evertake_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β runs the command π₯ returns a tuple with the column names and an iterable holding the data to be listed. two-for-one deal, we love to see it
class ironicclient.osc.v1.baremetal_volume_connector.UnsetBaremetalVolumeConnector(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command <#ironicclient.osc.command.Command>
the opposite-girlie of Set: unset baremetal volume connector properties π
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParser, periodtlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_volume_connector.UnsetBaremetalVolumeConnector (WARNING)>β logger,WARNING, you know the drill βtake_action(parsed_args: Namespace) -> Noneβ "Override to do something useful." / "The returned value will be returned by the program." π¦ same energy as its sibling, go make it do the thing
ironicclient.osc.v1.baremetal_volume_target module
class ironicclient.osc.v1.baremetal_volume_target.CreateBaremetalVolumeTarget(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne <#ironicclient.osc.command.ShowOne>
creating a brand-new baremetal volume target β¨ new target, who dis.
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserπ«Άlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_volume_target.CreateBaremetalVolumeTarget (WARNING)>β the logger of record,WARNINGlevel, slaying quietlytake_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β runs the command, hands back a tuple with the column names plus an iterable of the data to be listed π
class ironicclient.osc.v1.baremetal_volume_target.DeleteBaremetalVolumeTarget(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command <#ironicclient.osc.command.Command>
unregistering baremetal volume target(s) π note the (s) β it can be plural, bestie, handle with care.
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserπlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_volume_target.DeleteBaremetalVolumeTarget (WARNING)>β logger,WARNING, present and accounted fortake_action(parsed_args: Namespace) -> Noneβ "Override to do something useful." and yes, "The returned value will be returned by the program." π
class ironicclient.osc.v1.baremetal_volume_target.ListBaremetalVolumeTarget(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Lister <#ironicclient.osc.command.Lister>
listing out baremetal volume targets, one after another π lowkey satisfying.
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserπlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_volume_target.ListBaremetalVolumeTarget (WARNING)>β the logger,WARNING, forever iconictake_action(parsed_args: Namespace) -> tuple[Sequence[str], Iterable[Any]]β runs the command π₯ returns a tuple containing the column names and an iterable containing the data to be listed
class ironicclient.osc.v1.baremetal_volume_target.SetBaremetalVolumeTarget(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command <#ironicclient.osc.command.Command>
setting baremetal volume target properties π same job as before, different resource, iykyk.
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserβlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_volume_target.SetBaremetalVolumeTarget (WARNING)>β logger atWARNING, no thoughts just vibestake_action(parsed_args: Namespace) -> Noneβ "Override to do something useful." / "The returned value will be returned by the program." π¦
class ironicclient.osc.v1.baremetal_volume_target.ShowBaremetalVolumeTarget(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne <#ironicclient.osc.command.ShowOne>
showing baremetal volume target details πΈ the receipts, essentially.
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserπ«Άlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_volume_target.ShowBaremetalVolumeTarget (WARNING)>β logger,WARNING, accounted fortake_action(parsed_args: Namespace) -> tuple[tuple[str, ...], tuple[Any, ...]]β runs the command, returns a tuple containing the column names and an iterable containing the data to be listed π
class ironicclient.osc.v1.baremetal_volume_target.UnsetBaremetalVolumeTarget(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command <#ironicclient.osc.command.Command>
unsetting baremetal volume target properties π§ the un-set, the un-slay, the un-everything.
get_parser(prog_name: str) -> ArgumentParserβ returns anargparse.ArgumentParserπlog: logging.Logger = <Logger ironicclient.osc.v1.baremetal_volume_target.UnsetBaremetalVolumeTarget (WARNING)>β logger,WARNING, chef's kisstake_action(parsed_args: Namespace) -> Noneβ "Override to do something useful." and "The returned value will be returned by the program." π
Module contents
Submodules
ironicclient.osc.command module
Typed base command classes for ironicclient OSC commands. π
okay so this is the whole point: these subclass osc-lib's command classes and annotate app so that self.app.client_manager.baremetal is statically known to be ironicclient.v1.client.Client <#ironicclient.v1.client.Client>, which removes the need for # type: ignore[attr-defined] everywhere across the command implementations π literally deleting busywork.
See <https://review.opendev.org/c/openstack/python-openstackclient/+/970681> for the equivalent pattern in python-openstackclient π
class ironicclient.osc.command.Command(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
app: _Appβ the annotated app attribute, typed and everything β¨log = <Logger ironicclient.osc.command.Command (WARNING)>β aWARNING-level logger, just sitting there
class ironicclient.osc.command.Lister(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command, Lister
log = <Logger ironicclient.osc.command.Lister (WARNING)>β logger,WARNING, as promised π
class ironicclient.osc.command.ShowOne(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command, ShowOne
log = <Logger ironicclient.osc.command.ShowOne (WARNING)>β logger,WARNING, and that's the whole class body bestie π«Ά
ironicclient.osc.plugin module
OpenStackClient plugin for Bare Metal service. π¦
class ironicclient.osc.plugin.ReplaceLatestVersion(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None, deprecated=False)
Bases: Action
Replaces the latest keyword by the last known version π
the lore: OSC cannot accept the literal "latest" as a supported API version, because it breaks the major version detection (OSC tries to load configuration options from the setuptools entrypoint openstack.baremetal.vlatest). So this action swaps "latest" out for the latest known version, and sets the global OS_BAREMETAL_API_LATEST flag appropriately π₯ icon behavior honestly.
build_option_parser(parser: ArgumentParser) -> ArgumentParserβ hook to add global options πmake_client(instance: ClientManager) -> Client <#ironicclient.v1.client.Client>β returns a baremetal service client β¨ that's literally it, that's the function
Module contents
ironicclient.v1 package
Submodules
ironicclient.v1.allocation module
class ironicclient.osc.v1... β sorry bestie, actual one: ironicclient.v1.allocation.Allocation(manager: ManagerProtocol <#ironicclient.common.apiclient.base.ManagerProtocol>, info: dict[str, Any], loaded: bool = False)
Bases: Resource <#ironicclient.common.base.Resource>
(pink flag: no body text in the original here, so no lore to spill β it's just the class declaration, take it as-is π )
class ironicclient.v1.allocation.AllocationManager(api: SessionClient <#ironicclient.common.http.SessionClient>)
Bases: CreateManager <#ironicclient.common.base.CreateManager>[Allocation]
delete(allocation_id: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Noneβ deletes the Allocation π
Parameters:
allocation_idβ the UUID or name of an allocationos_ironic_api_versionβ string version (e.g."1.35") to use for the request. if you don't specify it, the client's default is usedglobal_request_idβ string containing the global request ID header value (in the form"req-<UUID>") to use for the request
get(allocation_id: str, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource <#ironicclient.common.base.Resource> | Noneβ gets an allocation with the specified identifier πΈ
Parameters:
allocation_idβ the UUID or name of an allocationfieldsβ optional, a list with a specified set of fields of the resource to be returned. can not be used when'detail'is set π«Άos_ironic_api_versionβ string version (e.g."1.35") to use for the request. if you don't specify it, the client's default is used
global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request. π
Returns β an Allocation object. π
β¨ list(...) β¨
list(resource_class: str | None = None, state: str | None = None, node: str | None = None, limit: int | None = None, marker: str | None = None, sort_key: str | None = None, sort_dir: str | None = None, fields: list[str] | None = None, owner: str | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[Allocation]
Retrieve a list of allocations. Bestie, this is your shopping list of allocations. ποΈ
Parameters
resource_classβ Optional, get allocations with this resource class.stateβ Optional, get allocations in this state. One ofallocating,activeorerror. Pick your vibe. πnodeβ UUID or name of the node of the allocation. Which node? That node. πmarkerβ Optional, the UUID of an allocation, eg the last allocation from a previous result set. Return the next result set. It's the "continue where we left off" button. βοΈlimitβ The maximum number of results to return per request, if:limit > 0, the maximum number of allocations to return.limit == 0, return the entire list of allocations.limit == None, the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.fieldsβ Optional, a list with a specified set of fields of the resource to be returned.ownerβ Optional, project that owns the allocation. Find your allocation's parent. π«Άos_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used. Choose your API era. β¨global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns β A list of allocations. β¨
Raises InvalidAttribute if a subset of fields is requested with detail option set. π
resource_class β alias of Allocation. π«Ά
πΈ update(...) πΈ
update(allocation_id: str, patch: list[dict[str, Any]], os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource
Updates the Allocation. Only 'name' and 'extra' field are allowed. π¨ Like, the API will literally not let you edit anything else, so don't even try.
Parameters
allocation_idβ The UUID or name of an allocation.patchβ a json PATCH document to apply to this allocation.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
π§ wait(...) π§
wait(allocation_id: str, timeout: int | float = 0, poll_interval: int | float = 1, poll_delay_function: Callable[[int | float], object] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource | None
Wait for the Allocation to become active. It's giving "girl, just wait" energy. β³
Parameters
timeoutβ timeout in seconds, no timeout if0. Zero means forever, which is a choice. π°οΈpoll_intervalβ interval in seconds between polls.poll_delay_functionβ function to use to wait between polls (defaults totime.sleep). Should take one argument - delay time in seconds. Any exceptions raised inside it will abort the wait. So if your custom function throws, the whole wait is cancelled. No cap. πos_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns β updated Allocation object. π
Raises StateTransitionFailed if allocation reaches the error state. π
Raises StateTransitionTimeout on timeout. π
π¦ ironicclient.v1.chassis module π¦
class ironicclient.v1.chassis.Chassis(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource
class ironicclient.v1.chassis.ChassisManager(api: SessionClient)
Bases: CreateManager[Chassis]
delete(chassis_id: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> None
get(chassis_id: str, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource | None
π list(...) π
list(marker: str | None = None, limit: int | None = None, sort_key: str | None = None, sort_dir: str | None = None, detail: bool = False, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[Chassis]
Retrieve a list of chassis. Chassis is already plural, bestie β don't @ me. π
Parameters
markerβ Optional, the UUID of a chassis, eg the last chassis from a previous result set. Return the next result set.limitβ The maximum number of results to return per request, if:limit > 0, the maximum number of chassis to return.limit == 0, return the entire list of chassis.limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.detailβ Optional, boolean whether to return detailed information about chassis. The tea. βfieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set. So pick one, okay? πos_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns β A list of chassis. β¨
π± list_nodes(...) π±
list_nodes(chassis_id: str, marker: str | None = None, limit: int | None = None, sort_key: str | None = None, sort_dir: str | None = None, detail: bool = False, fields: list[str] | None = None, associated: bool | str | None = None, maintenance: bool | str | None = None, provision_state: str | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[Chassis]
List all the nodes for a given chassis. It's giving "who's in this chassis's group chat?" π±
Parameters
chassis_idβ The UUID of the chassis.markerβ Optional, the UUID of a node, eg the last node from a previous result set. Return the next result set.limitβ The maximum number of results to return per request, if:limit > 0, the maximum number of nodes to return.limit == 0, return the entire list of nodes.limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.detailβ Optional, boolean whether to return detailed information about nodes.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.associatedβ Optional. Either a Boolean or a string representation of a Boolean that indicates whether to return a list of associated (Trueor"True") or unassociated (Falseor"False") nodes. Yes, both the bool and the string work. Versatile. πmaintenanceβ Optional. Either a Boolean or a string representation of a Boolean that indicates whether to return nodes in maintenance mode (Trueor"True"), or not in maintenance mode (Falseor"False"). Same deal. π§provision_stateβ Optional. String value to get only nodes in that provision state. Filter by state, queen. πos_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing the global request ID header value (in the form"req-<UUID>") to use for the request.
Returns β a list of nodes. (yes, "nodes", that's literally what the docs say on the chassis manager β we did not write that, we just report it π)
resource_classβ alias ofChassis
update(chassis_id: str, patch: list[dict[str, Any]], os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource
π§ ironicclient.v1.client module
class ironicclient.v1.client.Client(endpoint_override: str | None = None, *args: Any, **kwargs: Any)
Bases: object
The main-character client for the Ironic v1 API π this is the thing you actually instantiate, bestie.
Parameters
endpoint_override(string) β A user-supplied endpoint URL for the ironic service.sessionβ AkeystoneauthSession object β and it must be provided as a keyword argument, no cap, don't try to sneak it in positionally.
property current_api_version: str | list[str]
Returns the current API version in use. β¨
This is the version of the REST API that the API client is presently set to request. Heads up: this value can change as a result of API version negotiation β it's not frozen the second you set it.
property is_api_version_negotiated: bool
Returns True if microversion negotiation has already happened. Simple as that π«Ά
negotiate_api_version() -> str
Triggers negotiation with the remote API endpoint.
Returns β the negotiated API version.
π ironicclient.v1.conductor module
class ironicclient.v1.conductor.Conductor(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource
class ironicclient.v1.conductor.ConductorManager(api: SessionClient)
Bases: Manager[Conductor]
get(hostname: str, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource | None
list(marker: str | None = None, limit: int | None = None, sort_key: str | None = None, sort_dir: str | None = None, fields: list[str] | None = None, detail: bool = False, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[Conductor]
Retrieve a list of conductors ποΈ literally just the conductors, in a list.
Parameters
markerβ Optional, the hostname of a conductor, e.g. the last conductor from a previous result set. Returns the next result set. (pagination's finest π )limitβ Optional. The maximum number of results to return per request, if:limit > 0, the maximum number of ports to return.limit == 0, return the entire list of ports.limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.detailβ Optional, boolean whether to return detailed information about conductors.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing the global request ID header value (in the form"req-<UUID>") to use for the request.
Returns β A list of conductors.
resource_classβ alias ofConductor
π ironicclient.v1.create_resources module
Okay this module is the whole "make a bunch of stuff from a dict / from a file" situation and honestly it's giving bulk-import energy π₯
create_chassis(client: Client, chassis_list: list[dict[str, object]]) -> list[Exception]
Create chassis from dictionaries.
Parameters
clientβ ironic client instance.chassis_listβ list of dictionaries to be POSTed to/chassisendpoint; if some of them contain a"nodes"key, its content is POSTed separately to the/nodesendpoint.
Returns β array of exceptions encountered during creation. (not the created things β the exceptions. feel that π« )
create_nodes(client: Client, node_list: list[dict[str, object]], chassis_uuid: str | None = None) -> list[Exception]
Create nodes from dictionaries.
Parameters
clientβ ironic client instance.node_listβ list of dictionaries to be POSTed to/nodesendpoint; if some of them contain a"ports"key, its content is POSTed separately to/portsendpoint.chassis_uuidβ UUID of a chassis the nodes should be associated with.
Returns β array of exceptions encountered during creation.
create_portgroups(client: Client, portgroup_list: list[dict[str, object]], node_uuid: str) -> list[Exception]
Create port groups from dictionaries.
Parameters
clientβ ironic client instance.portgroup_listβ list of dictionaries to be POSTed to/portgroupsendpoint; if some of them contain a"ports"key, its content is POSTed separately to/portsendpoint.node_uuidβ UUID of a node the port groups should be associated with.
Returns β array of exceptions encountered during creation.
create_ports(client: Client, port_list: list[dict[str, object]], node_uuid: str, portgroup_uuid: str | None = None) -> list[Exception]
Create ports from dictionaries.
Parameters
clientβ ironic client instance.port_listβ list of dictionaries to be POSTed to/portsendpoint.node_uuidβ UUID of a node the ports should be associated with.portgroup_uuidβ UUID of a port group the ports should be associated with, if they are its members.
Returns β array of exceptions encountered during creation.
create_resources(client: Client, filenames: list[str]) -> None
Create resources using their JSON or YAML descriptions πΈ the "here's a file, go wild" entry point.
Parameters
clientβ an instance of ironic client;filenamesβ a list of filenames containing JSON or YAML resources definitions.
Raises β ClientException if any operation during files processing/resource creation fails. So like, keep an eye on that one.
create_single_chassis(client: Client, **params: Any) -> str
Call the client to create a chassis.
Parameters
clientβ ironic client instance.paramsβ dictionary to be POSTed to/chassisendpoint, excluding the"nodes"key.
Returns β UUID of the created chassis or None in case of exception, and an exception, if it appears.
Raises β InvalidAttribute, if some parameters passed to client's create_method are invalid.
Raises β ClientException, if the creation of the chassis fails.
create_single_handler(resource_type: str) -> Callable[[Callable[[...], str]], Callable[[...], tuple[str | None, Exception | None]]]
Catch errors of the creation of a single resource π§ the decorator of all time, honestly.
This decorator appends an error (which is an instance of some client exception class) to the return value of the create_method, changing the return value from just UUID to (UUID, error), and does some exception handling.
Parameters
resource_typeβ string value, the type of the resource being created, e.g.'node', used purely for exception messages.
create_single_node(client: Client, **params: Any) -> str
Call the client to create a node.
Parameters
clientβ ironic client instance.paramsβ dictionary to be POSTed to/nodesendpoint, excluding"ports"and"portgroups"keys.
Returns β UUID of the created node or None in case of exception, and an exception, if it appears.
Raises β InvalidAttribute, if some parameters passed to client's create_method are invalid.
Raises β ClientException, if the creation of the node fails.
create_single_port(client: Client, **params: Any) -> str
Call the client to create a port.
Parameters
clientβ ironic client instance.paramsβ dictionary to be POSTed to/portsendpoint.
Returns β UUID of the created port or None in case of exception, and an exception, if it appears.
Raises β InvalidAttribute, if some parameters passed to client's create_method are invalid.
Raises β ClientException, if the creation of the port fails.
create_single_portgroup(client: Client, **params: Any) -> str
Call the client to create a port group.
Parameters
clientβ ironic client instance.paramsβ dictionary to be POSTed to/portgroupsendpoint, excluding the"ports"key.
Returns β UUID of the created port group or None in case of exception, and an exception, if it appears.
Raises InvalidAttribute, if some parameters passed to client's create_method are invalid.
Raises ClientException, if the creation of the portgroup fails.
ironicclient.v1.create_resources.load_from_file(filename: str) -> dict[str, object]
Okay so this one literally just deserializes JSON or YAML from a file π
Parameters
filenameβ name of the file containing JSON or YAML.
Returns
a dictionary deserialized from JSON or YAML.
Raises ClientException if the file can not be loaded or if its contents is not a valid JSON or YAML, or if the file extension is not supported.
π ironicclient.v1.deploy_template module
class ironicclient.v1.deploy_template.DeployTemplate(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource
class ironicclient.v1.deploy_template.DeployTemplateManager(api: SessionClient)
Bases: CreateManager[DeployTemplate]
delete(template_id: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> None
get(template_id: str, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource | None
list(limit: int | None = None, marker: str | None = None, sort_key: str | None = None, sort_dir: str | None = None, detail: bool = False, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[DeployTemplate]
Retrieve a list of deploy templates π
Parameters
markerβ Optional, the UUID of a deploy template, eg the last template from a previous result set. Return the next result set.limitβ the maximum number of results to return per request, if:limit > 0, the maximum number of deploy templates to return.limit == 0, return the entire list of deploy templates.limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.detailβ Optional, boolean whether to return detailed information about deploy templates.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns
A list of deploy templates.
resource_class
alias of DeployTemplate
update(template_id: str, patch: list[dict[str, Any]], os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource
π§ ironicclient.v1.driver module
class ironicclient.v1.driver.Driver(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource
class ironicclient.v1.driver.DriverManager(api: SessionClient)
Bases: Manager[Driver]
delete(driver_name: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> None
get(driver_name: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None, fields: list[str] | None = None) -> Resource | None
get_vendor_passthru_methods(driver_name: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> dict[str, Any]
list(driver_type: str | None = None, detail: bool | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None, fields: list[str] | None = None) -> list[Driver]
Retrieve a list of drivers π
Parameters
driver_typeβ Optional, string to filter the drivers by type. Value should be'classic'or'dynamic'.detailβ Optional, flag whether to return detailed information about drivers. Default isNonemeans not to send the arg to the server due to older versions of the server cannot handle filtering on detail. (yes, that sentence is a whole mood π)os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.
Returns
A list of drivers.
properties(driver_name: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> dict[str, str]
raid_logical_disk_properties(driver_name: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> dict[str, str]
Returns the RAID logical disk properties for the driver. β¨
Parameters
driver_nameβ Name of the driver.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns
A dictionary containing the properties that can be mentioned for RAID logical disks and a textual description for them. It returns an empty dictionary on error.
resource_class
alias of Driver
update(driver_name: str, patch: list[dict[str, Any]], http_method: str = 'PATCH', os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource
vendor_passthru(driver_name: str, method: str, args: dict[str, Any] | None = None, http_method: str | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource | None
Issue requests for vendor-specific actions on a given driver. This is the "call the driver and ask it to do a thing" button π«Ά
Parameters
driver_nameβ The name of the driver.methodβ Name of the vendor method.argsβ Optional. The arguments to be passed to the method.http_methodβ The HTTP method to use on the request. Defaults toPOST.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
π£ ironicclient.v1.events module
class ironicclient.v1.events.Event(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource
class ironicclient.v1.events.EventManager(api: SessionClient)
Bases: CreateManager[Event]
resource_class
alias of Event
π ironicclient.v1.inspection_rule module
class ironicclient.v1.inspection_rule.InspectionRule(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource
class ironicclient.v1.inspection_rule.InspectionRuleManager(api: SessionClient)
Bases: CreateManager[InspectionRule]
delete(rule_id: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> None
get(rule_id: str, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource | None
list(limit: int | None = None, marker: str | None = None, sort_key: str | None = None, sort_dir: str | None = None, detail: bool = False, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[InspectionRule]
Retrieve a list of rules.
Parameters
markerβ Optional, the UUID of a deploy template, eg the last template from a previous result set. Return the next result set. π literally just "next page bestie"limitβ the max number of results to return per request, and here's the vibe check on how it behaves:limit > 0, the maximum number of rules to return.limit == 0, return the entire list of rules. (all of them. every single one. godspeed π«‘)limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.detailβ Optional, boolean whether to return detailed information about rules.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set. β οΈ like, pick one, bestie.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
π¦ Returns
A list of rules. that's it, that's the return π
π resource_class
alias of InspectionRule β no cap, it's just the same thing wearing a different outfit β¨
π οΈ update
update(rule_id: str, patch: list[dict[str, Any]], os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource
πΈ ironicclient.v1.node module
okay this is the node era of the client and it's honestly kind of the main character π
class ironicclient.v1.node.Node(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource π«Ά
class ironicclient.v1.node.NodeManager(api: SessionClient)
Bases: CreateManager[Node]
This is the manager, aka the one who actually does stuff. Her methods, in order, no crumbs:
π¦ add_trait
add_trait(node_ident: str, trait: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Node | None
Add a trait to a node. giving the node a little personality sticker π
Parameters
node_identβ node UUID or name.traitβ trait to add to the node.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
delete
delete(node_id: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> None
get
get(node_id: str, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Node | None
π§ get_bios_setting
get_bios_setting(node_ident: str, name: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> dict[str, str] | None
Get a BIOS setting from a node. one (1) setting, very demure π
Parameters
node_identβ node UUID or name.nameβ BIOS setting name to get from the node.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
get_boot_device
get_boot_device(node_uuid: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> dict[str, str | bool]
get_by_instance_uuid
get_by_instance_uuid(instance_uuid: str, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Node
get_console
get_console(node_uuid: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> dict[str, bool | dict[str, str] | None]
π get_history_event
get_history_event(node_ident: str, event: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> dict[str, str]
Get a single event record for a node.
Provides the ability to request, and return a node's single event history entry. it's giving scrapbook page energy π
Parameters
node_identβ The name or UUID of the node.eventβ The UUID of the event entry as listed in the node event history list.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
π get_history_list
get_history_list(node_ident: str, detail: bool = False, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[dict[str, str]]
Get node history event list.
Provides the ability to query a node event history list from the API and return the API response to the caller. the whole timeline, bestie β¨
Requires API version 1.78. do not forget, she will not work otherwise π
Parameters
node_identβ The name or UUID of the node.detailβ If detailed data should be returned in the event list entry. DefaultFalse.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
π get_inventory
get_inventory(node_ident: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> dict[str, Any]
Get the hardware inventory of the node. everything she's made of, lowkey iconic π₯
Requires API version 1.81. yes, actually. no, you can't skip it π
Parameters
node_identβ The name or UUID of the node.os_ironic_api_versionβ String version (e.g."1.81") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
get_supported_boot_devices
get_supported_boot_devices(node_uuid: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> dict[str, list[str]]
π·οΈ get_traits
get_traits(node_ident: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[str]
Get traits for a node. all her little badges π
Parameters
node_identβ node UUID or name.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
get_vendor_passthru_methods
get_vendor_passthru_methods(node_ident: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> dict[str, dict[str, bool | str | list[str]]]
inject_nmi
inject_nmi(node_uuid: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Node | None
π list
list(associated: bool | str | None = None, maintenance: bool | str | None = None, marker: str | None = None, limit: int | None = None, detail: bool = False, sort_key: str | None = None, sort_dir: str | None = None, fields: list[str] | None = None, provision_state: str | None = None, driver: str | None = None, resource_class: str | None = None, chassis: str | None = None, fault: str | None = None, os_ironic_api_version: str | None = None, conductor_group: str | None = None, conductor: str | None = None, owner: str | None = None, retired: bool | str | None = None, lessee: str | None = None, shards: list[str] | None = None, sharded: bool | str | None = None, parent_node: str | None = None, include_children: bool | None = None, description_contains: str | None = None, global_request_id: str | None = None, instance_name: str | None = None) -> list[Node]
Retrieve a list of nodes. The big one. The whole roster. π
Parameters
associatedβ Optional. Either a Boolean or a string representation of a Boolean that indicates whether to return a list of associated (Trueor"True") or unassociated (Falseor"False") nodes.maintenanceβ Optional. Either a Boolean or a string representation of a Boolean that indicates whether to return nodes in maintenance mode (Trueor"True"), or not in maintenance mode (Falseor"False").retiredβ Optional. Either a Boolean or a string representation of a Boolean that indicates whether to return retired nodes (Trueor"True").provision_stateβ Optional. String value to get only nodes in that provision state.markerβ Optional, the UUID of a node, eg the last node from a previous result set. Return the next result set.
limitβ.INDENT 2.0The maximum number of results to return per request, if:limit > 0, the maximum number of nodes to return.limit == 0, return the entire list of nodes.limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
detailβ Optional, boolean whether to return detailed information about nodes.sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.driverβ Optional. String value to get only nodes using that driver.resource_classβ Optional. String value to get only nodes with the given resource class set.chassisβ Optional, the UUID of a chassis. Used to get only nodes of this chassis.faultβ Optional. String value to get only nodes with specified fault.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.conductor_groupβ Optional. String value to get only nodes with the given conductor group set.conductorβ Optional. String value to get only nodes mapped to the given conductor.ownerβ Optional. String value to get only nodes mapped to a specific owner.lesseeβ Optional. String value to get only nodes mapped to a specific lessee.shardsβ Optional. A list with a specified set of shards to limit node returns to.shardedβ Optional. Boolean value, when true get only nodes with a non-nullnode.shardvalue, when false get only nodes with a nullnode.shardvalue.Noneis a noop. with a non-nullnode.shardvalue.parent_nodeβ Optional. String value used to retrieve child nodes with the supplied parent node.include_childrenβ Optional. Boolean Value, onlyTrueis valid. Tells the ironic API to enumerate all child nodes which are normally hidden from the node list.description_containsβ Optional. String value to get nodes with description contains specified value.instance_nameβ Optional. String value to get only nodes with the giveninstance_nameset.
Returns A list of nodes.
πΈ list_bios_settings πΈ
list_bios_settings(node_ident: str, detail: bool = False, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[dict[str, str | int | bool | list[str] | None]]
List all BIOS settings from a node.
Parameters
node_identβ node UUID or name.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.detailβ Optional, boolean whether to return detailed information about bios settings.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.
π¦ list_children_of_node π¦
list_children_of_node(node_id: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[str]
Get a list of child nodes for the supplied node_id.
Parameters
node_idβ The name or UUID of a node.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns A list of UUIDs representing child nodes for the supplied node_id..
β list_firmware_components β
list_firmware_components(node_ident: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[dict[str, str]]
List all firmware components from a node.
Parameters
node_identβ node UUID or name.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
π list_ports π
list_ports(node_id: str, marker: str | None = None, limit: int | None = None, sort_key: str | None = None, sort_dir: str | None = None, detail: bool = False, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[Port <#ironicclient.v1.port.Port>]
List all the ports for a given node.
Parameters
node_idβ Name or UUID of the node.markerβ Optional, the UUID of a port, eg the last port from a previous result set. Return the next result set.limitβ.INDENT 2.0The maximum number of results to return per request, if:limit > 0, the maximum number of ports to return.limit == 0, return the entire list of ports.limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.detailβ Optional, boolean whether to return detailed information about ports.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns A list of ports.
π list_volume_connectors π
list_volume_connectors(node_id: str, marker: str | None = None, limit: int | None = None, sort_key: str | None = None, sort_dir: str | None = None, detail: bool = False, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[VolumeConnector <#ironicclient.v1.volume_connector.VolumeConnector>]
List all the volume connectors for a given node.
Parameters
node_idβ Name or UUID of the node.markerβ Optional, the UUID of a volume connector, eg the last volume connector from a previous result set. Return the next result set.limitβ.INDENT 2.0The maximum number of results to return per request, if:limit > 0, the maximum number of volume connectors to return.limit == 0, return the entire list of volume connectors.limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.detailβ Optional, boolean whether to return detailed information about volume connectors.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns A list of volume connectors.
π list_volume_targets π
list_volume_targets(node_id: str, marker: str | None = None, limit: int | None = None, sort_key: str | None = None, sort_dir: str | None = None, detail: bool = False, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[VolumeTarget <#ironicclient.v1.volume_target.VolumeTarget>]
List all the volume targets for a given node.
Parameters
node_idβ Name or UUID of the node.markerβ optional, and it's the UUID of a volume target, like the last volume target from a previous result set. It returns the next result set. Pagination slay πlimitβ the maximum number of results to return per request, if:limit > 0β that's the maximum number of volume targets to return.limit == 0β return the entire list of volume targets. all of them. the whole buffet πlimitparam is NOT specified (None) β the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ optional, the field used for sorting.sort_dirβ optional, direction of sorting, either'asc'(the default) or'desc'.detailβ optional, boolean for whether to return detailed information about volume targets.fieldsβ optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set. pick one, bestie, you can't have both πos_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns π«
A list of volume targets. that's it, that's the tea π
remove_all_traits
remove_all_traits(node_ident: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> None
Remove all traits from a node. like, every single one. scorched earth, but make it polite β¨
Parameters
node_identβ node UUID or name.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
remove_trait
remove_trait(node_ident: str, trait: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> None
Remove one trait from a node. surgical. precise. iconic π
Parameters
node_identβ node UUID or name.traitβ trait to remove from the node.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
resource_class
alias of Node. that's literally the whole vibe check, it's just a nickname for Node π¦
set_boot_device
set_boot_device(node_uuid: str, boot_device: str, persistent: bool = False, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Node <#ironicclient.v1.node.Node> | None
(no extra description on this one in the source β the signature is the whole meal, bestie π«Ά)
set_boot_mode
set_boot_mode(node_id: str, state: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Node <#ironicclient.v1.node.Node> | None
Sets boot mode for a node. very main character energy for a firmware setting π₯
Parameters
node_idβ Node identifierstateβ one of target boot modes,'uefi'or'bios'os_ironic_api_versionβ string version (e.g."1.76") to use for the request. If not specified, the client's default is used. (yes,"1.76"β that's the example this one uses, not a typo, don't come for me π)global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
RaisesValueErrorif boot mode is not one of'uefi'/'bios'β so don't be creative with it π
Returns
The status of the request.
set_console_mode
set_console_mode(node_uuid: str, enabled: bool | str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Node <#ironicclient.v1.node.Node> | None
Set the console mode for the node. on or off, that's the whole plot πΈ
Parameters
node_uuidβ The UUID of the node.enabledβ Either a Boolean or a string representation of a Boolean.Trueto enable the console;Falseto disable.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
set_maintenance
set_maintenance(node_id: str, state: bool | str, maint_reason: str | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Node <#ironicclient.v1.node.Node> | None
Set the maintenance mode for the node. sometimes a node just needs a little spa day πββοΈ
Parameters
node_idβ The UUID of the node.stateβ the maintenance mode; either a Boolean or a string representation of a Boolean (eg,'true','on','false','off').Trueto put the node in maintenance mode;Falseto take the node out of maintenance mode.maint_reasonβ Optional string. Reason for putting node into maintenance mode. receipts, basically πos_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
RaisesInvalidAttributeifstateis an invalid string (that doesn't represent a Boolean). so likeβ¦ don't pass'maybe'π
set_power_state
set_power_state(node_id: str, state: str, soft: bool = False, timeout: int | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Node <#ironicclient.v1.node.Node> | None
Sets power state for a node. the classic on/off/reboot situation, but make it graceful β¨
Parameters
node_idβ Node identifierstateβ one of target power state,'on','off', or'reboot'softβ the flag for graceful power'off'or'reboot'timeoutβ the timeout (in seconds) positive integer value (> 0)os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
RaisesValueErrorif'soft'or'timeout'option is invalid β so no negative seconds, no nonsense, we're not doing that today π«
Returns
The status of the request.
set_provision_state
set_provision_state(node_uuid: str, state: str, configdrive: str | dict[str, Any] | list[Any] | bytes | None = None, cleansteps: list[dict[str, Any]] | None = None, rescue_password: str | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None, deploysteps: list[dict[str, Any]] | None = None, servicesteps: list[dict[str, Any]] | None = None, runbook: str | None = None, disable_ramdisk: bool | str | None = None) -> Node <#ironicclient.v1.node.Node> | None
Set the provision state for the node. this is the big one, the main event, the finale of the whole node lifecycle π
Parameters
node_uuidβ The UUID or name of the node. (yes, or name, she's flexible π)stateβ the desired provision state. One of'active','deleted','rebuild','inspect','provide','manage','clean','abort','rescue','unrescue'.configdriveβ one of:- a gzipped, base64-encoded configuration drive string
- a dictionary to build config drive from
- a path to the configuration drive file (ISO 9660 or VFAT)
- a path to a directory containing the config drive files
- a path to a JSON file to build config from
In case it's a directory, a config drive will be generated from it. In case it's a dictionary or a JSON file, a config drive will be generated on the server side (requires API version 1.56). This is only valid when setting state to 'active'. so basically don't get cute with it at other states π
cleanstepsβ the clean steps as a list of clean-step dictionaries; each dictionary should have keys'interface'and'step', and optional key'args'. This must be specified (and is only valid) when setting provision-state to'clean'. required AND exclusive, she's high maintenance and she's worth it πrescue_passwordβ a string to be used as the login password inside the rescue ramdisk once a node is rescued. This must be specified (and is only valid) when setting'state'to'rescue'.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
heads up bestie:deploysteps,servicesteps,runbookanddisable_ramdiskare all up there in the signature, but the source doesn't spell out descriptions for them here β so I'm not out here inventing lore π
deploystepsβ the deploy steps, as a list of deploy-step dictionaries π each dict needs the keys'interface','step','priority', plus an optional'args'key. This one's optional, and it's only valid when you're setting provision-state to'active'or'rebuild'.servicestepsβ the service steps, as a list of service-step dictionaries π each dict needs'interface','step', and an optional'args'key, for when you're setting an'active'node to'service'.runbookβ the identifier of a predefined runbook to use for provisioning. iykyk.disable_ramdiskβ a Boolean; if you set it to true it will not boot the ironic-python-agent for cleaning. Only valid when setting'state'to'clean'or'service', and only for steps explicitly marked as not requiring the ironic-python-agent can you use this one π
Raises InvalidAttribute if there was an error with the clean steps or deploy steps β so like, if you fumbled something, it tells you.
Returns the status of the request β¨
set_secure_boot
set_secure_boot(node_id: str, state: bool | str,
os_ironic_api_version: str | None = None, global_request_id: str
| None = None) -> Node <#ironicclient.v1.node.Node> | None
Set the secure boot state for the node. Locking it down, bestie π
Parameters
node_idβ the UUID of the node.stateβ the secure boot state; either a Boolean or a string representation of a Boolean (eg,'true','on','false','off'). True to turn secure boot on; False to turn secure boot off. Simple as that.os_ironic_api_versionβ string version (e.g."1.76") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
Raises InvalidAttribute if state is an invalid string (like, one that doesn't represent a Boolean). No vibes-based guessing allowed π
set_target_raid_config
set_target_raid_config(node_ident: str, target_raid_config:
dict[str, Any], os_ironic_api_version: str | None = None,
global_request_id: str | None = None) -> Node <#ironicclient.v1
.node.Node> | None
Sets target_raid_config for a node. RAID glow-up incoming πΈ
Parameters
node_identβ Node identifiertarget_raid_configβ a dictionary with the target RAID configuration; may be empty.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns β status of the request π«Ά
set_traits
set_traits(node_ident: str, traits: list[str],
os_ironic_api_version: str | None = None, global_request_id: str
| None = None) -> Node <#ironicclient.v1.node.Node> | None
Set traits for a node. Giving that node a whole personality β¨
Heads up though: this removes any existing traits and adds the traits passed in to this method. It's giving clean slate, not merge π
Parameters
node_identβ node UUID or name.traitsβ list of traits to add to the node.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
states
states(node_uuid: str, os_ironic_api_version: str | None = None,
global_request_id: str | None = None) -> Node <#ironicclient.v1
.node.Node> | None
That's it, that's the whole entry. Iconic minimalism π
update
update(node_id: str, patch: list[dict[str, Any]] | dict[str, Any]
| None, http_method: str = 'PATCH', os_ironic_api_version: str |
None = None, reset_interfaces: bool | None = None,
global_request_id: str | None = None) -> Node <#ironicclient.v1
.node.Node> | None
No prose here either β just the signature, and http_method defaults to 'PATCH' in case you were wondering π
validate
validate(node_uuid: str, os_ironic_api_version: str | None =
None, global_request_id: str | None = None) -> Node <#
ironicclient.v1.node.Node> | None
Yep, same energy. Short and sweet π¦
vendor_passthru
vendor_passthru(node_id: str, method: str, args: dict[str, Any] |
None = None, http_method: str | None = None,
os_ironic_api_version: str | None = None, global_request_id: str
| None = None) -> Node <#ironicclient.v1.node.Node> | None
Issue requests for vendor-specific actions on a given node. The back door for vendor stuff π
Parameters
node_idβ the UUID of the node.methodβ name of the vendor method.argsβ optional. The arguments to be passed to the method.http_methodβ the HTTP method to use on the request. Defaults to POST.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
vif_attach
vif_attach(node_ident: str, vif_id: str, os_ironic_api_version:
str | None = None, global_request_id: str | None = None,
**kwargs: str) -> None
Attach VIF to a given node. Matchmaker, matchmaker π
Parameters
node_identβ the UUID or Name of the node.vif_idβ the UUID or Name of the VIF to attach.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.kwargsβ a dictionary containing the attributes of the resource that will be created.
vif_detach
vif_detach(node_ident: str, vif_id: str, os_ironic_api_version:
str | None = None, global_request_id: str | None = None) -> None
Detach VIF from a given node. Breaking up, but make it network config π
Parameters
node_identβ the UUID or Name of the node.vif_idβ the UUID or Name of the VIF to detach.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
vif_list
vif_list(node_ident: str, os_ironic_api_version: str | None =
None, global_request_id: str | None = None) -> list[Node <#
ironicclient.v1.node.Node>]
List VIFs attached to a given node. Roll call π
Parameters
node_identβ the UUID or Name of the node.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
wait_for_provision_state
wait_for_provision_state(node_ident: str | list[str],
expected_state: str, timeout: int | float = 0, poll_interval: int
| float = 2, poll_delay_function: Callable[[int | float], object]
| None = None, fail_on_unexpected_state: bool = True,
os_ironic_api_version: str | None = None, global_request_id: str
| None = None) -> None
Helper function to wait for nodes to reach a given state. The "are we there yet" of the Ironic world π
It polls the Ironic API in a loop until the node gets to the requested state.
Fails in the following cases:
- Timeout (if provided) is reached β°
- Node's
last_errorgets set to a non-empty value - Unexpected stable state is reached and
fail_on_unexpected_stateis on - Error state is reached (if it's not equal to
expected_state)
Parameters
node_identβ node UUID or name (one or a list)expected_stateβ expected final provision statetimeoutβ timeout in seconds, no timeout if0poll_intervalβ interval in seconds between 2 pollpoll_delay_functionβ function to use to wait between polls (defaults totime.sleep). Should take one argument β delay time in seconds. Any exceptions raised inside it will abort the wait.fail_on_unexpected_stateβ whether to fail if the nodes reaches a different stable state.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing global request ID header value (in form"req-<UUID>") to use for the request.
Raises StateTransitionFailed if node reached an error state π
Raises StateTransitionTimeout on timeout π
ironicclient.v1.port module π¦
class ironicclient.v1.port.Port(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource
class ironicclient.v1.port.Port(
manager: ManagerProtocol,
info: dict[str, Any],
loaded: bool = False,
)
okay so it's a Resource subclass, that's the whole personality π
class ironicclient.v1.port.PortManager(api: SessionClient)
Bases: CreateManager[Port]
class ironicclient.v1.port.PortManager(api: SessionClient)
delete(port_id: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> None
delete(
port_id: str,
os_ironic_api_version: str | None = None,
global_request_id: str | None = None,
) -> None
get(port_id: str, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Port | None
get(
port_id: str,
fields: list[str] | None = None,
os_ironic_api_version: str | None = None,
global_request_id: str | None = None,
) -> Port | None
get_by_address(address: str, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Port
get_by_address(
address: str,
fields: list[str] | None = None,
os_ironic_api_version: str | None = None,
global_request_id: str | None = None,
) -> Port
list(address: str | None = None, limit: int | None = None, marker: str | None = None, sort_key: str | None = None, sort_dir: str | None = None, detail: bool = False, fields: list[str] | None = None, node: str | None = None, portgroup: str | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[Port]
list(
address: str | None = None,
limit: int | None = None,
marker: str | None = None,
sort_key: str | None = None,
sort_dir: str | None = None,
detail: bool = False,
fields: list[str] | None = None,
node: str | None = None,
portgroup: str | None = None,
os_ironic_api_version: str | None = None,
global_request_id: str | None = None,
) -> list[Port]
Retrieve a list of ports. β¨
Parameters
addressβ Optional, MAC address of a port, to get the port which has this MAC address π«Άmarkerβ Optional, the UUID of a port, eg the last port from a previous result set. Return the next result set.limitβ the max number of results to return per request, if:limit > 0, the maximum number of ports to return.limit == 0, return the entire list of ports.limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.detailβ Optional, boolean whether to return detailed information about ports.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.nodeβ Optional, name or UUID of a node. Used to get ports of this node.portgroupβ Optional, name or UUID of a portgroup. Used to get ports of this portgroup.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns
A list of ports π
resource_class
alias of Port
update(port_id: str, patch: list[dict[str, Any]], os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Port
update(
port_id: str,
patch: list[dict[str, Any]],
os_ironic_api_version: str | None = None,
global_request_id: str | None = None,
) -> Port
ironicclient.v1.portgroup module πΈ
class ironicclient.v1.portgroup.Portgroup(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource
class ironicclient.v1.portgroup.Portgroup(
manager: ManagerProtocol,
info: dict[str, Any],
loaded: bool = False,
)
class ironicclient.v1.portgroup.PortgroupManager(api: SessionClient)
Bases: CreateManager[Portgroup]
class ironicclient.v1.portgroup.PortgroupManager(api: SessionClient)
delete(portgroup_id: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> None
delete(
portgroup_id: str,
os_ironic_api_version: str | None = None,
global_request_id: str | None = None,
) -> None
Delete the Portgroup from the DB. it's gone, bestie, poof π
Parameters
portgroup_idβ The UUID or name of a portgroup.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
get(portgroup_id: str, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Portgroup | None
get(
portgroup_id: str,
fields: list[str] | None = None,
os_ironic_api_version: str | None = None,
global_request_id: str | None = None,
) -> Portgroup | None
Get a port group with the specified identifier π
Parameters
portgroup_idβ The UUID or name of a portgroup.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns
a Portgroup object π«Ά
get_by_address(address: str, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Portgroup
get_by_address(
address: str,
fields: list[str] | None = None,
os_ironic_api_version: str | None = None,
global_request_id: str | None = None,
) -> Portgroup
Get a port group with the specified MAC address π
Parameters
addressβ The MAC address of a portgroup.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns
a Portgroup object π
list(node: str | None = None, address: str | None = None, limit: int | None = None, marker: str | None = None, sort_key: str | None = None, sort_dir: str | None = None, detail: bool = False, fields: list[str] | None = None, shards: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[Portgroup]
list(
node: str | None = None,
address: str | None = None,
limit: int | None = None,
marker: str | None = None,
sort_key: str | None = None,
sort_dir: str | None = None,
detail: bool = False,
fields: list[str] | None = None,
shards: list[str] | None = None,
os_ironic_api_version: str | None = None,
global_request_id: str | None = None,
) -> list[Portgroup]
Retrieve a list of portgroups. β¨
Parameters
nodeβ Optional, UUID or name of a node, to get the portgroups for that node.addressβ Optional, MAC address of a portgroup, to get the portgroup which has this MAC address.markerβ Optional, the UUID of a portgroup, eg the last portgroup from a previous result set. Return the next result set.limitβ the max number of results to return per request, if:limit > 0, the maximum number of portgroups to return.limit == 0, return the entire list of portgroups.limit == None, the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.detailβ Optional, boolean whether to return detailed information about portgroups.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.shardsβ Optional, a list of shards to filter portgroups by. Only portgroups associated with nodes in these shards will be returned.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns
A list of portgroups π
Raises InvalidAttribute if a subset of fields is requested with detail option set.
fr fr do NOT setdetailand pass afieldssubset at the same time, it will throw at you and it will not be cute π
list_ports(portgroup_id: str, marker: str | None = None, limit: int | None = None, sort_key: str | None = None, sort_dir: str | None = None, detail: bool = False, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[Portgroup]
list_ports(
portgroup_id: str,
marker: str | None = None,
limit: int | None = None,
sort_key: str | None = None,
sort_dir: str | None = None,
detail: bool = False,
fields: list[str] | None = None,
os_ironic_api_version: str | None = None,
global_request_id: str | None = None,
) -> list[Portgroup]
List all the ports for a given portgroup π¦
Parameters
portgroup_idβ Name or UUID of the portgroup.markerβ Optional, the UUID of a port, eg the last port from a previous result set. Return the next result set.limitβ the max number of results to return per request, if:limit > 0, the maximum number of ports to return.limit == 0, return the entire list of ports.limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ optional, the field you wanna sort by.sort_dirβ optional, which direction to sort: either'asc'(the default, bestie π ) or'desc'.detailβ optional boolean, do you want the detailed tea about the ports or not.fieldsβ optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set β pick one, not both, no cap πos_ironic_api_versionβ string version (e.g."1.35") to use for the request. Don't specify it and the client's default is used.global_request_idβ string containing the global request ID header value (in the form"req-<UUID>") to use for the request.
Returns
A list of ports. that's it, that's the payoff π
resource_class
alias of Portgroup β literally the same thing wearing a different name, iykyk β¨
update(portgroup_id: str, patch: list[dict[str, Any]], os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Portgroup
Update the Portgroup. glow-up time π
Parameters
portgroup_idβ the UUID or name of a portgroup.patchβ the patch request with the updates in it.os_ironic_api_versionβ string version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ string containing the global request ID header value (in the form"req-<UUID>") to use for the request.
π¦ ironicclient.v1.resource_fields module
class ironicclient.v1.resource_fields.Resource(field_ids: list[str], sort_excluded: list[str] | None = None, override_labels: dict[str, str] | None = None)
Bases: object β yes literally just object, humble of it honestly π«Ά
Resource class
So this class is the whole manager of the various fields that a resource (think Chassis, Node, Port) contains. Each individual field is made of a 'field_id' (that's the key) and a 'label' (that's the value). The caller only provides the 'field_ids' when instantiating the object β the labels come along for the ride.
The ordering of the 'field_ids' is preserved exactly as the caller specified it. no shuffling, no sorting, we respect the order periodt π
It also gives you the ability to exclude some of these fields when they're being used for sorting. handy.
FIELDS: dict[str, str] β the full lookup table, in all its glory:
FIELDS: dict[str, str] = {'actions': 'Actions', 'address': 'Address', 'alive': 'Alive', 'allocation_uuid': 'Allocation UUID', 'allowable_values': 'Allowable Values', 'async': 'Async', 'attach': 'Response is attachment', 'attribute_type': 'Attribute Type', 'automated_clean': 'Automated Clean', 'bios_interface': 'BIOS Interface', 'boot_index': 'Boot Index', 'boot_interface': 'Boot Interface', 'boot_mode': 'Boot Mode', 'candidate_nodes': 'Candidate Nodes', 'category': 'Category', 'chassis_uuid': 'Chassis UUID', 'children': 'Child Nodes', 'clean_step': 'Clean Step', 'conditions': 'Conditions', 'conductor': 'Conductor', 'conductor_group': 'Conductor Group', 'connector_id': 'Connector ID', 'console_enabled': 'Console Enabled', 'console_interface': 'Console Interface', 'count': 'Count', 'created_at': 'Created At', 'default_bios_interface': 'Default BIOS Interface', 'default_boot_interface': 'Default Boot Interface', 'default_console_interface': 'Default Console Interface', 'default_deploy_interface': 'Default Deploy Interface', 'default_firmware_interface': 'Default Firmware Interface', 'default_inspect_interface': 'Default Inspect Interface', 'default_management_interface': 'Default Management Interface', 'default_network_interface': 'Default Network Interface', 'default_power_interface': 'Default Power Interface', 'default_raid_interface': 'Default RAID Interface', 'default_rescue_interface': 'Default Rescue Interface', 'default_storage_interface': 'Default Storage Interface', 'default_vendor_interface': 'Default Vendor Interface', 'deploy_interface': 'Deploy Interface', 'deploy_step': 'Deploy Step', 'description': 'Description', 'disable_power_off': 'Disable Power Off', 'disable_ramdisk': 'Disable Ramdisk', 'driver': 'Driver', 'driver_info': 'Driver Info', 'driver_internal_info': 'Driver Internal Info', 'drivers': 'Drivers', 'duration_seconds': 'Duration (seconds)', 'enabled_bios_interfaces': 'Enabled BIOS Interfaces', 'enabled_boot_interfaces': 'Enabled Boot Interfaces', 'enabled_console_interfaces': 'Enabled Console Interfaces', 'enabled_deploy_interfaces': 'Enabled Deploy Interfaces', 'enabled_firmware_interfaces': 'Enabled Firmware Interfaces', 'enabled_inspect_interfaces': 'Enabled Inspect Interfaces', 'enabled_management_interfaces': 'Enabled Management Interfaces', 'enabled_network_interfaces': 'Enabled Network Interfaces', 'enabled_power_interfaces': 'Enabled Power Interfaces', 'enabled_raid_interfaces': 'Enabled RAID Interfaces', 'enabled_rescue_interfaces': 'Enabled Rescue Interfaces', 'enabled_storage_interfaces': 'Enabled Storage Interfaces', 'enabled_vendor_interfaces': 'Enabled Vendor Interfaces', 'event': 'Description of the event', 'event_type': 'Event Origin Type', 'extra': 'Extra', 'fault': 'Fault', 'firmware_interface': 'Firmware Interface', 'health': 'Health', 'hostname': 'Hostname', 'hosts': 'Active host(s)', 'http_methods': 'Supported HTTP methods', 'id': 'ID', 'inspect_interface': 'Inspect Interface', 'inspection_finished_at': 'Inspection Finished At', 'inspection_started_at': 'Inspection Started At', 'instance_info': 'Instance Info', 'instance_name': 'Instance Name', 'instance_uuid': 'Instance UUID', 'internal_info': 'Internal Info', 'is_smartnic': 'Is Smart NIC port', 'last_error': 'Last Error', 'lessee': 'Lessee', 'local_link_connection': 'Local Link Connection', 'lower_bound': 'Lower Bound', 'maintenance': 'Maintenance', 'maintenance_reason': 'Maintenance Reason', 'management_interface': 'Management Interface', 'max_length': 'Maximum Length', 'min_length': 'Minimum Length', 'mode': 'Mode', 'name': 'Name', 'network_data': 'Network Configuration', 'network_interface': 'Network Interface', 'node_uuid': 'Node UUID', 'owner': 'Owner', 'parent_node': 'Parent Node', 'phase': 'Phase', 'physical_network': 'Physical Network', 'portgroup_uuid': 'Portgroup UUID', 'power_interface': 'Power Interface', 'power_state': 'Power State', 'priority': 'Priority', 'project': 'Project', 'properties': 'Properties', 'protected': 'Protected', 'protected_reason': 'Protected Reason', 'provision_state': 'Provisioning State', 'provision_updated_at': 'Provision Updated At', 'public': 'Public', 'pxe_enabled': 'PXE boot enabled', 'raid_config': 'Current RAID configuration', 'raid_interface': 'RAID Interface', 'read_only': 'Read Only', 'rescue_interface': 'Rescue Interface', 'reservation': 'Reservation', 'reset_required': 'Reset Required', 'resource_class': 'Resource Class', 'retired': 'Retired', 'retired_reason': 'Retired Reason', 'secure_boot': 'Secure Boot', 'sensitive': 'Sensitive', 'severity': 'Severity', 'standalone_ports_supported': 'Standalone Ports Supported', 'state': 'State', 'steps': 'Steps', 'storage_interface': 'Storage Interface', 'target_power_state': 'Target Power State', 'target_provision_state': 'Target Provision State', 'target_raid_config': 'Target RAID configuration', 'traits': 'Traits', 'type': 'Type', 'unique': 'Unique', 'updated_at': 'Updated At', 'upper_bound': 'Upper Bound', 'user': 'User', 'uuid': 'UUID', 'value': 'Value', 'vendor': 'Vendor', 'vendor_interface': 'Vendor Interface', 'volume_id': 'Volume ID', 'volume_type': 'Driver Volume Type'}
Properties β little computed cuties, all tuples of str:
fields: tuple[str, ...]labels: tuple[str, ...]sort_fields: tuple[str, ...]sort_labels: tuple[str, ...]
π ironicclient.v1.runbook module
class ironicclient.v1.runbook.Runbook(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource (ironicclient.common.base.Resource) π§
class ironicclient.v1.runbook.RunbookManager(api: SessionClient)
Bases: CreateManager[Runbook] (ironicclient.common.base.CreateManager) π
add_trait(runbook_ident: str, trait: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Runbook | None
Add a trait to a runbook. give it a little accessory π
Requires API version 1.112 or later. no version, no trait, that's the rule bestie.
Parameters
runbook_identβ runbook UUID or name.traitβ the trait to add to the runbook.os_ironic_api_versionβ string version (e.g."1.112") to use for the request. If not specified, the client's default is used.global_request_idβ string containing the global request ID header value (in the form"req-<UUID>") to use for the request.
delete(runbook_id: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> None
get(runbook_id: str, fields: list[str] | None = None, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> Resource | None
get_traits(runbook_ident: str, os_ironic_api_version: str | None = None, global_request_id: str | None = None) -> list[str]
Get traits for a runbook. the full accessory collection π₯
Requires API version 1.112 or later. same deal, don't forget it.
Parameters
runbook_identβ runbook UUID or name.os_ironic_api_versionβ string version (e.g."1.112") to use for the request. If not specified, the client's default is used.global_request_idβ string containing the global request ID header value (in the form"req-<UUID>") to use for the request.
list(limit: int | None = None, marker: str | None = None,
sort_key: str | None = None, sort_dir: str | None = None, detail:
bool = False, fields: list[str] | None = None,
os_ironic_api_version: str | None = None, global_request_id: str
| None = None, project: str | None = None, public: bool | None =
None) -> list[Runbook]
Okay so this is the runbook list β retrieve a list of runbooks β¨ (and yeah, project and public are sitting right there in the signature, the param list below just doesn't spell them out β clock the signature, bestie π).
Parameters:
markerβ Optional, the UUID of a deploy template, eg the last template from a previous result set. Return the next result set.limitβ The maximum number of results to return per request, if:limit > 0, the maximum number of runbooks to return.limit == 0, return the entire list of runbooks.limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.detailβ Optional, boolean whether to return detailed information about runbooks.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns β a list of runbooks. slay π
remove_all_traits(runbook_ident: str, os_ironic_api_version: str
| None = None, global_request_id: str | None = None) -> None
Remove all the traits from a runbook. Like, every single one, gone π
Requires API version 1.112 or later. Don't skip the vibe check on that one, fr fr.
Parameters:
runbook_identβ runbook UUID or name.os_ironic_api_versionβ String version (e.g."1.112") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
remove_trait(runbook_ident: str, trait: str,
os_ironic_api_version: str | None = None, global_request_id: str
| None = None) -> None
Remove one trait from a runbook β targeted, surgical, main character energy π―
Also requires API version 1.112 or later, same deal as above.
Parameters:
runbook_identβ runbook UUID or name.traitβ trait to remove from the runbook.os_ironic_api_versionβ String version (e.g."1.112") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
resource_class β alias of Runbook. That's it, that's the whole thing π«Ά
update(runbook_id: str, patch: list[dict[str, Any]],
os_ironic_api_version: str | None = None, global_request_id: str
| None = None) -> Resource
π ironicclient.v1.shard module π
class ironicclient.v1.shard.Shard(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource π
class ironicclient.v1.shard.ShardManager(api: SessionClient)
Bases: Manager[Shard]
list(os_ironic_api_version: str | None = None, global_request_id:
str | None = None) -> list[Shard]
Retrieve a list of shards β¨
Parameters:
os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns β A list of conductors.
Not even joking, that's what it says. Shards in, conductors out π iconic documentation moment, we keep it exactly as it is π
resource_class β alias of Shard.
π¦ ironicclient.v1.utils module π¦
(that's the whole section babe, it's just vibes and a heading π )
π ironicclient.v1.volume_connector module π
class ironicclient.v1.volume_connector.VolumeConnector(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource πΈ
class ironicclient.v1.volume_connector.VolumeConnectorManager(api: SessionClient)
Bases: CreateManager[VolumeConnector]
delete(volume_connector_id: str, os_ironic_api_version: str |
None = None, global_request_id: str | None = None) -> None
get(volume_connector_id: str, fields: list[str] | None = None,
os_ironic_api_version: str | None = None, global_request_id: str
| None = None) -> Resource | None
list(node: str | None = None, limit: int | None = None, marker:
str | None = None, sort_key: str | None = None, sort_dir: str |
None = None, detail: bool = False, fields: list[str] | None =
None, os_ironic_api_version: str | None = None,
global_request_id: str | None = None) -> list[VolumeConnector]
Retrieve a list of volume connector. Yes, connector, singular-ish, we don't judge grammar here π«Ά
Parameters:
nodeβ Optional, UUID or name of a node, to get volume connectors for this node only.markerβ Optional, the UUID of a volume connector, eg the last volume connector from a previous result set. Return the next result set.limitβ The maximum number of results to return per request, if:limit > 0, the maximum number of volume connectors to return.limit == 0, return the entire list of volume connectors.limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ Optional, direction of sorting, either'asc'(the default) or'desc'.detailβ Optional, boolean whether to return detailed information about volume connectors.fieldsβ Optional, a list with a specified set of fields of the resource to be returned. Can not be used when'detail'is set.os_ironic_api_versionβ String version (e.g."1.35") to use for the request. If not specified, the client's default is used.global_request_idβ String containing global request ID header value (in form"req-<UUID>") to use for the request.
Returns β A list of volume connectors. periodt π
resource_class β alias of VolumeConnector.
update(volume_connector_id: str, patch: list[dict[str, Any]],
os_ironic_api_version: str | None = None, global_request_id: str
| None = None) -> Resource
π₯ ironicclient.v1.volume_target module π₯
class ironicclient.v1.volume_target.VolumeTarget(manager: ManagerProtocol, info: dict[str, Any], loaded: bool = False)
Bases: Resource β
class ironicclient.v1.volume_target.VolumeTargetManager(api: SessionClient)
Bases: CreateManager[VolumeTarget]
delete(volume_target_id: str, os_ironic_api_version: str | None =
None, global_request_id: str | None = None) -> None
get(volume_target_id: str, fields: list[str] | None = None,
os_ironic_api_version: str | None = None, global_request_id: str
| None = None) -> Resource | None
list(node: str | None = None, limit: int | None = None, marker:
str | None = None, sort_key: str | None = None, sort_dir: str |
None = None, detail: bool = False, fields: list[str] | None =
None, os_ironic_api_version: str | None = None,
global_request_id: str | None = None) -> list[VolumeTarget]
Retrieve a list of volume target π
Parameters:
nodeβ Optional, UUID or name of a node, to get volume targets for this node only.markerβ Optional, the UUID of a volume target, eg the last volume target from a previous result set. Return the next result set.limitβ The maximum number of results to return per request, if:limit > 0, the maximum number of volume targets to return.limit == 0, return the entire list of volume targets.limitparam is NOT specified (None), the number of items returned respect the maximum imposed by the Ironic API (see Ironic'sapi.max_limitoption).
sort_keyβ Optional, field used for sorting.sort_dirβ optional, and it's literally just the direction of sorting: either'asc'(which is the default, bestie) or'desc'. that's it. πdetailβ optional boolean, and it controls whether you get detailed info about volume targets. fancy mode: on or off πfieldsβ optional, a list with a specified set of fields of the resource to be returned. β οΈ heads up: can not be used when'detail'is set. pick a lane, queen.os_ironic_api_versionβ a String version (e.g."1.35") to use for the request. if you don't specify it, the client's default is what you get. no cap β¨global_request_idβ a String containing the global request ID header value (in form"req-<UUID>") to use for the request. tracking queen π
Returns
a list of volume targets. that's the whole payoff. π¦
resource_class
alias of VolumeTarget. it's giving "same energy, different name" π«
update(volume_target_id: str, patch: list[dict[str, Any]],
os_ironic_api_version: str | None = None, global_request_id: str
| None = None) -> Resource
π Module contents
okay so this section is lowkey the index of everything β it says Module contents, then Submodules, and then it dishes out each submodule one by one. let's go π
π§© ironicclient.client module
ironicclient.client.Client
Client(version: str, endpoint_override: str | None = None,
session: Session | None = None, *args: Any, **kwargs: Any) -> Client
create a client of an appropriate version.
π«Ά real talk: this call requires a session. if you want it to be created for you, use get_client instead.
Parameters
endpoint_overrideβ a bare metal endpoint to use.sessionβ a keystoneauth session to use. this argument is actually required and is marked optional only for backward compatibility. the audacity, honestly πargsβ other arguments to pass to the HTTP client. not recommended, usekwargsinstead. please, i'm begging π₯Ίkwargsβ other keyword arguments to pass to the HTTP client (e.g.insecure).
ironicclient.client.get_client
get_client(api_version: str, auth_type: str | None = None,
os_ironic_api_version: str | None = None, max_retries: int | None = None,
retry_interval: int | None = None, session: Session | None = None,
valid_interfaces: str | list[str] | None = None, interface: str |
list[str] | None = None, service_type: str | None = None, region_name:
str | None = None, additional_headers: dict[str, str] | None = None,
global_request_id: str | None = None, **kwargs: Any) -> Client
get an authenticated client, based on the credentials. this is the one that does the whole glow-up for you β¨
Parameters
api_versionβ the API version to use. Valid value:'1'. yes, just the one. iconic minimalism πauth_typeβ type of keystoneauth auth plugin loader to use.os_ironic_api_versionβ ironic API version to use.max_retriesβ maximum number of retries in case of conflict error. perseverance queen π₯retry_intervalβ amount of time (in seconds) between retries in case of conflict error.sessionβ an existing keystoneauth session. will be created fromkwargsif not provided. she's flexible like that π§valid_interfacesβ list of valid endpoint interfaces to use if the bare metal endpoint is not provided.interfaceβ an alias forvalid_interfaces. twins fr fr π―service_typeβ bare metal endpoint service type.region_nameβ name of the region to use when searching the bare metal endpoint. geographically slaying πΈadditional_headersβ additional headers that should be attached to every request passing through the client. headers of the same name specified per request will take priority. main character headers only πglobal_request_idβ a header (in the form ofreq-$uuid) that will be passed on all requests. enables cross project request id tracking. that's cross-project, bestie, she's connected πkwargsβ all the other params that are passed to keystoneauth for session construction.
π ironicclient.exc module
ironicclient.exc.AmbigiousAuthSystem
alias of AmbiguousAuthSystem. yes the typo is canon, we do not touch it. π
exception ironicclient.exc.AmbiguousAuthSystem
Bases: ClientException
could not obtain token and endpoint using provided credentials. the credentials said "no β€οΈ" π
exception ironicclient.exc.InvalidAttribute
Bases: ClientException
(it's giving mysterious. no description given, just vibes π)
exception ironicclient.exc.StateTransitionFailed
Bases: ClientException
failed to reach a requested provision state. so close, yet so far π₯²
exception ironicclient.exc.StateTransitionTimeout
Bases: ClientException
timed out while waiting for a requested provision state. she waited, she ghosted π
ironicclient.exc.from_response
from_response(response: Response, message: str | None = None,
traceback: str | None = None, method: str | None = None,
url: str | None = None) -> HttpError
return an HttpError instance based on response from httplib/requests. turning that L into a legible error message π«Ά
π ironicclient.shell module
class ironicclient.shell.App
Bases: App
build_option_parser
build_option_parser(description: str | None, version: str | None,
argparse_kwargs: dict[str, object] | None = None) -> ArgumentParser
return an argparse option parser for this application.
subclasses may override this method to extend the parser with more global options. go off, subclass π
Parameters
description(str) β full description of the applicationversion(str) β version number for the applicationargparse_kwargsβ extra keyword argument passed to theArgumentParserconstructor
initialize_app
initialize_app(argv: list[str]) -> None
hook for subclasses to take global initialization action after the arguments are parsed but before a command is run. invoked only once, even in interactive mode. one and done, no reruns β¨
Parameters
argvβ List of arguments, including the subcommand to run. Empty for interactive mode.
class ironicclient.shell.ClientManager
ClientManager(cloud_region: CloudRegion, options: Namespace)
Bases: object
property baremetal: Client
class ironicclient.shell.CommandManager
CommandManager(namespace: str | None = None, convert_underscores: bool = True,
*, ignored_modules: Iterable[str] | None = None)
Bases: CommandManager
load_commands
load_commands(namespace: str) -> None
load all the commands from an entrypoint π₯
Parameters
namespaceβ The namespace to load commands from.
Returns
None
ironicclient.shell.main
main(argv: list[str] = ['-M', 'man', 'doc/source', '.sphinx/man', '-v']) -> int
(that default argv is not a drill, it's literally right there π)
π INDICES AND TABLES
the navigation trio, absolutely serving:
- Index
- Module Index
- Search Page
ποΈ Author
Author name not set β anonymous icon behavior, honestly kind of mysterious π
Β© Copyright
OpenStack Foundation
okay bestie that's the whole page, we ate and left zero crumbs πβ¨ this was the 6.3.0 version of PYTHON-IRONICCLIENT(1), dated Jan 02, 1980 (yes, really, the date is camp π), and it's filed under the name PYTHON-IRONICCLIENT(1). mwah, go build something iconic π«Άπ
π¦ where this page comes from
- nixpkgs unstable: python3.13-python-ironicclient 6.3.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms