python-ironicclient is the official Python client library for the OpenStack Ironic API, which provides bare metal provisioning services. It offers a Python API for programmatic interaction and integrates with the `openstack baremetal` command-line interface. The current stable version is 6.0.0, actively maintained within the OpenStack project, with releases generally aligned with the OpenStack release cycle (typically every six months).
pip install python-ironicclientVerified import paths — ran on the pinned version, not inferred.
Initializes the Ironic client using an authentication token and the Ironic API endpoint, then attempts to list all bare metal nodes. Environment variables are used for sensitive credentials.
Use `openstack baremetal <subcommand>` after installing `python-openstackclient` or `python-ironicclient[cli]`.
Migrate to using Ironic's built-in in-band inspection capabilities instead of relying on the deprecated `ironic-inspector-client`.
Ensure `os_auth_token` is a valid Keystone token and `ironic_url` points to the correct Ironic API endpoint (e.g., `http://<ironic-host>:6385/`).
Verify the `ironic_url` (default port is 6385) is correct and that the Ironic API service is running and accessible from where the client is executed. Check firewall rules and network routes.
Ensure the Ironic service is registered in Keystone and its endpoint is correctly configured. Verify the `region_name` if explicitly provided, or ensure the default region is correct for your OpenStack deployment.
Ensure you are initializing the client with a supported API version, e.g., `client.get_client(1, **kwargs)`. Consult Ironic API documentation for the correct microversion usage if needed.