As agreed on the summit I'm renaming the python modules and doing some adjustments: * This is a breaking change, so version is bumped to 2.0.0 * Used this chance to split conf options over proper sections * RELEASES.rst is gone; it's too hard to keep it up-to-date; anyway git does better job at doing history * Dropped deprecated option ports_for_inactive_interfaces * Dropped old /v1/discover endpoint and associated client call * No longer set on_discovery and newly_discovered in Node.extra (deprecated since 1.0.0, superseded by the get status API) * Default firewall chain name is "ironic-inspector" and is configurable Notes: * Some links will be updated after real move. * Stable branches will probably use the old name. * Some usage of discovery word is left in context of "discovered data" * DIB element will probably be deprecated, so leaving it alone for now. * Some usages of word "discovery" in the README will be updated later to make this patch a bit smaller * Ramdisk code will be moved to IPA, so not touching it too much Change-Id: I59f1f5bfb1248ab69973dab845aa028df493054e
3.3 KiB
HTTP API
By default ironic-inspector listens on
0.0.0.0:5050
, port can be changed in configuration.
Protocol is JSON over HTTP.
The HTTP API consist of these endpoints:
Start Introspection
POST /v1/introspection/<UUID>
initiate hardware
introspection for node <UUID>
. All power management
configuration for this node needs to be done prior to calling the
endpoint (except when Setting
IPMI Credentials).
Requires X-Auth-Token header with Keystone token for authentication.
Optional parameters:
new_ipmi_password
if set, ironic-inspector will try to set IPMI password on the machine to this value. Power credentials validation will be skipped and manual power on will be required. See Setting IPMI credentials for details.new_ipmi_username
provides new IPMI user name in addition to password set bynew_ipmi_password
. Defaults to currentipmi_username
in nodedriver_info
field.
Response:
- 202 - accepted introspection request
- 400 - bad request
- 401, 403 - missing or invalid authentication
- 404 - node cannot be found
Get Introspection Status
GET /v1/introspection/<UUID>
get hardware
introspection status.
Requires X-Auth-Token header with Keystone token for authentication.
Response:
- 200 - OK
- 400 - bad request
- 401, 403 - missing or invalid authentication
- 404 - node cannot be found
Response body: JSON dictionary with keys:
finished
(boolean) whether introspection is finishederror
error string ornull
Ramdisk Callback
POST /v1/continue
internal endpoint for the ramdisk to
post back discovered data. Should not be used for anything other than
implementing the ramdisk. Request body: JSON dictionary with at least
these keys:
cpus
number of CPUcpu_arch
architecture of the CPUmemory_mb
RAM in MiBlocal_gb
hard drive size in GiBinterfaces
dictionary filled with data from all NIC's, keys being interface names, values being dictionaries with keys:mac
MAC addressip
IP address
ipmi_address
IP address of BMC, may be missing on VMboot_interface
optional MAC address of the NIC that the machine PXE booted from either in standard format11:22:33:44:55:66
or in PXELinuxBOOTIF
format01-11-22-33-44-55-66
.error
optional error happened during ramdisk run, interpreted byramdisk_error
pluginlogs
optional base64-encoded logs from the ramdiskblock_devices
optional block devices information forroot_device_hint
plugin, dictionary with keys:serials
list of serial numbers of block devices.
Note
This list highly depends on enabled plugins, provided above are expected keys for the default set of plugins. See Plugins for details.
Response:
- 200 - OK
- 400 - bad request
- 403 - node is not on introspection
- 404 - node cannot be found or multiple nodes found
Response body: JSON dictionary. If Setting IPMI Credentials is requested, body will contain the following keys:
ipmi_setup_credentials
booleanTrue
ipmi_username
new IPMI user nameipmi_password
new IPMI password