If we ever use released ironic-inspector, we'll not be able to test new features until they're released in ironic-inspector. It slows down the development, and is also inconsistent with other projects. tl;dr we'll use ironic-inspector git master for functional testing. Change-Id: I7bf4b2a434f1976676ad6570071a30e1f8ba9fd0
Ironic Inspector Client
This is a client library and tool for Ironic Inspector.
Install from PyPI:
pip install python-ironic-inspector-client
Please follow usual OpenStack Gerrit Workflow to submit a patch, see Inspector contributing guide for more detail.
Usage
CLI tool is based on OpenStackClient
with prefix openstack baremetal introspection. Accepts
optional argument --inspector-url with the Ironic
Inspector API endpoint.
Start introspection on a node:
ironic_inspector_client.introspect(uuid, new_ipmi_username=None, new_ipmi_password=None)$ openstack baremetal introspection start UUID [--new-ipmi-password=PWD [--new-ipmi-username=USER]]uuid- Ironic node UUID;new_ipmi_usernameandnew_ipmi_password- if these are set, Ironic Inspector will switch to manual power on and assigning IPMI credentials on introspection. See Setting IPMI Credentials for details.
Query introspection status:
ironic_inspector_client.get_status(uuid)$ openstack baremetal introspection status UUIDuuid- Ironic node UUID.
Every call accepts additional optional arguments:
base_urlIronic Inspector API endpoint, defaults to127.0.0.1:5050,auth_tokenKeystone authentication token.api_versionrequested API version; can be a tuple (MAJ, MIN), string "MAJ.MIN" or integer (only major). Defaults toDEFAULT_API_VERSION.
Refer to HTTP-API.rst for information on the Ironic Inspector HTTP API.
API Versioning
Starting with version 2.1.0 Ironic Inspector supports optional API versioning. Version is a tuple (X, Y), where X is always 1 for now.
The server has maximum and minimum supported versions. If no version is requested, the server assumes (1, 0).
There is a helper function to figure out the current server API versions range:
ironic_inspector_client.server_api_versions()Returns a tuple (minimum version, maximum version). Supports optional argument:
base_urlIronic Inspector API endpoint, defaults to127.0.0.1:5050,
Two constants are exposed by the client:
DEFAULT_API_VERSIONserver API version used by default, always (1, 0) for now.MAX_API_VERSIONmaximum API version this client was designed to work with. This does not mean that other versions won't work at all - the server might still support them.