Skip to main content

Python client for Ironic Inspector

Project description

This is a client library and tool for Ironic Inspector.

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_username and new_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 UUID
    • uuid - Ironic node UUID.

Every call accepts additional optional arguments:

  • base_url Ironic Inspector API endpoint, defaults to 127.0.0.1:5050,

  • auth_token Keystone authentication token.

  • api_version requested API version; can be a tuple (MAJ, MIN), string “MAJ.MIN” or integer (only major). Defaults to DEFAULT_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_url Ironic Inspector API endpoint, defaults to 127.0.0.1:5050,

Two constants are exposed by the client:

  • DEFAULT_API_VERSION server API version used by default, always (1, 0) for now.

  • MAX_API_VERSION maximum 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.

Project details


Download files

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

Source Distribution

python-ironic-inspector-client-1.1.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file python-ironic-inspector-client-1.1.0.tar.gz.

File metadata

File hashes

Hashes for python-ironic-inspector-client-1.1.0.tar.gz
Algorithm Hash digest
SHA256 11623a2316770ffc4e7131e45682107b9d44cefbfcae1eb004901df231db1969
MD5 e162279d0fab69f4b954f7335e9b4d5d
BLAKE2b-256 aa245da13a2cae4e3ba019d2fe7ab15f4e7c490f1c8e3d7e98dc1ab21d8131fd

See more details on using hashes here.

Provenance

File details

Details for the file python_ironic_inspector_client-1.1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for python_ironic_inspector_client-1.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 10a63f8a0c716770a078bfb5c7bbf7397a062fc51ac3d349a9a4cdfec1406263
MD5 db51c693714a0e0eb31aaf881068be9f
BLAKE2b-256 cceb92646a116dbe88d06376bc2a4ba9d637130c46e1f98de31b92a347dd7d36

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page