Retire Packaging Deb project repos

This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).

Change-Id: I72c9e7b4780f435d32b1eb4991aa20095be3235c
This commit is contained in:
Tony Breeds 2017-09-12 15:39:34 -06:00
parent 3d570738ef
commit 32e341fc9b
1026 changed files with 14 additions and 167244 deletions

42
.gitignore vendored
View File

@ -1,42 +0,0 @@
# Compiled files
*.py[co]
*.a
*.o
*.so
# Sphinx
_build
doc/source/contributor/api/
# release notes build
releasenotes/build
# Packages/installer info
*.egg
*.egg-info
dist
build
eggs
.eggs
parts
var
sdist
develop-eggs
.installed.cfg
# Other
*.DS_Store
.idea
.testrepository
.tox
.venv
.*.swp
.coverage
cover
AUTHORS
ChangeLog
*.sqlite
*~
# Vagrant
.vagrant

View File

@ -1,4 +0,0 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/ironic.git

View File

@ -1,4 +0,0 @@
# Format is:
# <preferred e-mail> <other e-mail 1>
# <preferred e-mail> <other e-mail 2>
Joe Gordon <joe.gordon0@gmail.com> <jogo@cloudscaling.com>

View File

@ -1,4 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironic/tests/unit/} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -1,10 +0,0 @@
If you would like to contribute to the development of OpenStack,
you must follow the steps documented at:
http://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/ironic

176
LICENSE
View File

@ -1,176 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

14
README Normal file
View File

@ -0,0 +1,14 @@
This project is no longer maintained.
The contents of this repository are still available in the Git
source code management system. To see the contents of this
repository before it reached its end of life, please check out the
previous commit with "git checkout HEAD^1".
For ongoing work on maintaining OpenStack packages in the Debian
distribution, please see the Debian OpenStack packaging team at
https://wiki.debian.org/OpenStack/.
For any further questions, please email
openstack-dev@lists.openstack.org or join #openstack-dev on
Freenode.

View File

@ -1,38 +0,0 @@
========================
Team and repository tags
========================
.. image:: http://governance.openstack.org/badges/ironic.svg
:target: http://governance.openstack.org/reference/tags/index.html
.. Change things from this point on
======
Ironic
======
Ironic consists of an API and plug-ins for managing and provisioning
physical machines in a security-aware and fault-tolerant manner. It can be
used with nova as a hypervisor driver, or standalone service using bifrost.
By default, it will use PXE and IPMI to interact with bare metal machines.
Ironic also supports vendor-specific plug-ins which may implement additional
functionality.
Ironic is distributed under the terms of the Apache License, Version 2.0. The
full terms and conditions of this license are detailed in the LICENSE file.
Project resources
~~~~~~~~~~~~~~~~~
* Documentation: https://docs.openstack.org/ironic/latest
* Source: https://git.openstack.org/cgit/openstack/ironic
* Bugs: https://bugs.launchpad.net/ironic
* Wiki: https://wiki.openstack.org/wiki/Ironic
* APIs: https://developer.openstack.org/api-ref/baremetal/index.html
Project status, bugs, and requests for feature enhancements (RFEs) are tracked
on Launchpad:
https://launchpad.net/ironic
For information on how to contribute to ironic, see
https://docs.openstack.org/ironic/latest/contributor

View File

@ -1 +0,0 @@
doc/source/releasenotes/index.rst

31
Vagrantfile vendored
View File

@ -1,31 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# WARNING: This Vagrantfile is for development purposes only. It is intended to
# bootstrap required services - such as mysql and rabbit - into a reliably
# accessible VM, rather than forcing the engineer to install and manage these
# services manually. This Vagrantfile is not intended to assist in provisioning
# Ironic. For that, please use the bifrost project.
VAGRANTFILE_API_VERSION = '2'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = 'ubuntu/trusty64'
config.vm.define 'ironic' do |ironic|
ironic.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', '512', '--cpuexecutioncap', '25']
end
ironic.vm.network 'private_network', ip: '192.168.99.11' # It goes to 11.
ironic.vm.provision 'ansible' do |ansible|
ansible.verbose = 'v'
ansible.playbook = 'vagrant.yaml'
ansible.extra_vars = {
ip: '192.168.99.11'
}
end
end
end

View File

@ -1,269 +0,0 @@
#!/bin/bash
set -e -x
if [ ! -x /usr/bin/jq ]; then
echo "This script relies on 'jq' to process JSON output."
echo "Please install it before continuing."
exit 1
fi
OS_AUTH_TOKEN=$(openstack token issue | grep ' id ' | awk '{print $4}')
IRONIC_URL="http://127.0.0.1:6385"
IRONIC_API_VERSION="1.34"
export OS_AUTH_TOKEN IRONIC_URL
DOC_CHASSIS_UUID="dff29d23-1ded-43b4-8ae1-5eebb3e30de1"
DOC_NODE_UUID="6d85703a-565d-469a-96ce-30b6de53079d"
DOC_DYNAMIC_NODE_UUID="2b045129-a906-46af-bc1a-092b294b3428"
DOC_PORT_UUID="d2b30520-907d-46c8-bfee-c5586e6fb3a1"
DOC_PORTGROUP_UUID="e43c722c-248e-4c6e-8ce8-0d8ff129387a"
DOC_PROVISION_UPDATED_AT="2016-08-18T22:28:49.946416+00:00"
DOC_CREATED_AT="2016-08-18T22:28:48.643434+11:11"
DOC_UPDATED_AT="2016-08-18T22:28:49.653974+00:00"
DOC_IRONIC_CONDUCTOR_HOSTNAME="897ab1dad809"
function GET {
# GET $RESOURCE
curl -s -H "X-Auth-Token: $OS_AUTH_TOKEN" \
-H "X-OpenStack-Ironic-API-Version: $IRONIC_API_VERSION" \
${IRONIC_URL}/$1 | jq -S '.'
}
function POST {
# POST $RESOURCE $FILENAME
curl -s -H "X-Auth-Token: $OS_AUTH_TOKEN" \
-H "X-OpenStack-Ironic-API-Version: $IRONIC_API_VERSION" \
-H "Content-Type: application/json" \
-X POST --data @$2 \
${IRONIC_URL}/$1 | jq -S '.'
}
function PATCH {
# POST $RESOURCE $FILENAME
curl -s -H "X-Auth-Token: $OS_AUTH_TOKEN" \
-H "X-OpenStack-Ironic-API-Version: $IRONIC_API_VERSION" \
-H "Content-Type: application/json" \
-X PATCH --data @$2 \
${IRONIC_URL}/$1 | jq -S '.'
}
function PUT {
# PUT $RESOURCE $FILENAME
curl -s -H "X-Auth-Token: $OS_AUTH_TOKEN" \
-H "X-OpenStack-Ironic-API-Version: $IRONIC_API_VERSION" \
-H "Content-Type: application/json" \
-X PUT --data @$2 \
${IRONIC_URL}/$1
}
function wait_for_node_state {
local node="$1"
local field="$2"
local target_state="$3"
local attempt=10
while [[ $attempt -gt 0 ]]; do
res=$(openstack baremetal node show "$node" -f value -c "$field")
if [[ "$res" == "$target_state" ]]; then
break
fi
sleep 1
attempt=$((attempt - 1))
echo "Failed to get node $field == $target_state in $attempt attempts."
done
if [[ $attempt == 0 ]]; then
exit 1
fi
}
pushd source/samples
###########
# ROOT APIs
GET '' > api-root-response.json
GET 'v1' > api-v1-root-response.json
###########
# DRIVER APIs
GET v1/drivers > drivers-list-response.json
GET v1/drivers?detail=true > drivers-list-detail-response.json
GET v1/drivers/ipmi > driver-get-response.json
GET v1/drivers/agent_ipmitool/properties > driver-property-response.json
GET v1/drivers/agent_ipmitool/raid/logical_disk_properties > driver-logical-disk-properties-response.json
#########
# CHASSIS
POST v1/chassis chassis-create-request.json > chassis-show-response.json
CID=$(cat chassis-show-response.json | grep '"uuid"' | sed 's/.*"\([0-9a-f\-]*\)",*/\1/')
if [ "$CID" == "" ]; then
exit 1
else
echo "Chassis created. UUID: $CID"
fi
GET v1/chassis > chassis-list-response.json
GET v1/chassis/detail > chassis-list-details-response.json
PATCH v1/chassis/$CID chassis-update-request.json > chassis-update-response.json
# skip GET /v1/chassis/$UUID because the response is same as POST
#######
# NODES
# Create a node with a real driver, but missing ipmi_address,
# then do basic commands with it
POST v1/nodes node-create-request-classic.json > node-create-response.json
NID=$(cat node-create-response.json | grep '"uuid"' | sed 's/.*"\([0-9a-f\-]*\)",*/\1/')
if [ "$NID" == "" ]; then
exit 1
else
echo "Node created. UUID: $NID"
fi
# Also create a node with a dynamic driver for viewing in the node list
# endpoint
DNID=$(POST v1/nodes node-create-request-dynamic.json | grep '"uuid"' | sed 's/.*"\([0-9a-f\-]*\)",*/\1/')
if [ "$DNID" == "" ]; then
exit 1
else
echo "Node created. UUID: $DNID"
fi
# get the list of passthru methods from agent* driver
GET v1/nodes/$NID/vendor_passthru/methods > node-vendor-passthru-response.json
# Change to the fake driver and then move the node into the AVAILABLE
# state without saving any output.
# NOTE that these three JSON files are not included in the docs
PATCH v1/nodes/$NID node-update-driver.json
PUT v1/nodes/$NID/states/provision node-set-manage-state.json
PUT v1/nodes/$NID/states/provision node-set-available-state.json
# Wait node to become available
wait_for_node_state $NID provision_state available
GET v1/nodes/$NID/validate > node-validate-response.json
PUT v1/nodes/$NID/states/power node-set-power-off.json
# Wait node to reach power off state
wait_for_node_state $NID power_state "power off"
GET v1/nodes/$NID/states > node-get-state-response.json
GET v1/nodes > nodes-list-response.json
GET v1/nodes/detail > nodes-list-details-response.json
GET v1/nodes/$NID > node-show-response.json
# Put the Node in maintenance mode, then continue doing everything else
PUT v1/nodes/$NID/maintenance node-maintenance-request.json
############
# PORTGROUPS
# Before we can create a portgroup, we must
# write NODE ID into the create request document body
sed -i "s/.*node_uuid.*/ \"node_uuid\": \"$NID\",/" portgroup-create-request.json
POST v1/portgroups portgroup-create-request.json > portgroup-create-response.json
PGID=$(cat portgroup-create-response.json | grep '"uuid"' | sed 's/.*"\([0-9a-f\-]*\)",*/\1/')
if [ "$PGID" == "" ]; then
exit 1
else
echo "Portgroup created. UUID: $PGID"
fi
GET v1/portgroups > portgroup-list-response.json
GET v1/portgroups/detail > portgroup-list-detail-response.json
PATCH v1/portgroups/$PGID portgroup-update-request.json > portgroup-update-response.json
# skip GET $PGID because same result as POST
# skip DELETE
###########
# PORTS
# Before we can create a port, we must
# write NODE ID and PORTGROUP ID into the create request document body
sed -i "s/.*node_uuid.*/ \"node_uuid\": \"$NID\",/" port-create-request.json
sed -i "s/.*portgroup_uuid.*/ \"portgroup_uuid\": \"$PGID\",/" port-create-request.json
POST v1/ports port-create-request.json > port-create-response.json
PID=$(cat port-create-response.json | grep '"uuid"' | sed 's/.*"\([0-9a-f\-]*\)",*/\1/')
if [ "$PID" == "" ]; then
exit 1
else
echo "Port created. UUID: $PID"
fi
GET v1/ports > port-list-response.json
GET v1/ports/detail > port-list-detail-response.json
PATCH v1/ports/$PID port-update-request.json > port-update-response.json
# skip GET $PID because same result as POST
# skip DELETE
################
# NODE PORT APIs
GET v1/nodes/$NID/ports > node-port-list-response.json
GET v1/nodes/$NID/ports/detail > node-port-detail-response.json
#####################
# NODE PORTGROUP APIs
GET v1/nodes/$NID/portgroups > node-portgroup-list-response.json
GET v1/nodes/$NID/portgroups/detail > node-portgroup-detail-response.json
#####################
# PORTGROUPS PORT APIs
GET v1/portgroups/$PGID/ports > portgroup-port-list-response.json
GET v1/portgroups/$PGID/ports/detail > portgroup-port-detail-response.json
############
# LOOKUP API
GET v1/lookup?node_uuid=$NID > lookup-node-response.json
#####################
# NODES MANAGEMENT API
# These need to be done while the node is in maintenance mode,
# and the node's driver is "fake", to avoid potential races
# with internal processes that lock the Node
# this corrects an intentional ommission in some of the samples
PATCH v1/nodes/$NID node-update-driver-info-request.json > node-update-driver-info-response.json
GET v1/nodes/$NID/management/boot_device/supported > node-get-supported-boot-devices-response.json
PUT v1/nodes/$NID/management/boot_device node-set-boot-device.json
GET v1/nodes/$NID/management/boot_device > node-get-boot-device-response.json
PUT v1/nodes/$NID/management/inject_nmi node-inject-nmi.json
#############################
# NODES VIF ATTACH/DETACH API
POST v1/nodes/$NID/vifs node-vif-attach-request.json
GET v1/nodes/$NID/vifs > node-vif-list-response.json
#####################
# Replace automatically generated UUIDs by already used in documentation
sed -i "s/$CID/$DOC_CHASSIS_UUID/" *.json
sed -i "s/$NID/$DOC_NODE_UUID/" *.json
sed -i "s/$DNID/$DOC_DYNAMIC_NODE_UUID/" *.json
sed -i "s/$PID/$DOC_PORT_UUID/" *.json
sed -i "s/$PGID/$DOC_PORTGROUP_UUID/" *.json
sed -i "s/$(hostname)/$DOC_IRONIC_CONDUCTOR_HOSTNAME/" *.json
sed -i "s/created_at\": \".*\"/created_at\": \"$DOC_CREATED_AT\"/" *.json
sed -i "s/updated_at\": \".*\"/updated_at\": \"$DOC_UPDATED_AT\"/" *.json
sed -i "s/provision_updated_at\": \".*\"/provision_updated_at\": \"$DOC_PROVISION_UPDATED_AT\"/" *.json

View File

@ -1,235 +0,0 @@
.. -*- rst -*-
=================
Chassis (chassis)
=================
The Chassis resource type was originally conceived as a means to group Node
resources. Support for this continues to exist in the REST API, however, it is
very minimal. The Chassis object does not provide any functionality today
aside from a means to list a group of Nodes.
Use of this resource is discouraged, and may be deprecated and removed in a
future release.
List chassis with details
=========================
.. rest_method:: GET /v1/chassis/detail
Lists all chassis with details.
Normal response codes: 200
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- chassis: chassis
- description: description
- extra: extra
Response Example
----------------
.. literalinclude:: samples/chassis-list-details-response.json
:language: javascript
Show chassis details
====================
.. rest_method:: GET /v1/chassis/{chassis_id}
Shows details for a chassis.
Normal response codes: 200
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- fields: fields
- chassis_id: chassis_ident
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- chassis: chassis
- description: description
- extra: extra
Response Example
----------------
.. literalinclude:: samples/chassis-show-response.json
:language: javascript
Update chassis
==============
.. rest_method:: PATCH /v1/chassis/{chassis_id}
Updates a chassis.
Normal response codes: 200
.. TODO: add error codes
Request
-------
The BODY of the PATCH request must be a JSON PATCH document, adhering to
`RFC 6902 <https://tools.ietf.org/html/rfc6902>`_.
.. rest_parameters:: parameters.yaml
- chassis_id: chassis_ident
- description: description
- extra: extra
Request Example
---------------
.. literalinclude:: samples/chassis-update-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- description: description
- links: links
- extra: extra
- created_at: created_at
- updated_at: updated_at
- chassis: chassis
- nodes: nodes
- uuid: uuid
Response Example
----------------
.. literalinclude:: samples/chassis-update-response.json
:language: javascript
Delete chassis
==============
.. rest_method:: DELETE /v1/chassis/{chassis_id}
Deletes a chassis.
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- chassis_id: chassis_ident
Create chassis
==============
.. rest_method:: POST /v1/chassis
Creates a chassis.
Error response codes:201,413,415,405,404,403,401,400,503,409,
Request
-------
.. rest_parameters:: parameters.yaml
- chassis: chassis
- description: description
- extra: extra
Request Example
---------------
.. literalinclude:: samples/chassis-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- description: description
- links: links
- extra: extra
- created_at: created_at
- updated_at: updated_at
- nodes: nodes
- uuid: uuid
Response Example
----------------
.. literalinclude:: samples/chassis-show-response.json
:language: javascript
List chassis
============
.. rest_method:: GET /v1/chassis
Lists all chassis.
Normal response codes: 200
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
- fields: fields
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- chassis: chassis
- description: description
- extra: extra
Response Example
----------------
.. literalinclude:: samples/chassis-list-response.json
:language: javascript

View File

@ -1,92 +0,0 @@
.. -*- rst -*-
================================
Driver Vendor Passthru (drivers)
================================
Each driver MAY support vendor-specific extensions, called "passthru" methods.
Internally, Ironic's driver API supports flexibly exposing functions via the
common HTTP methods GET, PUT, POST, and DELETE. To call a passthru method,
the query string must contain the name of the method. For example, if the
method name was ``my_passthru_method``, the request would look like
``/vendor_passthru?method=my_passthru_method``. The contents of the HTTP
request are forwarded to the driver and validated there.
Ironic's REST API provides a means to discover these methods, but does not
provide support, testing, or documentation for these endpoints. The Ironic
development team does not guarantee any compatibility within these methods
between releases, though we encourage driver authors to provide documentation
and support for them.
Besides the endpoints documented here, all other resources and endpoints
under the heading ``vendor_passthru`` should be considered unsupported APIs,
and could be changed without warning by the driver authors.
List Methods
============
.. rest_method:: GET /v1/drivers/{driver_name}/vendor_passthru/methods
Retrieve a list of the available vendor passthru methods for the given Driver.
The response will indicate which HTTP method(s) each vendor passthru method
allows, whether the method call will be synchronous or asynchronous, and
whether the response will include any attachment.
Normal response code: 200
Request
-------
.. rest_parameters:: parameters.yaml
- driver_name: driver_ident
Response
--------
The response BODY is a dictionary whose keys are the method names. The value
of each item is itself a dictionary describing how to interact with that
method.
.. rest_parameters:: parameters.yaml
- async: passthru_async
- attach: passthru_attach
- description: passthru_description
- http_methods: passthru_http_methods
Call a Method
=============
.. rest_method:: METHOD /v1/drivers/{driver_name}/vendor_passthru?method={method_name}
The HTTP METHOD may be one of GET, POST, PUT, DELETE, depending on the driver
and method.
This endpoint passes the request directly to the hardware driver. The
HTTP BODY must be parseable JSON, which will be converted to parameters passed
to that function. Unparseable JSON, missing parameters, or excess parameters
will cause the request to be rejected with an HTTP 400 error.
Normal response code: 200 202
Error codes: 400
Request
-------
.. rest_parameters:: parameters.yaml
- driver_name: driver_ident
- method_name: method_name
All other parameters should be passed in the BODY. Parameter list varies by
method_name.
Response
--------
Varies.

View File

@ -1,226 +0,0 @@
.. -*- rst -*-
=================
Drivers (drivers)
=================
Ironic has two types of drivers: *classic* drivers and *dynamic* drivers.
A *classic* driver is a Python object containing all the logic to manage the
bare metal nodes enrolled within Ironic. A driver may be loaded within one or
more ``ironic-conductor`` services. Each driver contains a pre-determined set
of instantiated interfaces. Each type of interface (eg, ``power`` or ``boot``)
performs a specific hardware function.
As of API version 1.30, the REST API also exposes information about *dynamic*
drivers. *Dynamic* drivers are supported via hardware types, which are Python
classes enabled via entry points. Unlike *classic* drivers, which have
pre-determined interfaces, a hardware type may support multiple types of
interfaces. For example, the ``ipmi`` hardware type may support multiple
methods for enabling node console. Which interface a node of a particular
hardware type uses is determined at runtime. This collection of interfaces is
called a *dynamic* driver. For more information about this, see the node API
documentation.
The REST API exposes the list of drivers and which ``ironic-conductor``
processes have loaded that driver via the Driver resource (``/v1/drivers``
endpoint). This can be useful for operators to validate their configuration in
a heterogeneous hardware environment. Each ``ironic-conductor`` process may
load one or more drivers, and does not necessarily need to load the same
*classic* drivers as another ``ironic-conductor``. Each ``ironic-conductor``
with the same hardware types must have the same hardware interfaces enabled.
The REST API also exposes details about each driver, such as what properties
must be supplied to a node's ``driver_info`` for that driver to manage
hardware.
Lastly, some drivers may expose methods through a ``driver_vendor_passthru``
endpoint, allowing one to interact with the driver directly (i.e., without
knowing a specific node identifier). For example, this is used by the ironic
python agent ramdisk to get the UUID of the node being deployed/cleaned by
using MAC addresses of the node's network interfaces the agent has discovered.
List drivers
============
.. rest_method:: GET /v1/drivers
Lists all drivers.
Normal response codes: 200
Request
-------
.. rest_parameters:: parameters.yaml
- type: driver_type
- detail: driver_detail
Response Parameters
-------------------
The response BODY contains a single key, "drivers", whose value is a list of
drivers supported by this Ironic service.
.. rest_parameters:: parameters.yaml
- drivers: drivers
- name: driver_name
- hosts: hosts
- type: response_driver_type
- links: links
- properties: driver_property_links
Additionally, if the request has the "detail" URL parameter set to true, each
driver will also include the following fields.
.. rest_parameters:: parameters.yaml
- default_boot_interface: default_boot_interface
- default_console_interface: default_console_interface
- default_deploy_interface: default_deploy_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_vendor_interface: default_vendor_interface
- enabled_boot_interfaces: enabled_boot_interfaces
- enabled_console_interfaces: enabled_console_interfaces
- enabled_deploy_interfaces: enabled_deploy_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_vendor_interfaces: enabled_vendor_interfaces
Response Example
----------------
Example for a request with detail=false (the default):
.. literalinclude:: samples/drivers-list-response.json
:language: javascript
Example for a request with detail=true:
.. literalinclude:: samples/drivers-list-detail-response.json
:language: javascript
Show driver details
===================
.. rest_method:: GET /v1/drivers/{driver_name}
Shows details for a driver.
Normal response codes: 200
Request
-------
.. rest_parameters:: parameters.yaml
- driver_name: driver_ident
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- name: driver_name
- hosts: hosts
- type: response_driver_type
- default_boot_interface: default_boot_interface
- default_console_interface: default_console_interface
- default_deploy_interface: default_deploy_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_vendor_interface: default_vendor_interface
- enabled_boot_interfaces: enabled_boot_interfaces
- enabled_console_interfaces: enabled_console_interfaces
- enabled_deploy_interfaces: enabled_deploy_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_vendor_interfaces: enabled_vendor_interfaces
- links: links
- properties: driver_property_links
Response Example
----------------
.. literalinclude:: samples/driver-get-response.json
:language: javascript
Show driver properties
======================
.. rest_method:: GET /v1/drivers/{driver_name}/properties
Shows the required and optional parameters that ``driver_name`` expects to be
supplied in the ``driver_info`` field for every Node it manages.
To check if all required parameters have been supplied to a Node, you should
query the ``/v1/nodes/{node_ident}/validate`` endpoint.
Normal response codes: 200
Request
-------
.. rest_parameters:: parameters.yaml
- driver_name: driver_ident
Response Example
----------------
The response BODY is a dictionary, but the keys are unique to each driver.
The structure of the response is ``property`` : ``description``.
The following example is returned from the ``agent_ipmitool`` driver.
.. literalinclude:: samples/driver-property-response.json
:language: javascript
Show driver logical disk properties
===================================
.. rest_method:: GET /v1/drivers/{driver_name}/raid/logical_disk_properties
Show the required and optional parameters that ``driver_name`` expects to be
supplied in the node's ``raid_config`` field, if a RAID configuration change is
requested.
This resource was added in API microversion 1.12.
Normal response codes: 200
Request
-------
.. rest_parameters:: parameters.yaml
- driver_name: driver_ident
Response Example
----------------
The response BODY is a dictionary, but the keys are unique to each driver.
The structure of the response is ``property`` : ``description``.
The following example is returned from the ``agent_ipmitool`` driver.
.. literalinclude:: samples/driver-logical-disk-properties-response.json
:language: javascript

View File

@ -1,100 +0,0 @@
.. -*- rst -*-
=======
Utility
=======
This section describes two API endpoints used by the ``ironic-python-agent``
ramdisk as it communicates with the Bare Metal service. These were previously
exposed as vendor passthrough methods, however, as ironic-python-agent has
become the standard ramdisk agent, these methods have been made a part of the
official REST API.
.. note::
**Operators are reminded not to expose the Bare Metal Service's API to
unsecured networks.** Both API endpoints listed below are available to
*unauthenticated* clients because the default method for booting the
``ironic-python-agent`` ramdisk does not provide the agent with keystone
credentials.
.. note::
It is possible to include keys in your ramdisk, or pass keys in via the
boot method, if your driver supports it; if that is done, you may configure
these endpoints to require authentication by changing the policy rules
``baremetal:driver:ipa_lookup`` and ``baremetal:node:ipa_heartbeat``.
In light of that, operators are recommended to ensure that this endpoint is
only available on the ``provisioning`` and ``cleaning`` networks.
Agent Lookup
============
.. rest_method:: GET /v1/lookup
Beginning with the v1.22 API, a ``/lookup`` method is exposed at the root of
the REST API. This should only be used by the ``ironic-python-agent`` ramdisk
to retrieve required configuration data from the Bare Metal service.
By default, ``/v1/lookup`` will only match Nodes that are expected to be
running the ``ironic-python-agent`` ramdisk (for instance, because the Bare
Metal service has just initiated a deployment). It can not be used as a
generic search mechanism, though this behaviour may be changed by setting
the ``[api] restrict_lookup = false`` configuration option for the ironic-api
service.
The query string should include either or both a ``node_uuid`` or an
``addresses`` query parameter. If a matching Node is found, information about
that Node shall be returned, including instance-specific information such as
the configdrive.
Normal response codes: 200
Error response codes: 400 404
Request
-------
.. rest_parameters:: parameters.yaml
- node_uuid: r_node_uuid
- addresses: r_addresses
Response
--------
Returns only the information about the corresponding Node that the
``ironic-python-agent`` process requires.
.. rest_parameters:: parameters.yaml
- node: agent_node
- config: agent_config
Response Example
----------------
.. literalinclude:: samples/lookup-node-response.json
:language: javascript
Agent Heartbeat
===============
.. rest_method:: POST /v1/heartbeat/{node_ident}
Beginning with the v1.22 API, a ``/heartbeat`` method is exposed at the root of
the REST API. This is used as a callback from within the ``ironic-python-agent``
ramdisk, so that an active ramdisk may periodically contact the Bare Metal
service and provide the current URL at which to contact the agent.
Normal response codes: 202
Error response codes: 400 404
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- callback_url: callback_url

View File

@ -1,428 +0,0 @@
.. -*- rst -*-
=======================
Node Management (nodes)
=======================
Nodes can be managed through several sub-resources.
Maintenance mode can be set by the operator, with an optional "reason" stored
by Ironic.
The supplied ``driver_info`` can be validated to ensure that the selected
``driver`` has all the information it requires to manage the Node.
A Node can be rebooted, turned on, or turned off by requesting a change to its
power state. This is handled asynchronously and tracked in the ``target_power_state``
field after the request is received.
A Node's boot device can be changed, and the set of supported boot devices
can be queried.
A request to change a Node's provision state is also tracked asynchronously;
the ``target_provision_state`` represents the requested state. A Node
may transition through several discrete ``provision_state`` steps before arriving
at the requested state. This can vary between drivers and based on configuration.
For example, a Node in the ``available`` state can have an instance deployed to it
by requesting the provision state of ``active``. During this transition, the Node's
``provision_state`` will temporarily be set to ``deploying``, and depending on the driver,
it may also be ``wait call-back``. When the transitions are complete, ``target_provision_state``
will be set to ``None`` and ``provision_state`` will be set to ``active``.
To destroy the instance, request the provision state of ``delete``. During this
transition, the Node may or may not go through a ``cleaning`` state,
depending on the service configuration.
Validate Node
===============
.. rest_method:: GET /v1/nodes/{node_ident}/validate
Request that Ironic validate whether the Node's ``driver`` has enough information
to manage the Node. This polls each ``interface`` on the driver, and returns
the status of that ``interface`` as an element in the response. Note that each
``driver`` may require different information to be supplied, and not all drivers
support all interfaces.
Normal response codes: 200
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
Response
--------
Each element in the response will contain a "result" variable, which will have
a value of "true" or "false", indicating that the interface either has or does
not have sufficient information to function. A value of ``null`` indicates that
the Node's driver does not support that interface.
.. rest_parameters:: parameters.yaml
- power: v_power
- boot: v_boot
- deploy: v_deploy
- console: v_console
- management: v_management
- inspect: v_inspect
- raid: v_raid
**Example node validation response:**
.. literalinclude:: samples/node-validate-response.json
:language: javascript
Set Maintenance Flag
=============================
.. rest_method:: PUT /v1/nodes/{node_ident}/maintenance
Request that Ironic set the maintenance flag on the Node. This will disable
certain automatic actions that the Node's driver may take, and remove
the Node from Nova's available resource pool.
Normal response code: 202
.. TODO: Add link to user / operator documentation on the Maintenance flag
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- reason: reason
**Example request: mark a node for maintenance:**
.. literalinclude:: samples/node-maintenance-request.json
Clear Maintenance Flag
==============================
.. rest_method:: DELETE /v1/nodes/{node_ident}/maintenance
The maintenance flag is unset by sending a DELETE request to this endpoint.
If the request is accepted, Ironic will also clear the ``maintenance_reason``
field.
Normal response code: 202
.. TODO: Add link to user / operator documentation on the Maintenance flag
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
Set Boot Device
===============
.. rest_method:: PUT /v1/nodes/{node_ident}/management/boot_device
Set the boot device for the given Node, and set it persistently or for one-time
boot. The exact behaviour of this depends on the hardware driver.
.. note:: In some drivers, eg. the ``*_ipmitool`` family, this method initiates a synchronous call
to the hardware management device (BMC). It should be used with caution! This
is `a known bug <https://bugs.launchpad.net/ironic/+bug/1427923>`_.
.. note:: Some drivers do not support one-time boot, and always set the boot device
persistently.
Normal response code: 204
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- boot_device: boot_device
- persistent: persistent
**Example JSON request body to set boot device:**
.. literalinclude:: samples/node-set-boot-device.json
Get Boot Device
===============
.. rest_method:: GET /v1/nodes/{node_ident}/management/boot_device
Get the current boot device for the given Node.
.. note:: In some drivers, eg. the ``*_ipmitool`` family, this method initiates a synchronous call
to the hardware management device (BMC). It should be used with caution! This
is `a known bug <https://bugs.launchpad.net/ironic/+bug/1427923>`_.
Normal response code: 200
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
Response
--------
.. rest_parameters:: parameters.yaml
- boot_device: boot_device
- persistent: persistent
**Example JSON response to get boot device:**
.. literalinclude:: samples/node-get-boot-device-response.json
Get Supported Boot Devices
===========================
.. rest_method:: GET /v1/nodes/{node_ident}/management/boot_device/supported
Retrieve the acceptable set of supported boot devices for a specific Node.
Normal response code: 200
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
Response
--------
.. rest_parameters:: parameters.yaml
- supported_boot_devices: supported_boot_devices
**Example response listing supported boot devices:**
.. literalinclude:: samples/node-get-supported-boot-devices-response.json
Inject NMI (Non-Masking Interrupts)
===================================
.. rest_method:: PUT /v1/nodes/{node_ident}/management/inject_nmi
Inject NMI (Non-Masking Interrupts) for the given Node. This feature
can be used for hardware diagnostics, and actual support depends on a
driver.
Normal response code: 204 (No content)
Error codes:
- 400 (Invalid)
- 403 (Forbidden)
- 404 (NotFound)
- 406 (NotAcceptable)
- 409 (NodeLocked, ClientError)
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
**Request to inject NMI to a node has to be empty dictionary:**
.. literalinclude:: samples/node-inject-nmi.json
Node State Summary
==================
.. rest_method:: GET /v1/nodes/{node_ident}/states
Get a summary of the Node's current power, provision, raid, and console status.
Normal response code: 200
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
Response
--------
.. rest_parameters:: parameters.yaml
- power_state: power_state
- target_power_state: target_power_state
- provision_state: provision_state
- target_provision_state: target_provision_state
- provision_updated_at: provision_updated_at
- last_error: last_error
- console_enabled: console_enabled
- raid_config: raid_config
- target_raid_config: target_raid_config
**Example node state:**
.. literalinclude:: samples/node-get-state-response.json
Change Node Power State
=======================
.. rest_method:: PUT /v1/nodes/{node_ident}/states/power
Request a change to the Node's power state.
Normal response code: 202 (Accepted)
Error codes:
- 409 (NodeLocked, ClientError)
- 400 (Invalid, InvalidStateRequested, InvalidParameterValue)
- 406 (NotAcceptable)
- 503 (NoFreeConductorWorkers)
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- target: target_power_state
- timeout: power_timeout
**Example request to power off a Node:**
.. literalinclude:: samples/node-set-power-off.json
**Example request to soft power off a Node with timeout:**
.. literalinclude:: samples/node-set-soft-power-off.json
Change Node Provision State
===========================
.. rest_method:: PUT /v1/nodes/{node_ident}/states/provision
Request a change to the Node's provision state.
Acceptable target states depend on the Node's current provision state. More
detailed documentation of the Ironic State Machine is available
`in the developer docs <http://docs.openstack.org/ironic/latest/contributor/states.html>`_.
Normal response code: 202
Error codes:
- 409 (NodeLocked, ClientError)
- 400 (InvalidState, NodeInMaintenance)
- 406 (NotAcceptable)
- 503 (NoFreeConductorWorkers)
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- target: requested_provision_state
- configdrive: configdrive
- clean_steps: clean_steps
**Example request to deploy a Node, using a configdrive served via local webserver:**
.. literalinclude:: samples/node-set-active-state.json
**Example request to clean a Node, with custom clean step:**
.. literalinclude:: samples/node-set-clean-state.json
Set RAID Config
===============
.. rest_method:: PUT /v1/nodes/{node_ident}/states/raid
Store the supplied configuration on the Node's ``target_raid_config`` property.
This property must be structured JSON, and will be validated by the driver upon receipt. The request
schema is defined in the `documentation for the RAID feature <http://docs.openstack.org/ironic/latest/admin/raid.html>`_
.. note:: Calling this API only stores the requested configuration; it will be applied the next time
that the Node transitions through the ``cleaning`` phase.
Added in API microversion: 1.12
Normal response code: 204
.. TODO: add more description, response code, sample response
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- target_raid_config: target_raid_config
**Example requested RAID config:**
.. literalinclude:: samples/node-set-raid-request.json
.. TODO: add more description, response code, sample response
Get Console
===========
.. rest_method:: GET /v1/nodes/{node_ident}/states/console
Get connection information about the console.
.. TODO: add more description, response code, sample response
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
.. TODO: add more description, response code, sample response
Start/Stop Console
===================
.. rest_method:: PUT /v1/nodes/{node_ident}/states/console
Start or stop the serial console.
.. TODO: add more description, response code, sample response
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- enabled: console_enabled

View File

@ -1,84 +0,0 @@
.. -*- rst -*-
============================
Node Vendor Passthru (nodes)
============================
Each driver MAY support vendor-specific extensions, called "passthru" methods.
Internally, Ironic's driver API supports flexibly exposing functions via the
common HTTP methods GET, PUT, POST, and DELETE. To call a passthru method,
the query string must contain the name of the method, eg.
``/vendor_passthru?method=reset_bmc``. The contents of the HTTP request are
forwarded to the Node's driver and validated there.
Ironic's REST API provides a means to discover these methods, but does not provide
support, testing, or documentation for these endpoints. The Ironic development
team does not guarantee any compatibility within these methods between releases,
though we encourage driver authors to provide documentation and support for them.
Besides the endpoints documented here, all other resources and endpoints
under the heading ``vendor_passthru`` should be considered
unsupported APIs, and could be changed without warning by the driver authors.
List Methods
============
.. rest_method:: GET /v1/nodes/{node_ident}/vendor_passthru/methods
Retrieve a list of the available vendor passthru methods for the given Node. The
response will indicate which HTTP method(s) each vendor passthru method allows,
whether the method call will be synchronous or asynchronous, and whether the
response will include any attachment.
Normal response code: 200
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
Response
--------
**Example passthru methods listing:**
.. literalinclude:: samples/node-vendor-passthru-response.json
Call a Method
=============
.. rest_method:: METHOD /v1/nodes/{node_ident}/vendor_passthru?method={method_name}
The HTTP METHOD may be one of GET, POST, PUT, DELETE, depending on the driver
and method.
This endpoint passes the request directly to the Node's hardware driver. The
HTTP BODY must be parseable JSON, which will be converted to parameters passed
to that function. Unparseable JSON, missing parameters, or excess parameters
will cause the request to be rejected with an HTTP 400 error.
Normal response code: 200 202
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- method_name: method_name
All other parameters should be passed in the BODY. Parameter list varies by method_name.
Response
--------
Varies.

View File

@ -1,101 +0,0 @@
.. -*- rst -*-
==============================================
Listing Portgroups by Node (nodes, portgroups)
==============================================
Given a Node identifier (``uuid`` or ``name``), the API exposes the list of,
and details of, all Portgroups associated with that Node.
These endpoints do not allow modification of the Portgroups; that should be
done by accessing the Portgroup resources under the ``/v1/portgroups``
endpoint.
Portgroup resource was added in API microversion 1.24, if using older
version, all the requests return ``Not Found (404)`` error code.
List Portgroups by Node
=======================
.. rest_method:: GET /v1/nodes/{node_ident}/portgroups
Return a list of bare metal Portgroups associated with ``node_ident``.
Normal response code: 200
Error codes: 400,401,403,404
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- fields: fields
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- portgroups: portgroups
- uuid: uuid
- address: portgroup_address
- name: portgroup_name
- links: links
**Example list of a Node's Portgroups:**
.. literalinclude:: samples/node-portgroup-list-response.json
List detailed Portgroups by Node
================================
.. rest_method:: GET /v1/nodes/{node_ident}/portgroups/detail
Return a detailed list of bare metal Portgroups associated with ``node_ident``.
Normal response code: 200
Error codes: 400,401,403,404
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- portgroups: portgroups
- uuid: uuid
- address: portgroup_address
- name: portgroup_name
- node_uuid: node_uuid
- standalone_ports_supported: standalone_ports_supported
- internal_info: portgroup_internal_info
- extra: extra
- mode: portgroup_mode
- properties: portgroup_properties
- ports: pg_ports
- created_at: created_at
- updated_at: updated_at
- links: links
**Example details of a Node's Portgroups:**
.. literalinclude:: samples/node-portgroup-detail-response.json

View File

@ -1,113 +0,0 @@
.. -*- rst -*-
====================================
Listing Ports by Node (nodes, ports)
====================================
Given a Node identifier (``uuid`` or ``name``), the API exposes the list of,
and details of, all Ports associated with that Node.
These endpoints do not allow modification of the Ports; that should be done
by accessing the Port resources under the ``/v1/ports`` endpoint.
List Ports by Node
===================
.. rest_method:: GET /v1/nodes/{node_ident}/ports
Return a list of bare metal Ports associated with ``node_ident``.
API microversion 1.8 added the ``fields`` request parameter. When specified,
this causes the content of the response to include only the specified fields,
rather than the default set.
API microversion 1.19 added the ``pxe_enabled`` and ``local_link_connection``
fields.
API microversion 1.24 added the ``portgroup_uuid`` field.
API microversion 1.34 added the ``physical_network`` field.
Normal response code: 200
Error codes: TBD
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- fields: fields
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- ports: ports
- uuid: uuid
- address: port_address
- links: links
**Example list of a Node's Ports:**
.. literalinclude:: samples/node-port-list-response.json
List detailed Ports by Node
===========================
.. rest_method:: GET /v1/nodes/{node_ident}/ports/detail
Return a detailed list of bare metal Ports associated with ``node_ident``.
API microversion 1.19 added the ``pxe_enabled`` and ``local_link_connection``
fields.
API microversion 1.24 added the ``portgroup_uuid`` field.
API microversion 1.34 added the ``physical_network`` field.
Normal response code: 200
Error codes: TBD
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- fields: fields
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- ports: ports
- uuid: uuid
- address: port_address
- node_uuid: node_uuid
- local_link_connection: local_link_connection
- pxe_enabled: pxe_enabled
- physical_network: physical_network
- internal_info: internal_info
- extra: extra
- created_at: created_at
- updated_at: updated_at
- links: links
**Example details of a Node's Ports:**
.. literalinclude:: samples/node-port-detail-response.json

View File

@ -1,76 +0,0 @@
.. -*- rst -*-
==================================
VIFs (Virtual Interfaces) of nodes
==================================
Starting with API version 1.28 attaching and detaching VIFs (Virtual Interfaces)
to or from a node are done via the ``v1/nodes/{node_ident}/vifs`` endpoint. Attaching
a VIF to a node means that a VIF will be mapped to a free port or port group of
the specified node.
List attached VIFs of a Node
============================
.. rest_method:: GET /v1/nodes/{node_ident}/vifs
Return a list of VIFs that are attached to the node.
Normal response code: 200
Error codes: 400,401,403,404
Response
--------
.. rest_parameters:: parameters.yaml
- id: node_vif_ident
- vifs: n_vifs
- node_ident: node_ident
**Example list of VIFs that are attached to the node:**
.. literalinclude:: samples/node-vif-list-response.json
:language: javascript
Attach a VIF to a node
======================
.. rest_method:: POST /v1/nodes/{node_ident}/vifs
Attach a VIF to a node.
Normal response code: 204
Error codes: 400,401,403,404,409
Request
-------
.. rest_parameters:: parameters.yaml
- id: node_vif_ident
- node_ident: node_ident
**Example request to attach a VIF to a Node:**
.. literalinclude:: samples/node-vif-attach-request.json
Detach VIF from a node
======================
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- node_vif_ident: node_vif_ident
.. rest_method:: DELETE /v1/nodes/{node_ident}/vifs/{node_vif_ident}
Detach VIF from a Node.
Normal response code: 204
Error codes: 400,401,403,404

View File

@ -1,458 +0,0 @@
.. -*- rst -*-
=============
Nodes (nodes)
=============
List, Searching, Creating, Updating, and Deleting of bare metal Node resources
are done through the ``/v1/nodes`` resource. There are also several sub-resources,
which allow further actions to be performed on a bare metal Node.
A Node is the canonical representation of a discretely allocatable server,
capable of running an Operating System. Each Node must be associated with a
``driver``; this informs Ironic what protocol to use when managing the Node.
Beginning with API microversion 1.6, a Node may be referenced both by its UUID
and by a unique human-readable "name" in any request. Throughout this
documentation, this is referred to as the ``node_ident``. Responses clearly
indicate whether a given field is a ``uuid`` or a ``name``.
Depending on the Roles assigned to the authenticated OpenStack User, and upon
the configuration of the Bare Metal service, API responses may change. For
example, the default value of the "show_password" settings cause all API
responses to mask passwords within ``driver_info`` with the literal string
"\*\*\*\*\*\*".
Create Node
===========
.. rest_method:: POST /v1/nodes
Creates a new Node resource.
This method requires that a ``driver`` be supplied in the request body. Most
subresources of a Node (eg, ``properties``, ``driver_info``, etc) may be
supplied when the Node is created, or the resource may be updated later.
If the specified driver is a dynamic driver (available from API microversion
1.31), then all the interfaces (boot_interface, deploy_interface, etc.)
will be set to the default interface for that driver unless another enabled
interface is specified in the creation request.
API microversion 1.2 introduced the new ``available`` state name, which replaced
``None`` as the status of an unprovisioned Node. All clients should be updated to
use the new ``available`` state name.
Nodes in the ``available`` state may have workloads provisioned on them; they are
"available" for use.
API microversion 1.11 changed the default initial state of newly-created Nodes
from ``available`` to ``enroll``. This provides users a workflow to verify the
manageability of a Node and perform necessary operational functions (eg, building
a RAID array) before making the Node available for provisioning.
Normal response codes: 201
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- driver: r_driver_name
**Example Node creation request with a dynamic driver:**
.. literalinclude:: samples/node-create-request-dynamic.json
:language: javascript
**Example Node creation request with a classic driver:**
.. literalinclude:: samples/node-create-request-classic.json
:language: javascript
Response
--------
The response will contain the complete Node record, with the supplied data,
and any defaults added for non-specified fields. Most fields default to "null"
or "".
API microversion 1.5 introduced the ``name`` field.
API microversion 1.7 introduced the ``clean_step`` field`
API microversion 1.12 introduced support for the ``raid_config`` and
``target_raid_config`` fields.
API microversion 1.20 introduced the ``network_interface`` field. If this field
is not supplied when creating the Node, the default value will be used.
API microversion 1.21 introduced the ``resource_class`` field, which may be
used to store a resource designation for the proposed OpenStack Placement
Engine. This field has no effect within Ironic.
API microversion 1.24 introduced the ``/nodes/{node_ident}/portgroups``
endpoint.
API microversion 1.31 introduced all of the ``*_interface`` fields
(boot_interface, deploy_interface, etc.), with the exception of the
network_interface field, which was introduced in API microversion 1.20. If this
field is not supplied when creating the Node, the default value will be used.
The list and example below are representative of the response as of API
microversion 1.31.
.. rest_parameters:: parameters.yaml
- uuid: uuid
- name: node_name
- power_state: power_state
- target_power_state: target_power_state
- provision_state: provision_state
- target_provision_state: target_provision_state
- maintenance: maintenance
- maintenance_reason: maintenance_reason
- last_error: last_error
- reservation: reservation
- driver: driver_name
- driver_info: driver_info
- driver_internal_info: driver_internal_info
- properties: n_properties
- instance_info: instance_info
- instance_uuid: instance_uuid
- chassis_uuid: chassis_uuid
- extra: extra
- console_enabled: console_enabled
- raid_config: raid_config
- target_raid_config: target_raid_config
- clean_step: clean_step
- links: links
- ports: n_ports
- portgroups: n_portgroups
- states: n_states
- resource_class: resource_class
- boot_interface: boot_interface
- console_interface: console_interface
- deploy_interface: deploy_interface
- inspect_interface: inspect_interface
- management_interface: management_interface
- network_interface: network_interface
- power_interface: power_interface
- raid_interface: raid_interface
- vendor_interface: vendor_interface
**Example JSON representation of a Node:**
.. literalinclude:: samples/node-create-response.json
:language: javascript
List Nodes
==========
.. rest_method:: GET /v1/nodes
Return a list of bare metal Nodes, with some useful information about
each Node. Some filtering is possible by passing in flags with the request.
By default, this query will return the name, uuid, instance uuid, power state,
provision state, and maintenance setting for each Node.
API microversion 1.8 added the ``fields`` Request parameter. When specified,
this causes the content of the Response to include only the specified fields,
rather than the default set.
API microversion 1.9 added the ``provision_state`` Request parameter, allowing
the list of returned Nodes to be filtered by their current state.
API microversion 1.16 added the ``driver`` Request parameter, allowing
the list of returned Nodes to be filtered by their driver name.
API microversion 1.21 added the ``resource_class`` Request parameter,
allowing the list of returned Nodes to be filtered by this field.
Normal response codes: 200
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- instance_uuid: r_instance_uuid
- maintenance: r_maintenance
- associated: r_associated
- provision_state: r_provision_state
- driver: r_driver
- resource_class: r_resource_class
- fields: fields
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- name: node_name
- instance_uuid: instance_uuid
- power_state: power_state
- provision_state: provision_state
- maintenance: maintenance
- links: links
**Example list of Nodes:**
.. literalinclude:: samples/nodes-list-response.json
:language: javascript
List Nodes Detailed
===================
.. rest_method:: GET /v1/nodes/detail
Return a list of bare metal Nodes with complete details. Some filtering is
possible by passing in flags with the request.
This method is particularly useful to locate the Node associated to a given
Nova instance, eg. with a request to ``v1/nodes/detail?instance_uuid={NOVA INSTANCE UUID}``
Normal response codes: 200
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- instance_uuid: r_instance_uuid
- maintenance: r_maintenance
- associated: r_associated
- provision_state: r_provision_state
- driver: r_driver
- resource_class: r_resource_class
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- name: node_name
- power_state: power_state
- target_power_state: target_power_state
- provision_state: provision_state
- target_provision_state: target_provision_state
- maintenance: maintenance
- maintenance_reason: maintenance_reason
- last_error: last_error
- reservation: reservation
- driver: driver_name
- driver_info: driver_info
- driver_internal_info: driver_internal_info
- properties: n_properties
- instance_info: instance_info
- instance_uuid: instance_uuid
- chassis_uuid: chassis_uuid
- extra: extra
- console_enabled: console_enabled
- raid_config: raid_config
- target_raid_config: target_raid_config
- clean_step: clean_step
- links: links
- ports: n_ports
- portgroups: n_portgroups
- states: n_states
- resource_class: resource_class
- boot_interface: boot_interface
- console_interface: console_interface
- deploy_interface: deploy_interface
- inspect_interface: inspect_interface
- management_interface: management_interface
- network_interface: network_interface
- power_interface: power_interface
- raid_interface: raid_interface
- vendor_interface: vendor_interface
**Example detailed list of Nodes:**
.. literalinclude:: samples/nodes-list-details-response.json
:language: javascript
Show Node Details
=================
.. rest_method:: GET /v1/nodes/{node_ident}
Shows details for a node. By default, this will return the full representation
of the resource; an optional ``fields`` parameter can be supplied to return
only the specified set.
Normal response codes: 200
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- fields: fields
Response
--------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- name: node_name
- power_state: power_state
- target_power_state: target_power_state
- provision_state: provision_state
- target_provision_state: target_provision_state
- maintenance: maintenance
- maintenance_reason: maintenance_reason
- last_error: last_error
- reservation: reservation
- driver: driver_name
- driver_info: driver_info
- driver_internal_info: driver_internal_info
- properties: n_properties
- instance_info: instance_info
- instance_uuid: instance_uuid
- chassis_uuid: chassis_uuid
- extra: extra
- console_enabled: console_enabled
- raid_config: raid_config
- target_raid_config: target_raid_config
- clean_step: clean_step
- links: links
- ports: n_ports
- portgroups: n_portgroups
- states: n_states
- resource_class: resource_class
- boot_interface: boot_interface
- console_interface: console_interface
- deploy_interface: deploy_interface
- inspect_interface: inspect_interface
- management_interface: management_interface
- network_interface: network_interface
- power_interface: power_interface
- raid_interface: raid_interface
- vendor_interface: vendor_interface
**Example JSON representation of a Node:**
.. literalinclude:: samples/node-show-response.json
:language: javascript
Update Node
===========
.. rest_method:: PATCH /v1/nodes/{node_ident}
Updates the information stored about a Node.
Note that this endpoint can not be used to request state changes, which are
managed through sub-resources.
API microversion 1.25 introduced the ability to unset a node's chassis UUID.
Normal response codes: 200
.. TODO: add error codes
Request
-------
The BODY of the PATCH request must be a JSON PATCH document, adhering to
`RFC 6902 <https://tools.ietf.org/html/rfc6902>`_.
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
**Example PATCH document updating Node driver_info:**
.. literalinclude:: samples/node-update-driver-info-request.json
Response
--------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- name: node_name
- power_state: power_state
- target_power_state: target_power_state
- provision_state: provision_state
- target_provision_state: target_provision_state
- maintenance: maintenance
- maintenance_reason: maintenance_reason
- last_error: last_error
- reservation: reservation
- driver: driver_name
- driver_info: driver_info
- driver_internal_info: driver_internal_info
- properties: n_properties
- instance_info: instance_info
- instance_uuid: instance_uuid
- chassis_uuid: chassis_uuid
- extra: extra
- console_enabled: console_enabled
- raid_config: raid_config
- target_raid_config: target_raid_config
- clean_step: clean_step
- links: links
- ports: n_ports
- portgroups: n_portgroups
- states: n_states
- resource_class: resource_class
- boot_interface: boot_interface
- console_interface: console_interface
- deploy_interface: deploy_interface
- inspect_interface: inspect_interface
- management_interface: management_interface
- network_interface: network_interface
- power_interface: power_interface
- raid_interface: raid_interface
- vendor_interface: vendor_interface
**Example JSON representation of a Node:**
.. literalinclude:: samples/node-update-driver-info-response.json
:language: javascript
Delete Node
===========
.. rest_method:: DELETE /v1/nodes/{node_ident}
Deletes a node.
Normal response codes: 204
.. TODO: add error codes
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident

View File

@ -1,106 +0,0 @@
.. -*- rst -*-
=============================================
Listing Ports by Portgroup (portgroup, ports)
=============================================
Given a Portgroup identifier (``uuid`` or ``name``), the API exposes the list
of, and details of, all Ports associated with that Portgroup.
These endpoints do not allow modification of the Ports; that should be done
by accessing the Port resources under the ``/v1/ports`` endpoint.
API microversion 1.24 added the ``/v1/portgroups/{portgroup_ident}/ports``
endpoint. If using an older version, all requests to this endpoint will return
a ``Not Found (404)`` error code.
List Ports by Portgroup
=======================
.. rest_method:: GET /v1/portgroups/{portgroup_ident}/ports
Return a list of bare metal Ports associated with ``portgroup_ident``.
When specified, the ``fields`` request parameter causes the content of the
Response to include only the specified fields, rather than the default set.
API microversion 1.34 added the ``physical_network`` field.
Normal response code: 200
Error codes: 400,401,403,404
Request
-------
.. rest_parameters:: parameters.yaml
- portgroup_ident: portgroup_ident
- fields: fields
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- ports: ports
- uuid: uuid
- address: port_address
- links: links
**Example list of a Portgroup's Ports:**
.. literalinclude:: samples/portgroup-port-list-response.json
List detailed Ports by Portgroup
================================
.. rest_method:: GET /v1/portgroups/{portgroup_ident}/ports/detail
Return a detailed list of bare metal Ports associated with ``portgroup_ident``.
API microversion 1.34 added the ``physical_network`` field.
Normal response code: 200
Error codes: 400,401,403,404
Request
-------
.. rest_parameters:: parameters.yaml
- portgroup_ident: portgroup_ident
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- ports: ports
- uuid: uuid
- address: port_address
- node_uuid: node_uuid
- local_link_connection: local_link_connection
- pxe_enabled: pxe_enabled
- physical_network: physical_network
- internal_info: internal_info
- extra: extra
- portgroup_uuid: portgroup_uuid
- created_at: created_at
- updated_at: updated_at
- links: links
**Example details of a Portgroup's Ports:**
.. literalinclude:: samples/portgroup-port-detail-response.json

View File

@ -1,275 +0,0 @@
.. -*- rst -*-
=======================
Portgroups (portgroups)
=======================
Starting with API version 1.23 ports can be combined into portgroups to support
static link aggregation group (LAG) or multi-chassis link aggregation group
(MLAG) configurations. Listing, Searching, Creating, Updating, and Deleting of
bare metal Portgroup resources are done through the ``v1/portgroups`` resource.
All Portgroups must be associated with a Node when created. This association
can be changed, though the request may be rejected if either the current
or destination Node are in a transitive state (for example, in the process of
deploying) or are in a state that would be non-deterministically affected by
such a change (for example, there is an active user instance on the Node).
List Portgroups
===============
.. rest_method:: GET /v1/portgroups
Return a list of bare metal Portgroups. Some filtering is possible by passing in
some parameters with the request.
By default, this query will return the UUID, name and address for each Portgroup.
Normal response code: 200
Error codes: 400,401,403,404
Request
-------
.. rest_parameters:: parameters.yaml
- node: r_portgroup_node_ident
- address: r_portgroup_address
- fields: fields
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- portgroups: portgroups
- uuid: uuid
- address: portgroup_address
- name: portgroup_name
- links: links
**Example Portgroup list response:**
.. literalinclude:: samples/portgroup-list-response.json
:language: javascript
Create Portgroup
================
.. rest_method:: POST /v1/portgroups
Creates a new Portgroup resource.
This method requires a Node UUID and the physical hardware address for the
Portgroup (MAC address in most cases).
Normal response code: 201
Error codes: 400,401,403,404
Request
-------
.. rest_parameters:: parameters.yaml
- node_uuid: node_uuid
- address: portgroup_address
**Example Portgroup creation request:**
.. literalinclude:: samples/portgroup-create-request.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- name: portgroup_name
- address: portgroup_address
- node_uuid: node_uuid
- standalone_ports_supported: standalone_ports_supported
- internal_info: portgroup_internal_info
- extra: extra
- mode: portgroup_mode
- properties: portgroup_properties
- created_at: created_at
- updated_at: updated_at
- links: links
- ports: pg_ports
**Example Portgroup creation response:**
.. literalinclude:: samples/portgroup-create-response.json
:language: javascript
List Detailed Portgroups
========================
.. rest_method:: GET /v1/portgroups/detail
Return a list of bare metal Portgroups, with detailed information.
Normal response code: 200
Error codes: 400,401,403,404
Request
-------
.. rest_parameters:: parameters.yaml
- node: r_portgroup_node_ident
- address: r_portgroup_address
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- portgroups: portgroups
- name: portgroup_name
- uuid: uuid
- address: portgroup_address
- node_uuid: node_uuid
- standalone_ports_supported: standalone_ports_supported
- internal_info: portgroup_internal_info
- extra: extra
- mode: portgroup_mode
- properties: portgroup_properties
- created_at: created_at
- updated_at: updated_at
- links: links
- ports: pg_ports
**Example detailed Portgroup list response:**
.. literalinclude:: samples/portgroup-list-detail-response.json
:language: javascript
Show Portgroup Details
======================
.. rest_method:: GET /v1/portgroups/{portgroup_id}
Show details for the given Portgroup.
Normal response code: 200
Error codes: 400,401,403,404
Request
-------
.. rest_parameters:: parameters.yaml
- portgroup_id: portgroup_ident
- fields: fields
Response
--------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- name: portgroup_name
- address: portgroup_address
- node_uuid: node_uuid
- standalone_ports_supported: standalone_ports_supported
- internal_info: portgroup_internal_info
- extra: extra
- mode: portgroup_mode
- properties: portgroup_properties
- created_at: created_at
- updated_at: updated_at
- links: links
- ports: pg_ports
**Example Portgroup details:**
.. literalinclude:: samples/portgroup-create-response.json
:language: javascript
Update a Portgroup
==================
.. rest_method:: PATCH /v1/portgroups/{portgroup_id}
Update a Portgroup.
Normal response code: 200
Error codes: 400,401,403,404
Request
-------
The BODY of the PATCH request must be a JSON PATCH document, adhering to
`RFC 6902 <https://tools.ietf.org/html/rfc6902>`_.
.. rest_parameters:: parameters.yaml
- portgroup_id: portgroup_ident
**Example Portgroup update request:**
.. literalinclude:: samples/portgroup-update-request.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- name: portgroup_name
- address: portgroup_address
- node_uuid: node_uuid
- standalone_ports_supported: standalone_ports_supported
- internal_info: portgroup_internal_info
- extra: extra
- mode: portgroup_mode
- properties: portgroup_properties
- created_at: created_at
- updated_at: updated_at
- links: links
- ports: pg_ports
**Example Portgroup update response:**
.. literalinclude:: samples/portgroup-update-response.json
:language: javascript
Delete Portgroup
================
.. rest_method:: DELETE /v1/portgroups/{portgroup_id}
Delete a Portgroup.
Normal response code: 204
Error codes: 400,401,403,404
Request
-------
.. rest_parameters:: parameters.yaml
- portgroup_id: portgroup_ident

View File

@ -1,318 +0,0 @@
.. -*- rst -*-
=============
Ports (ports)
=============
Listing, Searching, Creating, Updating, and Deleting of bare metal Port
resources are done through the ``ports`` resource.
All Ports must be associated to a Node when created. This association
can be changed, though the request may be rejected if either the current
or destination Node are in a transitive state (e.g., in the process of
deploying) or are in a state that would be non-deterministically affected by
such a change (e.g., there is an active user instance on the Node).
List Ports
==========
.. rest_method:: GET /v1/ports
Return a list of bare metal Ports. Some filtering is possible by passing in
some parameters with the request.
By default, this query will return the uuid and address for each Port.
API microversion 1.6 added the ``node`` query parameter. If both ``node_uuid``
and ``node`` are specified in the request, ``node_uuid`` will be used to filter
results.
API microversion 1.8 added the ``fields`` request parameter. When specified,
this causes the content of the response to include only the specified fields,
rather than the default set.
API microversion 1.19 added the ``pxe_enabled`` and ``local_link_connection``
fields.
API microversion 1.24 added the ``portgroup_uuid`` field.
API microversion 1.34 added the ``physical_network`` field.
Normal response code: 200
Request
-------
.. rest_parameters:: parameters.yaml
- node: r_port_node_ident
- node_uuid: r_port_node_uuid
- portgroup: r_port_portgroup_ident
- address: r_port_address
- fields: fields
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- ports: ports
- uuid: uuid
- address: port_address
- links: links
**Example Port list response:**
.. literalinclude:: samples/port-list-response.json
:language: javascript
Create Port
===========
.. rest_method:: POST /v1/ports
Creates a new Port resource.
This method requires a Node UUID and the physical hardware address for the Port
(MAC address in most cases).
API microversion 1.19 added the ``pxe_enabled`` and ``local_link_connection``
request and response fields.
API microversion 1.24 added the ``portgroup_uuid`` request and response fields.
API microversion 1.34 added the ``physical_network`` request and response
fields.
Normal response code: 201
Request
-------
.. rest_parameters:: parameters.yaml
- node_uuid: node_uuid
- address: port_address
- portgroup_uuid: portgroup_uuid
- local_link_connection: local_link_connection
- pxe_enabled: pxe_enabled
- physical_network: physical_network
- extra: extra
**Example Port creation request:**
.. literalinclude:: samples/port-create-request.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- address: port_address
- node_uuid: node_uuid
- portgroup_uuid: portgroup_uuid
- local_link_connection: local_link_connection
- pxe_enabled: pxe_enabled
- physical_network: physical_network
- internal_info: internal_info
- extra: extra
- created_at: created_at
- updated_at: updated_at
- links: links
**Example Port creation response:**
.. literalinclude:: samples/port-create-response.json
:language: javascript
List Detailed Ports
===================
.. rest_method:: GET /v1/ports/detail
Return a list of bare metal Ports, with detailed information.
API microversion 1.6 added the ``node`` query parameter. If both ``node_uuid``
and ``node`` are specified in the request, ``node_uuid`` will be used to filter
results.
API microversion 1.19 added the ``pxe_enabled`` and ``local_link_connection``
response fields.
API microversion 1.24 added the ``portgroup`` query parameter and
``portgroup_uuid`` response field.
API microversion 1.34 added the ``physical_network`` response field.
Normal response code: 200
Request
-------
.. rest_parameters:: parameters.yaml
- node: r_port_node_ident
- node_uuid: r_port_node_uuid
- portgroup: r_port_portgroup_ident
- address: r_port_address
- limit: limit
- marker: marker
- sort_dir: sort_dir
- sort_key: sort_key
Response
--------
.. rest_parameters:: parameters.yaml
- ports: ports
- uuid: uuid
- address: port_address
- node_uuid: node_uuid
- portgroup_uuid: portgroup_uuid
- local_link_connection: local_link_connection
- pxe_enabled: pxe_enabled
- physical_network: physical_network
- internal_info: internal_info
- extra: extra
- created_at: created_at
- updated_at: updated_at
- links: links
**Example detailed Port list response:**
.. literalinclude:: samples/port-list-detail-response.json
:language: javascript
Show Port Details
=================
.. rest_method:: GET /v1/ports/{port_id}
Show details for the given Port.
API microversion 1.8 added the ``fields`` request parameter. When specified,
this causes the content of the response to include only the specified fields,
rather than the default set.
API microversion 1.19 added the ``pxe_enabled`` and ``local_link_connection``
response fields.
API microversion 1.24 added the ``portgroup_uuid`` response field.
API microversion 1.34 added the ``physical_network`` response field.
Normal response code: 200
Request
-------
.. rest_parameters:: parameters.yaml
- port_id: port_ident
- fields: fields
Response
--------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- address: port_address
- node_uuid: node_uuid
- portgroup_uuid: portgroup_uuid
- local_link_connection: local_link_connection
- pxe_enabled: pxe_enabled
- physical_network: physical_network
- internal_info: internal_info
- extra: extra
- created_at: created_at
- updated_at: updated_at
- links: links
**Example Port details:**
.. literalinclude:: samples/port-create-response.json
:language: javascript
Update a Port
=============
.. rest_method:: PATCH /v1/ports/{port_id}
Update a Port.
API microversion 1.19 added the ``pxe_enabled`` and ``local_link_connection``
fields.
API microversion 1.24 added the ``portgroup_uuid`` field.
API microversion 1.34 added the ``physical_network`` field.
Normal response code: 200
Request
-------
The BODY of the PATCH request must be a JSON PATCH document, adhering to
`RFC 6902 <https://tools.ietf.org/html/rfc6902>`_.
.. rest_parameters:: parameters.yaml
- port_id: port_ident
**Example Port update request:**
.. literalinclude:: samples/port-update-request.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- uuid: uuid
- address: port_address
- node_uuid: node_uuid
- portgroup_uuid: portgroup_uuid
- local_link_connection: local_link_connection
- pxe_enabled: pxe_enabled
- physical_network: physical_network
- internal_info: internal_info
- extra: extra
- created_at: created_at
- updated_at: updated_at
- links: links
**Example Port update response:**
.. literalinclude:: samples/port-update-response.json
:language: javascript
Delete Port
===========
.. rest_method:: DELETE /v1/ports/{port_id}
Delete a Port.
Normal response code: 204
Request
-------
.. rest_parameters:: parameters.yaml
- port_id: port_ident

View File

@ -1,80 +0,0 @@
.. -*- rst -*-
============
API versions
============
Concepts
========
In order to bring new features to users over time, the Ironic API
supports versioning. There are two kinds of versions in Ironic.
- ''major versions'', which have dedicated urls.
- ''microversions'', which can be requested through the use of the
``X-OpenStack-Ironic-API-Version`` header.
The Version APIs work differently from other APIs as they *do not* require authentication.
Beginning with the Kilo release, all API requests support the
``X-OpenStack-Ironic-API-Version`` header. This header SHOULD be supplied
with every request; in the absence of this header, each request is treated
as though coming from an older pre-Kilo client. This was done to preserve
backwards compatibility as we introduced new features in the server.
List API versions
=================
.. rest_method:: GET /
This fetches all the information about all known major API versions in the
deployment. Links to more specific information will be provided for each major
API version, as well as information about supported min and max microversions.
Normal response codes: 200
Request
-------
Response Example
----------------
.. rest_parameters:: parameters.yaml
- description: description
- versions: versions
- version: version
- id: id
- links: links
- min_version: x-openstack-ironic-api-min-version
.. literalinclude:: samples/api-root-response.json
:language: javascript
Show v1 API
===========
.. rest_method:: GET /v1/
Show all the resources within the Ironic v1 API.
Normal response codes: 200
Request
-------
Response Example
----------------
.. rest_parameters:: parameters.yaml
- id: id
- links: links
- openstack-request-id: openstack-request-id
- x-openstack-ironic-api-version: header_version
- x-openstack-ironic-api-min-version: x-openstack-ironic-api-min-version
- x-openstack-ironic-api-max-version: x-openstack-ironic-api-max-version
.. literalinclude:: samples/api-v1-root-response.json
:language: javascript

View File

@ -1,231 +0,0 @@
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# ironic documentation build configuration file, created by
# sphinx-quickstart on Sat May 1 15:17:47 2010.
#
# This file is execfile()d with the current directory set to
# its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
import subprocess
import sys
import openstackdocstheme
html_theme = 'openstackdocs'
html_theme_path = [openstackdocstheme.get_html_theme_path()]
html_theme_options = {
"sidebar_mode": "toc",
}
extensions = [
'os_api_ref',
]
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../../'))
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('./'))
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#
# source_encoding = 'utf-8'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Ironic API Reference'
copyright = u'OpenStack Foundation'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
from ironic.version import version_info
# The full version, including alpha/beta/rc tags.
release = version_info.release_string()
# The short X.Y version.
version = version_info.version_string()
# Config logABug feature
giturl = u'https://git.openstack.org/cgit/openstack/ironic/tree/api-ref/source'
# source tree
# html_context allows us to pass arbitrary values into the html template
html_context = {"bug_tag": "api-ref",
"giturl": giturl,
"bug_project": "ironic"}
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'
# The reST default role (used for this markup: `text`) to use
# for all documents.
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = False
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for man page output ----------------------------------------------
# Grouping the document tree for man pages.
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y'
git_cmd = ["git", "log", "--pretty=format:%ad, commit %h", "--date=local",
"-n1"]
html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}
# If false, no module index is generated.
# html_use_modindex = True
# If false, no index is generated.
# html_use_index = True
# If true, the index is split into individual pages for each letter.
# html_split_index = False
# If true, links to the reST sources are added to the pages.
# html_show_sourcelink = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
# html_use_opensearch = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'ironicdoc'
# -- Options for LaTeX output -------------------------------------------------
# The paper size ('letter' or 'a4').
# latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
# latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index', 'Ironic.tex', u'OpenStack Bare Metal API Documentation',
u'OpenStack Foundation', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False
# Additional stuff for the LaTeX preamble.
# latex_preamble = ''
# Documents to append as an appendix to all manuals.
# latex_appendices = []
# If false, no module index is generated.
# latex_use_modindex = True

View File

@ -1,23 +0,0 @@
:tocdepth: 2
================
Bare Metal API
================
.. rest_expand_all::
.. include:: baremetal-api-versions.inc
.. include:: baremetal-api-v1-nodes.inc
.. include:: baremetal-api-v1-node-management.inc
.. include:: baremetal-api-v1-node-passthru.inc
.. include:: baremetal-api-v1-nodes-vifs.inc
.. include:: baremetal-api-v1-portgroups.inc
.. include:: baremetal-api-v1-nodes-portgroups.inc
.. include:: baremetal-api-v1-ports.inc
.. include:: baremetal-api-v1-nodes-ports.inc
.. include:: baremetal-api-v1-portgroups-ports.inc
.. include:: baremetal-api-v1-drivers.inc
.. include:: baremetal-api-v1-driver-passthru.inc
.. include:: baremetal-api-v1-chassis.inc
.. include:: baremetal-api-v1-misc.inc

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +0,0 @@
{
"default_version": {
"id": "v1",
"links": [
{
"href": "http://127.0.0.1:6385/v1/",
"rel": "self"
}
],
"min_version": "1.1",
"status": "CURRENT",
"version": "1.31"
},
"description": "Ironic is an OpenStack project which aims to provision baremetal machines.",
"name": "OpenStack Ironic API",
"versions": [
{
"id": "v1",
"links": [
{
"href": "http://127.0.0.1:6385/v1/",
"rel": "self"
}
],
"min_version": "1.1",
"status": "CURRENT",
"version": "1.31"
}
]
}

View File

@ -1,90 +0,0 @@
{
"chassis": [
{
"href": "http://127.0.0.1:6385/v1/chassis/",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/chassis/",
"rel": "bookmark"
}
],
"drivers": [
{
"href": "http://127.0.0.1:6385/v1/drivers/",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/",
"rel": "bookmark"
}
],
"heartbeat": [
{
"href": "http://127.0.0.1:6385/v1/heartbeat/",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/heartbeat/",
"rel": "bookmark"
}
],
"id": "v1",
"links": [
{
"href": "http://127.0.0.1:6385/v1/",
"rel": "self"
},
{
"href": "https://docs.openstack.org/ironic/latest/contributor/webapi.html",
"rel": "describedby",
"type": "text/html"
}
],
"lookup": [
{
"href": "http://127.0.0.1:6385/v1/lookup/",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/lookup/",
"rel": "bookmark"
}
],
"media_types": [
{
"base": "application/json",
"type": "application/vnd.openstack.ironic.v1+json"
}
],
"nodes": [
{
"href": "http://127.0.0.1:6385/v1/nodes/",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/",
"rel": "bookmark"
}
],
"portgroups": [
{
"href": "http://127.0.0.1:6385/v1/portgroups/",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/portgroups/",
"rel": "bookmark"
}
],
"ports": [
{
"href": "http://127.0.0.1:6385/v1/ports/",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/ports/",
"rel": "bookmark"
}
]
}

View File

@ -1,3 +0,0 @@
{
"description": "Sample chassis"
}

View File

@ -1,31 +0,0 @@
{
"chassis": [
{
"created_at": "2016-08-18T22:28:48.643434+11:11",
"description": "Sample chassis",
"extra": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1",
"rel": "bookmark"
}
],
"nodes": [
{
"href": "http://127.0.0.1:6385/v1/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1/nodes",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1/nodes",
"rel": "bookmark"
}
],
"updated_at": null,
"uuid": "dff29d23-1ded-43b4-8ae1-5eebb3e30de1"
}
]
}

View File

@ -1,18 +0,0 @@
{
"chassis": [
{
"description": "Sample chassis",
"links": [
{
"href": "http://127.0.0.1:6385/v1/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1",
"rel": "bookmark"
}
],
"uuid": "dff29d23-1ded-43b4-8ae1-5eebb3e30de1"
}
]
}

View File

@ -1,27 +0,0 @@
{
"created_at": "2016-08-18T22:28:48.643434+11:11",
"description": "Sample chassis",
"extra": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1",
"rel": "bookmark"
}
],
"nodes": [
{
"href": "http://127.0.0.1:6385/v1/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1/nodes",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1/nodes",
"rel": "bookmark"
}
],
"updated_at": null,
"uuid": "dff29d23-1ded-43b4-8ae1-5eebb3e30de1"
}

View File

@ -1,7 +0,0 @@
[
{
"op": "replace",
"path": "/description",
"value": "Updated Chassis"
}
]

View File

@ -1,27 +0,0 @@
{
"created_at": "2016-08-18T22:28:48.643434+11:11",
"description": "Updated Chassis",
"extra": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1",
"rel": "bookmark"
}
],
"nodes": [
{
"href": "http://127.0.0.1:6385/v1/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1/nodes",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/chassis/dff29d23-1ded-43b4-8ae1-5eebb3e30de1/nodes",
"rel": "bookmark"
}
],
"updated_at": "2016-08-18T22:28:49.653974+00:00",
"uuid": "dff29d23-1ded-43b4-8ae1-5eebb3e30de1"
}

View File

@ -1,66 +0,0 @@
{
"default_boot_interface": "pxe",
"default_console_interface": "no-console",
"default_deploy_interface": "iscsi",
"default_inspect_interface": "no-inspect",
"default_management_interface": "ipmitool",
"default_network_interface": "flat",
"default_power_interface": "ipmitool",
"default_raid_interface": "no-raid",
"default_vendor_interface": "no-vendor",
"enabled_boot_interfaces": [
"pxe"
],
"enabled_console_interfaces": [
"no-console"
],
"enabled_deploy_interfaces": [
"iscsi",
"direct"
],
"enabled_inspect_interfaces": [
"no-inspect"
],
"enabled_management_interfaces": [
"ipmitool"
],
"enabled_network_interfaces": [
"flat",
"noop"
],
"enabled_power_interfaces": [
"ipmitool"
],
"enabled_raid_interfaces": [
"no-raid",
"agent"
],
"enabled_vendor_interfaces": [
"no-vendor"
],
"hosts": [
"897ab1dad809"
],
"links": [
{
"href": "http://127.0.0.1:6385/v1/drivers/ipmi",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/ipmi",
"rel": "bookmark"
}
],
"name": "ipmi",
"properties": [
{
"href": "http://127.0.0.1:6385/v1/drivers/ipmi/properties",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/ipmi/properties",
"rel": "bookmark"
}
],
"type": "dynamic"
}

View File

@ -1,12 +0,0 @@
{
"controller": "Controller to use for this logical disk. If not specified, the driver will choose a suitable RAID controller on the bare metal node. Optional.",
"disk_type": "The type of disk preferred. Valid values are 'hdd' and 'ssd'. If this is not specified, disk type will not be a selection criterion for choosing backing physical disks. Optional.",
"interface_type": "The interface type of disk. Valid values are 'sata', 'scsi' and 'sas'. If this is not specified, interface type will not be a selection criterion for choosing backing physical disks. Optional.",
"is_root_volume": "Specifies whether this disk is a root volume. By default, this is False. Optional.",
"number_of_physical_disks": "Number of physical disks to use for this logical disk. By default, the driver uses the minimum number of disks required for that RAID level. Optional.",
"physical_disks": "The physical disks to use for this logical disk. If not specified, the driver will choose suitable physical disks to use. Optional.",
"raid_level": "RAID level for the logical disk. Valid values are 'JBOD', '0', '1', '2', '5', '6', '1+0', '5+0' and '6+0'. Required.",
"share_physical_disks": "Specifies whether other logical disks can share physical disks with this logical disk. By default, this is False. Optional.",
"size_gb": "Size in GiB (Integer) for the logical disk. Use 'MAX' as size_gb if this logical disk is supposed to use the rest of the space available. Required.",
"volume_name": "Name of the volume to be created. If this is not specified, it will be auto-generated. Optional."
}

View File

@ -1,22 +0,0 @@
{
"deploy_forces_oob_reboot": "Whether Ironic should force a reboot of the Node via the out-of-band channel after deployment is complete. Provides compatibility with older deploy ramdisks. Defaults to False. Optional.",
"deploy_kernel": "UUID (from Glance) of the deployment kernel. Required.",
"deploy_ramdisk": "UUID (from Glance) of the ramdisk that is mounted at boot time. Required.",
"image_http_proxy": "URL of a proxy server for HTTP connections. Optional.",
"image_https_proxy": "URL of a proxy server for HTTPS connections. Optional.",
"image_no_proxy": "A comma-separated list of host names, IP addresses and domain names (with optional :port) that will be excluded from proxying. To denote a doman name, use a dot to prefix the domain name. This value will be ignored if ``image_http_proxy`` and ``image_https_proxy`` are not specified. Optional.",
"ipmi_address": "IP address or hostname of the node. Required.",
"ipmi_bridging": "bridging_type; default is \"no\". One of \"single\", \"dual\", \"no\". Optional.",
"ipmi_force_boot_device": "Whether Ironic should specify the boot device to the BMC each time the server is turned on, eg. because the BMC is not capable of remembering the selected boot device across power cycles; default value is False. Optional.",
"ipmi_local_address": "local IPMB address for bridged requests. Used only if ipmi_bridging is set to \"single\" or \"dual\". Optional.",
"ipmi_password": "password. Optional.",
"ipmi_port": "remote IPMI RMCP port. Optional.",
"ipmi_priv_level": "privilege level; default is ADMINISTRATOR. One of ADMINISTRATOR, CALLBACK, OPERATOR, USER. Optional.",
"ipmi_protocol_version": "the version of the IPMI protocol; default is \"2.0\". One of \"1.5\", \"2.0\". Optional.",
"ipmi_target_address": "destination address for bridged request. Required only if ipmi_bridging is set to \"single\" or \"dual\".",
"ipmi_target_channel": "destination channel for bridged request. Required only if ipmi_bridging is set to \"single\" or \"dual\".",
"ipmi_terminal_port": "node's UDP port to connect to. Only required for console access.",
"ipmi_transit_address": "transit address for bridged request. Required only if ipmi_bridging is set to \"dual\".",
"ipmi_transit_channel": "transit channel for bridged request. Required only if ipmi_bridging is set to \"dual\".",
"ipmi_username": "username; default is NULL user. Optional."
}

View File

@ -1,160 +0,0 @@
{
"drivers": [
{
"default_boot_interface": null,
"default_console_interface": null,
"default_deploy_interface": null,
"default_inspect_interface": null,
"default_management_interface": null,
"default_network_interface": null,
"default_power_interface": null,
"default_raid_interface": null,
"default_vendor_interface": null,
"enabled_boot_interfaces": null,
"enabled_console_interfaces": null,
"enabled_deploy_interfaces": null,
"enabled_inspect_interfaces": null,
"enabled_management_interfaces": null,
"enabled_network_interfaces": null,
"enabled_power_interfaces": null,
"enabled_raid_interfaces": null,
"enabled_vendor_interfaces": null,
"hosts": [
"897ab1dad809"
],
"links": [
{
"href": "http://127.0.0.1:6385/v1/drivers/agent_ipmitool",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/agent_ipmitool",
"rel": "bookmark"
}
],
"name": "agent_ipmitool",
"properties": [
{
"href": "http://127.0.0.1:6385/v1/drivers/agent_ipmitool/properties",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/agent_ipmitool/properties",
"rel": "bookmark"
}
],
"type": "classic"
},
{
"default_boot_interface": null,
"default_console_interface": null,
"default_deploy_interface": null,
"default_inspect_interface": null,
"default_management_interface": null,
"default_network_interface": null,
"default_power_interface": null,
"default_raid_interface": null,
"default_vendor_interface": null,
"enabled_boot_interfaces": null,
"enabled_console_interfaces": null,
"enabled_deploy_interfaces": null,
"enabled_inspect_interfaces": null,
"enabled_management_interfaces": null,
"enabled_network_interfaces": null,
"enabled_power_interfaces": null,
"enabled_raid_interfaces": null,
"enabled_vendor_interfaces": null,
"hosts": [
"897ab1dad809"
],
"links": [
{
"href": "http://127.0.0.1:6385/v1/drivers/fake",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/fake",
"rel": "bookmark"
}
],
"name": "fake",
"properties": [
{
"href": "http://127.0.0.1:6385/v1/drivers/fake/properties",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/fake/properties",
"rel": "bookmark"
}
],
"type": "classic"
},
{
"default_boot_interface": "pxe",
"default_console_interface": "no-console",
"default_deploy_interface": "iscsi",
"default_inspect_interface": "no-inspect",
"default_management_interface": "ipmitool",
"default_network_interface": "flat",
"default_power_interface": "ipmitool",
"default_raid_interface": "no-raid",
"default_vendor_interface": "no-vendor",
"enabled_boot_interfaces": [
"pxe"
],
"enabled_console_interfaces": [
"no-console"
],
"enabled_deploy_interfaces": [
"iscsi",
"direct"
],
"enabled_inspect_interfaces": [
"no-inspect"
],
"enabled_management_interfaces": [
"ipmitool"
],
"enabled_network_interfaces": [
"flat",
"noop"
],
"enabled_power_interfaces": [
"ipmitool"
],
"enabled_raid_interfaces": [
"no-raid",
"agent"
],
"enabled_vendor_interfaces": [
"no-vendor"
],
"hosts": [
"897ab1dad809"
],
"links": [
{
"href": "http://127.0.0.1:6385/v1/drivers/ipmi",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/ipmi",
"rel": "bookmark"
}
],
"name": "ipmi",
"properties": [
{
"href": "http://127.0.0.1:6385/v1/drivers/ipmi/properties",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/ipmi/properties",
"rel": "bookmark"
}
],
"type": "dynamic"
}
]
}

View File

@ -1,85 +0,0 @@
{
"drivers": [
{
"hosts": [
"897ab1dad809"
],
"links": [
{
"href": "http://127.0.0.1:6385/v1/drivers/agent_ipmitool",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/agent_ipmitool",
"rel": "bookmark"
}
],
"name": "agent_ipmitool",
"properties": [
{
"href": "http://127.0.0.1:6385/v1/drivers/agent_ipmitool/properties",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/agent_ipmitool/properties",
"rel": "bookmark"
}
],
"type": "classic"
},
{
"hosts": [
"897ab1dad809"
],
"links": [
{
"href": "http://127.0.0.1:6385/v1/drivers/fake",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/fake",
"rel": "bookmark"
}
],
"name": "fake",
"properties": [
{
"href": "http://127.0.0.1:6385/v1/drivers/fake/properties",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/fake/properties",
"rel": "bookmark"
}
],
"type": "classic"
},
{
"hosts": [
"897ab1dad809"
],
"links": [
{
"href": "http://127.0.0.1:6385/v1/drivers/ipmi",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/ipmi",
"rel": "bookmark"
}
],
"name": "ipmi",
"properties": [
{
"href": "http://127.0.0.1:6385/v1/drivers/ipmi/properties",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/drivers/ipmi/properties",
"rel": "bookmark"
}
],
"type": "dynamic"
}
]
}

View File

@ -1,34 +0,0 @@
{
"config": {
"heartbeat_timeout": 300,
"metrics": {
"backend": "noop",
"global_prefix": null,
"prepend_host": false,
"prepend_host_reverse": true,
"prepend_uuid": false
},
"metrics_statsd": {
"statsd_host": "localhost",
"statsd_port": 8125
}
},
"node": {
"driver_internal_info": {
"clean_steps": null
},
"instance_info": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
"rel": "bookmark"
}
],
"properties": {},
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d"
}
}

View File

@ -1,8 +0,0 @@
{
"name": "test_node_classic",
"driver": "agent_ipmitool",
"driver_info": {
"ipmi_username": "ADMIN",
"ipmi_password": "password"
}
}

View File

@ -1,9 +0,0 @@
{
"name": "test_node_dynamic",
"driver": "ipmi",
"driver_info": {
"ipmi_username": "ADMIN",
"ipmi_password": "password"
},
"power_interface": "ipmitool"
}

View File

@ -1,82 +0,0 @@
{
"boot_interface": null,
"chassis_uuid": null,
"clean_step": {},
"console_enabled": false,
"console_interface": null,
"created_at": "2016-08-18T22:28:48.643434+11:11",
"deploy_interface": null,
"driver": "agent_ipmitool",
"driver_info": {
"ipmi_password": "******",
"ipmi_username": "ADMIN"
},
"driver_internal_info": {},
"extra": {},
"inspect_interface": null,
"inspection_finished_at": null,
"inspection_started_at": null,
"instance_info": {},
"instance_uuid": null,
"last_error": null,
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
"rel": "bookmark"
}
],
"maintenance": false,
"maintenance_reason": null,
"management_interface": null,
"name": "test_node_classic",
"network_interface": "flat",
"portgroups": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/portgroups",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/portgroups",
"rel": "bookmark"
}
],
"ports": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/ports",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/ports",
"rel": "bookmark"
}
],
"power_interface": null,
"power_state": null,
"properties": {},
"provision_state": "enroll",
"provision_updated_at": null,
"raid_config": {},
"raid_interface": null,
"reservation": null,
"resource_class": null,
"states": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/states",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/states",
"rel": "bookmark"
}
],
"target_power_state": null,
"target_provision_state": null,
"target_raid_config": {},
"updated_at": null,
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"vendor_interface": null
}

View File

@ -1,4 +0,0 @@
{
"boot_device": "pxe",
"persistent": false
}

View File

@ -1,11 +0,0 @@
{
"console_enabled": false,
"last_error": null,
"power_state": "power off",
"provision_state": "available",
"provision_updated_at": "2016-08-18T22:28:49.946416+00:00",
"raid_config": {},
"target_power_state": null,
"target_provision_state": null,
"target_raid_config": {}
}

View File

@ -1,5 +0,0 @@
{
"supported_boot_devices": [
"pxe"
]
}

View File

@ -1 +0,0 @@
{}

View File

@ -1,3 +0,0 @@
{
"reason": "Replacing the hard drive"
}

View File

@ -1,31 +0,0 @@
{
"ports": [
{
"address": "22:22:22:22:22:22",
"created_at": "2016-08-18T22:28:48.643434+11:11",
"extra": {},
"internal_info": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "bookmark"
}
],
"local_link_connection": {
"port_id": "Ethernet3/1",
"switch_id": "0a:1b:2c:3d:4e:5f",
"switch_info": "switch1"
},
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"physical_network": "physnet1",
"portgroup_uuid": "e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"pxe_enabled": true,
"updated_at": "2016-08-18T22:28:49.653974+00:00",
"uuid": "d2b30520-907d-46c8-bfee-c5586e6fb3a1"
}
]
}

View File

@ -1,18 +0,0 @@
{
"ports": [
{
"address": "22:22:22:22:22:22",
"links": [
{
"href": "http://127.0.0.1:6385/v1/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "bookmark"
}
],
"uuid": "d2b30520-907d-46c8-bfee-c5586e6fb3a1"
}
]
}

View File

@ -1,37 +0,0 @@
{
"portgroups": [
{
"address": "22:22:22:22:22:22",
"created_at": "2016-08-18T22:28:48.643434+11:11",
"extra": {},
"internal_info": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"rel": "bookmark"
}
],
"mode": "active-backup",
"name": "test_portgroup",
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"ports": [
{
"href": "http://127.0.0.1:6385/v1/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a/ports",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a/ports",
"rel": "bookmark"
}
],
"properties": {},
"standalone_ports_supported": true,
"updated_at": "2016-08-18T22:28:49.653974+00:00",
"uuid": "e43c722c-248e-4c6e-8ce8-0d8ff129387a"
}
]
}

View File

@ -1,19 +0,0 @@
{
"portgroups": [
{
"address": "22:22:22:22:22:22",
"links": [
{
"href": "http://127.0.0.1:6385/v1/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"rel": "bookmark"
}
],
"name": "test_portgroup",
"uuid": "e43c722c-248e-4c6e-8ce8-0d8ff129387a"
}
]
}

View File

@ -1,4 +0,0 @@
{
"target": "active",
"configdrive": "http://127.0.0.1/images/test-node-config-drive.iso.gz"
}

View File

@ -1,3 +0,0 @@
{
"target": "provide"
}

View File

@ -1,4 +0,0 @@
{
"boot_device": "pxe",
"persistent": false
}

View File

@ -1,12 +0,0 @@
{
"target": "clean",
"clean_steps": [
{
"interface": "deploy",
"step": "upgrade_firmware",
"args": {
"force": "True"
}
}
]
}

View File

@ -1,3 +0,0 @@
{
"target": "manage"
}

View File

@ -1,3 +0,0 @@
{
"target": "power off"
}

View File

@ -1,9 +0,0 @@
{
"logical_disks" : [
{
"size_gb" : 100,
"is_root_volume" : true,
"raid_level" : "1"
}
]
}

View File

@ -1,4 +0,0 @@
{
"target": "soft power off",
"timeout": 300
}

View File

@ -1,84 +0,0 @@
{
"boot_interface": null,
"chassis_uuid": null,
"clean_step": {},
"console_enabled": false,
"console_interface": null,
"created_at": "2016-08-18T22:28:48.643434+11:11",
"deploy_interface": null,
"driver": "fake",
"driver_info": {
"ipmi_password": "******",
"ipmi_username": "ADMIN"
},
"driver_internal_info": {
"clean_steps": null
},
"extra": {},
"inspect_interface": null,
"inspection_finished_at": null,
"inspection_started_at": null,
"instance_info": {},
"instance_uuid": null,
"last_error": null,
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
"rel": "bookmark"
}
],
"maintenance": false,
"maintenance_reason": null,
"management_interface": null,
"name": "test_node_classic",
"network_interface": "flat",
"portgroups": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/portgroups",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/portgroups",
"rel": "bookmark"
}
],
"ports": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/ports",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/ports",
"rel": "bookmark"
}
],
"power_interface": null,
"power_state": "power off",
"properties": {},
"provision_state": "available",
"provision_updated_at": "2016-08-18T22:28:49.946416+00:00",
"raid_config": {},
"raid_interface": null,
"reservation": null,
"resource_class": null,
"states": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/states",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/states",
"rel": "bookmark"
}
],
"target_power_state": null,
"target_provision_state": null,
"target_raid_config": {},
"updated_at": "2016-08-18T22:28:49.653974+00:00",
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"vendor_interface": null
}

View File

@ -1,17 +0,0 @@
[
{
"op": "replace",
"path": "/driver_info/ipmi_username",
"value": "OPERATOR"
},
{
"op": "add",
"path": "/driver_info/deploy_kernel",
"value": "http://127.0.0.1/images/kernel"
},
{
"op": "add",
"path": "/driver_info/deploy_ramdisk",
"value": "http://127.0.0.1/images/ramdisk"
}
]

View File

@ -1,86 +0,0 @@
{
"boot_interface": null,
"chassis_uuid": null,
"clean_step": {},
"console_enabled": false,
"console_interface": null,
"created_at": "2016-08-18T22:28:48.643434+11:11",
"deploy_interface": null,
"driver": "fake",
"driver_info": {
"deploy_kernel": "http://127.0.0.1/images/kernel",
"deploy_ramdisk": "http://127.0.0.1/images/ramdisk",
"ipmi_password": "******",
"ipmi_username": "OPERATOR"
},
"driver_internal_info": {
"clean_steps": null
},
"extra": {},
"inspect_interface": null,
"inspection_finished_at": null,
"inspection_started_at": null,
"instance_info": {},
"instance_uuid": null,
"last_error": null,
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
"rel": "bookmark"
}
],
"maintenance": true,
"maintenance_reason": "Replacing the hard drive",
"management_interface": null,
"name": "test_node_classic",
"network_interface": "flat",
"portgroups": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/portgroups",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/portgroups",
"rel": "bookmark"
}
],
"ports": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/ports",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/ports",
"rel": "bookmark"
}
],
"power_interface": null,
"power_state": "power off",
"properties": {},
"provision_state": "available",
"provision_updated_at": "2016-08-18T22:28:49.946416+00:00",
"raid_config": {},
"raid_interface": null,
"reservation": null,
"resource_class": null,
"states": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/states",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/states",
"rel": "bookmark"
}
],
"target_power_state": null,
"target_provision_state": null,
"target_raid_config": {},
"updated_at": "2016-08-18T22:28:49.653974+00:00",
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"vendor_interface": null
}

View File

@ -1,7 +0,0 @@
[
{
"op" : "replace",
"path" : "/driver",
"value" : "fake"
}
]

View File

@ -1,26 +0,0 @@
{
"boot": {
"result": true
},
"console": {
"result": true
},
"deploy": {
"result": true
},
"inspect": {
"result": true
},
"management": {
"result": true
},
"network": {
"result": true
},
"power": {
"result": true
},
"raid": {
"result": true
}
}

View File

@ -1,20 +0,0 @@
{
"bmc_reset": {
"async": true,
"attach": false,
"description": "",
"http_methods": [
"POST"
],
"require_exclusive_lock": true
},
"send_raw": {
"async": true,
"attach": false,
"description": "",
"http_methods": [
"POST"
],
"require_exclusive_lock": true
}
}

View File

@ -1,3 +0,0 @@
{
"id": "1974dcfa-836f-41b2-b541-686c100900e5"
}

View File

@ -1,7 +0,0 @@
{
"vifs": [
{
"id": "1974dcfa-836f-41b2-b541-686c100900e5"
}
]
}

View File

@ -1,170 +0,0 @@
{
"nodes": [
{
"boot_interface": null,
"chassis_uuid": null,
"clean_step": {},
"console_enabled": false,
"console_interface": null,
"created_at": "2016-08-18T22:28:48.643434+11:11",
"deploy_interface": null,
"driver": "fake",
"driver_info": {
"ipmi_password": "******",
"ipmi_username": "ADMIN"
},
"driver_internal_info": {
"clean_steps": null
},
"extra": {},
"inspect_interface": null,
"inspection_finished_at": null,
"inspection_started_at": null,
"instance_info": {},
"instance_uuid": null,
"last_error": null,
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
"rel": "bookmark"
}
],
"maintenance": false,
"maintenance_reason": null,
"management_interface": null,
"name": "test_node_classic",
"network_interface": "flat",
"portgroups": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/portgroups",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/portgroups",
"rel": "bookmark"
}
],
"ports": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/ports",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/ports",
"rel": "bookmark"
}
],
"power_interface": null,
"power_state": "power off",
"properties": {},
"provision_state": "available",
"provision_updated_at": "2016-08-18T22:28:49.946416+00:00",
"raid_config": {},
"raid_interface": null,
"reservation": null,
"resource_class": null,
"states": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/states",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/states",
"rel": "bookmark"
}
],
"target_power_state": null,
"target_provision_state": null,
"target_raid_config": {},
"updated_at": "2016-08-18T22:28:49.653974+00:00",
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"vendor_interface": null
},
{
"boot_interface": "pxe",
"chassis_uuid": null,
"clean_step": {},
"console_enabled": false,
"console_interface": "no-console",
"created_at": "2016-08-18T22:28:48.643434+11:11",
"deploy_interface": "iscsi",
"driver": "ipmi",
"driver_info": {
"ipmi_password": "******",
"ipmi_username": "ADMIN"
},
"driver_internal_info": {},
"extra": {},
"inspect_interface": "no-inspect",
"inspection_finished_at": null,
"inspection_started_at": null,
"instance_info": {},
"instance_uuid": null,
"last_error": null,
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/2b045129-a906-46af-bc1a-092b294b3428",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/2b045129-a906-46af-bc1a-092b294b3428",
"rel": "bookmark"
}
],
"maintenance": false,
"maintenance_reason": null,
"management_interface": "ipmitool",
"name": "test_node_dynamic",
"network_interface": "flat",
"portgroups": [
{
"href": "http://127.0.0.1:6385/v1/nodes/2b045129-a906-46af-bc1a-092b294b3428/portgroups",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/2b045129-a906-46af-bc1a-092b294b3428/portgroups",
"rel": "bookmark"
}
],
"ports": [
{
"href": "http://127.0.0.1:6385/v1/nodes/2b045129-a906-46af-bc1a-092b294b3428/ports",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/2b045129-a906-46af-bc1a-092b294b3428/ports",
"rel": "bookmark"
}
],
"power_interface": "ipmitool",
"power_state": null,
"properties": {},
"provision_state": "enroll",
"provision_updated_at": null,
"raid_config": {},
"raid_interface": "no-raid",
"reservation": null,
"resource_class": null,
"states": [
{
"href": "http://127.0.0.1:6385/v1/nodes/2b045129-a906-46af-bc1a-092b294b3428/states",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/2b045129-a906-46af-bc1a-092b294b3428/states",
"rel": "bookmark"
}
],
"target_power_state": null,
"target_provision_state": null,
"target_raid_config": {},
"updated_at": null,
"uuid": "2b045129-a906-46af-bc1a-092b294b3428",
"vendor_interface": "no-vendor"
}
]
}

View File

@ -1,40 +0,0 @@
{
"nodes": [
{
"instance_uuid": null,
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
"rel": "bookmark"
}
],
"maintenance": false,
"name": "test_node_classic",
"power_state": "power off",
"provision_state": "available",
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d"
},
{
"instance_uuid": null,
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/2b045129-a906-46af-bc1a-092b294b3428",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/nodes/2b045129-a906-46af-bc1a-092b294b3428",
"rel": "bookmark"
}
],
"maintenance": false,
"name": "test_node_dynamic",
"power_state": null,
"provision_state": "enroll",
"uuid": "2b045129-a906-46af-bc1a-092b294b3428"
}
]
}

View File

@ -1,11 +0,0 @@
{
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"portgroup_uuid": "e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"address": "11:11:11:11:11:11",
"local_link_connection": {
"switch_id": "0a:1b:2c:3d:4e:5f",
"port_id": "Ethernet3/1",
"switch_info": "switch1"
},
"physical_network": "physnet1"
}

View File

@ -1,27 +0,0 @@
{
"address": "11:11:11:11:11:11",
"created_at": "2016-08-18T22:28:48.643434+11:11",
"extra": {},
"internal_info": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "bookmark"
}
],
"local_link_connection": {
"port_id": "Ethernet3/1",
"switch_id": "0a:1b:2c:3d:4e:5f",
"switch_info": "switch1"
},
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"physical_network": "physnet1",
"portgroup_uuid": "e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"pxe_enabled": true,
"updated_at": null,
"uuid": "d2b30520-907d-46c8-bfee-c5586e6fb3a1"
}

View File

@ -1,31 +0,0 @@
{
"ports": [
{
"address": "11:11:11:11:11:11",
"created_at": "2016-08-18T22:28:48.643434+11:11",
"extra": {},
"internal_info": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "bookmark"
}
],
"local_link_connection": {
"port_id": "Ethernet3/1",
"switch_id": "0a:1b:2c:3d:4e:5f",
"switch_info": "switch1"
},
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"physical_network": "physnet1",
"portgroup_uuid": "e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"pxe_enabled": true,
"updated_at": null,
"uuid": "d2b30520-907d-46c8-bfee-c5586e6fb3a1"
}
]
}

View File

@ -1,18 +0,0 @@
{
"ports": [
{
"address": "11:11:11:11:11:11",
"links": [
{
"href": "http://127.0.0.1:6385/v1/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "bookmark"
}
],
"uuid": "d2b30520-907d-46c8-bfee-c5586e6fb3a1"
}
]
}

View File

@ -1,7 +0,0 @@
[
{
"path" : "/address",
"value" : "22:22:22:22:22:22",
"op" : "replace"
}
]

View File

@ -1,27 +0,0 @@
{
"address": "22:22:22:22:22:22",
"created_at": "2016-08-18T22:28:48.643434+11:11",
"extra": {},
"internal_info": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "bookmark"
}
],
"local_link_connection": {
"port_id": "Ethernet3/1",
"switch_id": "0a:1b:2c:3d:4e:5f",
"switch_info": "switch1"
},
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"physical_network": "physnet1",
"portgroup_uuid": "e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"pxe_enabled": true,
"updated_at": "2016-08-18T22:28:49.653974+00:00",
"uuid": "d2b30520-907d-46c8-bfee-c5586e6fb3a1"
}

View File

@ -1,5 +0,0 @@
{
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"address": "11:11:11:11:11:11",
"name": "test_portgroup"
}

View File

@ -1,33 +0,0 @@
{
"address": "11:11:11:11:11:11",
"created_at": "2016-08-18T22:28:48.643434+11:11",
"extra": {},
"internal_info": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"rel": "bookmark"
}
],
"mode": "active-backup",
"name": "test_portgroup",
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"ports": [
{
"href": "http://127.0.0.1:6385/v1/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a/ports",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a/ports",
"rel": "bookmark"
}
],
"properties": {},
"standalone_ports_supported": true,
"updated_at": null,
"uuid": "e43c722c-248e-4c6e-8ce8-0d8ff129387a"
}

View File

@ -1,37 +0,0 @@
{
"portgroups": [
{
"address": "11:11:11:11:11:11",
"created_at": "2016-08-18T22:28:48.643434+11:11",
"extra": {},
"internal_info": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"rel": "bookmark"
}
],
"mode": "active-backup",
"name": "test_portgroup",
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"ports": [
{
"href": "http://127.0.0.1:6385/v1/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a/ports",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a/ports",
"rel": "bookmark"
}
],
"properties": {},
"standalone_ports_supported": true,
"updated_at": null,
"uuid": "e43c722c-248e-4c6e-8ce8-0d8ff129387a"
}
]
}

View File

@ -1,19 +0,0 @@
{
"portgroups": [
{
"address": "11:11:11:11:11:11",
"links": [
{
"href": "http://127.0.0.1:6385/v1/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"rel": "bookmark"
}
],
"name": "test_portgroup",
"uuid": "e43c722c-248e-4c6e-8ce8-0d8ff129387a"
}
]
}

View File

@ -1,31 +0,0 @@
{
"ports": [
{
"address": "22:22:22:22:22:22",
"created_at": "2016-08-18T22:28:48.643434+11:11",
"extra": {},
"internal_info": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "bookmark"
}
],
"local_link_connection": {
"port_id": "Ethernet3/1",
"switch_id": "0a:1b:2c:3d:4e:5f",
"switch_info": "switch1"
},
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"physical_network": "physnet1",
"portgroup_uuid": "e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"pxe_enabled": true,
"updated_at": "2016-08-18T22:28:49.653974+00:00",
"uuid": "d2b30520-907d-46c8-bfee-c5586e6fb3a1"
}
]
}

View File

@ -1,18 +0,0 @@
{
"ports": [
{
"address": "22:22:22:22:22:22",
"links": [
{
"href": "http://127.0.0.1:6385/v1/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/ports/d2b30520-907d-46c8-bfee-c5586e6fb3a1",
"rel": "bookmark"
}
],
"uuid": "d2b30520-907d-46c8-bfee-c5586e6fb3a1"
}
]
}

View File

@ -1,7 +0,0 @@
[
{
"path" : "/address",
"value" : "22:22:22:22:22:22",
"op" : "replace"
}
]

View File

@ -1,33 +0,0 @@
{
"address": "22:22:22:22:22:22",
"created_at": "2016-08-18T22:28:48.643434+11:11",
"extra": {},
"internal_info": {},
"links": [
{
"href": "http://127.0.0.1:6385/v1/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a",
"rel": "bookmark"
}
],
"mode": "active-backup",
"name": "test_portgroup",
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
"ports": [
{
"href": "http://127.0.0.1:6385/v1/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a/ports",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/portgroups/e43c722c-248e-4c6e-8ce8-0d8ff129387a/ports",
"rel": "bookmark"
}
],
"properties": {},
"standalone_ports_supported": true,
"updated_at": "2016-08-18T22:28:49.653974+00:00",
"uuid": "e43c722c-248e-4c6e-8ce8-0d8ff129387a"
}

View File

@ -1,2 +0,0 @@
[python: **.py]

View File

@ -1,12 +0,0 @@
Listen %PUBLICPORT%
<VirtualHost *:%PUBLICPORT%>
DocumentRoot "%HTTPROOT%"
<Directory "%HTTPROOT%">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>

View File

@ -1,21 +0,0 @@
# Licensed under the Apache License, Version 1.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# This is an example Apache2 configuration file for using the
# Ironic API through mod_wsgi. This version assumes you are
# running devstack to configure the software.
Listen %IRONIC_SERVICE_PORT%
<VirtualHost *:%IRONIC_SERVICE_PORT%>
Redirect 307 / %IRONIC_SERVICE_PROTOCOL%://%IRONIC_SERVICE_HOST%:%IRONIC_SERVICE_PORT%/
</VirtualHost>

View File

@ -1,49 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# This is an example Apache2 configuration file for using the
# Ironic API through mod_wsgi. This version assumes you are
# running devstack to configure the software.
Listen %IRONIC_SERVICE_PORT%
<VirtualHost *:%IRONIC_SERVICE_PORT%>
WSGIDaemonProcess ironic-api user=%USER% processes=%APIWORKERS% threads=%APIWORKERS% display-name=%{GROUP}
WSGIScriptAlias / %IRONIC_WSGI_DIR%/app.wsgi
WSGIApplicationGroup %{GLOBAL}
WSGIProcessGroup ironic-api
WSGIPassAuthorization On
ErrorLogFormat "%M"
ErrorLog /var/log/%APACHE_NAME%/ironic-api.log
CustomLog /var/log/%APACHE_NAME%/ironic-api-access.log combined
<Directory %IRONIC_WSGI_DIR%>
WSGIProcessGroup ironic-api
WSGIApplicationGroup %{GLOBAL}
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>
Alias /baremetal %IRONIC_WSGI_DIR%/app.wsgi
<Location /baremetal>
SetHandler wsgi-script
Options +ExecCGI
WSGIProcessGroup ironic-api
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
</Location>

View File

@ -1,39 +0,0 @@
# apparmor is an undeclared dependency for docker on ubuntu: https://github.com/docker/docker/issues/9745
# Starting with Debian Jessie (and thus in Ubuntu Xenial too),
# pxelinux package provides the pxelinux.0 boot loader,
# but such package is absent from Debian Wheezy / Ubuntu Trusty.
# Also, in Debian Wheezy / Ubuntu Trusty 'syslinux' depends on syslinux-common,
# but only recommends it in Jessie/Xenial.
# Make sure syslinux-common is installed for those distros as it provides
# *.c32 modules for syslinux
# TODO remove distro pinning when Wheezy / Trusty are EOLed (May 2019)
# or DevStack stops supporting those.
# In the mean time, new Debian-based release codenames will have to be added
# as distros can not be pinned with 'if-later-than' specified.
apparmor
docker.io
ipmitool
iptables
ipxe
gnupg
libguestfs0
libguestfs-tools
libvirt-bin # dist:xenial NOPRIME
open-iscsi
openssh-client
pxelinux # dist:jessie,xenial
python-libguestfs
python-libvirt
qemu
qemu-kvm
qemu-utils
sgabios
shellinabox
syslinux # dist:wheezy,trusty
syslinux-common # dist:jessie,xenial
tftpd-hpa
xinetd
squashfs-tools
libvirt-dev
socat
ipxe-qemu

View File

@ -1,102 +0,0 @@
#!/usr/bin/python -tt
# Copyright (c) 2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import datetime
import os
import re
import sys
# This script is run as a libvirt hook.
# More information here: https://libvirt.org/hooks.html
# The devstack/lib/ironic script in function setup_qemu_log_hook() will replace
# LOG_DIR with the correct location. And will place the script into the correct
# directory.
VM_LOG_DIR = os.path.abspath("%LOG_DIR%")
# Regular expression to find ANSI escape sequences at the beginning of a string
ANSI_ESCAPE_RE = re.compile(r"""
^\x1b\[ # ANSI escape codes are ESC (0x1b) [
?([\d;]*)(\w)""", re.VERBOSE)
NOW = datetime.datetime.now().strftime("%Y-%m-%d-%H:%M:%S")
def main():
if len(sys.argv) < 3:
return
guest_name = sys.argv[1]
action = sys.argv[2]
if action != "release":
return
if not console_log_exists(guest_name):
return
new_path = move_console_log(guest_name)
if not new_path:
return
no_ansi_filename = "{}_no_ansi_{}.log".format(guest_name, NOW)
no_ansi_path = os.path.join(VM_LOG_DIR, no_ansi_filename)
create_no_ansi_file(new_path, no_ansi_path)
def create_no_ansi_file(source_filename, dest_filename):
with open(source_filename) as in_file:
data = in_file.read()
data = remove_ansi_codes(data)
with open(dest_filename, 'w') as out_file:
out_file.write(data)
def get_console_log_path(guest_name):
logfile_name = "{}_console.log".format(guest_name)
return os.path.join(VM_LOG_DIR, logfile_name)
def console_log_exists(guest_name):
return os.path.isfile(get_console_log_path(guest_name))
def move_console_log(guest_name):
new_logfile_name = "{}_console_{}.log".format(guest_name, NOW)
new_path = os.path.join(VM_LOG_DIR, new_logfile_name)
if os.path.exists(new_path):
return False
os.rename(get_console_log_path(guest_name), new_path)
return new_path
def remove_ansi_codes(data):
"""Remove any ansi codes from the provided string"""
output = ''
while data:
result = ANSI_ESCAPE_RE.match(data)
if not result:
output += data[0]
data = data[1:]
else:
data = data[result.end():]
return output
if '__main__' == __name__:
sys.exit(main())

View File

@ -1,22 +0,0 @@
docker-io
ipmitool
iptables
ipxe-bootimgs
gnupg
libguestfs
libguestfs-tools
libvirt
libvirt-python
net-tools
openssh-clients
openvswitch
sgabios
shellinabox
syslinux
tftp-server
xinetd
squashfs-tools
libvirt-devel
socat
edk2-ovmf # dist:f24,f25
ipxe-roms-qemu

File diff suppressed because it is too large Load Diff

View File

@ -1,91 +0,0 @@
#!/bin/bash
# plugin.sh - devstack plugin for ironic
# devstack plugin contract defined at:
# http://docs.openstack.org/developer/devstack/plugins.html
echo_summary "ironic devstack plugin.sh called: $1/$2"
source $DEST/ironic/devstack/lib/ironic
# These packages should be tested under python 3, when the job enables Python 3
# TODO(jlvillal) Add additional dependencies when they should support Python 3.
# Add: pyghmi and virtualbmc when they are ready
enable_python3_package ironic ironic-lib ironic-python-agent python-ironicclient
if is_service_enabled ir-api ir-cond; then
if [[ "$1" == "stack" ]]; then
if [[ "$2" == "install" ]]; then
# stack/install - Called after the layer 1 and 2 projects source and
# their dependencies have been installed
echo_summary "Installing Ironic"
if ! is_service_enabled nova; then
source $RC_DIR/lib/nova_plugins/functions-libvirt
install_libvirt
fi
install_ironic
install_ironicclient
cleanup_ironic_config_files
elif [[ "$2" == "post-config" ]]; then
# stack/post-config - Called after the layer 1 and 2 services have been
# configured. All configuration files for enabled services should exist
# at this point.
echo_summary "Configuring Ironic"
configure_ironic
if is_service_enabled key; then
create_ironic_accounts
fi
elif [[ "$2" == "extra" ]]; then
# stack/extra - Called near the end after layer 1 and 2 services have
# been started.
# Initialize ironic
init_ironic
if [[ "$IRONIC_BAREMETAL_BASIC_OPS" == "True" && "$IRONIC_IS_HARDWARE" == "False" ]]; then
echo_summary "Creating bridge and VMs"
create_bridge_and_vms
fi
if is_service_enabled neutron || [[ "$HOST_TOPOLOGY" == "multinode" ]]; then
echo_summary "Configuring Ironic networks"
configure_ironic_networks
fi
if [[ "$HOST_TOPOLOGY" == 'multinode' ]]; then
setup_vxlan_network
fi
# Start the ironic API and ironic taskmgr components
echo_summary "Starting Ironic"
start_ironic
prepare_baremetal_basic_ops
elif [[ "$2" == "test-config" ]]; then
# stack/test-config - Called at the end of devstack used to configure tempest
# or any other test environments
if is_service_enabled tempest; then
echo_summary "Configuring Tempest for Ironic needs"
ironic_configure_tempest
fi
fi
fi
if [[ "$1" == "unstack" ]]; then
# unstack - Called by unstack.sh before other services are shut down.
stop_ironic
cleanup_ironic_provision_network
cleanup_baremetal_basic_ops
fi
if [[ "$1" == "clean" ]]; then
# clean - Called by clean.sh before other services are cleaned, but after
# unstack.sh has been called.
cleanup_ironic
fi
fi

View File

@ -1,10 +0,0 @@
enable_service ironic ir-api ir-cond
# NOTE(vsaienko) mtu calculation has been changed recently to 1450
# https://github.com/openstack/neutron/commit/51a697
# and caused https://bugs.launchpad.net/ironic/+bug/1631875
# Get the smallest local MTU
local_mtu=$(ip link show | sed -ne 's/.*mtu \([0-9]\+\).*/\1/p' | sort -n | head -1)
# 50 bytes is overhead for vxlan (which is greater than GRE
# allowing us to use either overlay option with this MTU.
PUBLIC_BRIDGE_MTU=$((local_mtu - 50))

View File

@ -1,36 +0,0 @@
#!/usr/bin/env bash
# **cleanup-nodes**
# Cleans up baremetal poseur nodes and volumes created during ironic setup
# Assumes calling user has proper libvirt group membership and access.
set -exu
# Make tracing more educational
export PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}: '
LIBVIRT_STORAGE_POOL=${LIBVIRT_STORAGE_POOL:-"default"}
LIBVIRT_CONNECT_URI=${LIBVIRT_CONNECT_URI:-"qemu:///system"}
NAME=$1
export VIRSH_DEFAULT_CONNECT_URI=$LIBVIRT_CONNECT_URI
VOL_NAME="$NAME.qcow2"
virsh list | grep -q $NAME && virsh destroy $NAME
virsh list --inactive | grep -q $NAME && virsh undefine $NAME --nvram
# Delete the Virtual BMC
if [[ $(type -P vbmc) != "" ]]; then
vbmc list | grep -a $NAME && vbmc delete $NAME
fi
if virsh pool-list | grep -q $LIBVIRT_STORAGE_POOL ; then
virsh vol-list $LIBVIRT_STORAGE_POOL | grep -q $VOL_NAME &&
virsh vol-delete $VOL_NAME --pool $LIBVIRT_STORAGE_POOL
fi
sudo brctl delif br-$NAME ovs-$NAME || true
sudo ip link set dev br-$NAME down || true
sudo brctl delbr br-$NAME || true

View File

@ -1,133 +0,0 @@
#!/usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import argparse
import os.path
import jinja2
import libvirt
templatedir = os.path.join(os.path.dirname(os.path.dirname(__file__)),
'templates')
CONSOLE_LOG = """
<serial type='file'>
<source path='%(console_log)s'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<serial type='pty'>
<source path='/dev/pts/49'/>
<target port='1'/>
<alias name='serial1'/>
</serial>
<console type='file'>
<source path='%(console_log)s'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
"""
CONSOLE_PTY = """
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
"""
def main():
parser = argparse.ArgumentParser(
description="Configure a kvm virtual machine for the seed image.")
parser.add_argument('--name', default='seed',
help='the name to give the machine in libvirt.')
parser.add_argument('--image',
help='Use a custom image file (must be qcow2).')
parser.add_argument('--engine', default='qemu',
help='The virtualization engine to use')
parser.add_argument('--arch', default='i686',
help='The architecture to use')
parser.add_argument('--memory', default='2097152',
help="Maximum memory for the VM in KB.")
parser.add_argument('--cpus', default='1',
help="CPU count for the VM.")
parser.add_argument('--bootdev', default='hd',
help="What boot device to use (hd/network).")
parser.add_argument('--libvirt-nic-driver', default='virtio',
help='The libvirt network driver to use')
parser.add_argument('--interface-count', default=1, type=int,
help='The number of interfaces to add to VM.'),
parser.add_argument('--console-log',
help='File to log console')
parser.add_argument('--emulator', default=None,
help='Path to emulator bin for vm template')
parser.add_argument('--disk-format', default='qcow2',
help='Disk format to use.')
parser.add_argument('--uefi-loader', default='',
help='The absolute path of the UEFI firmware blob.')
parser.add_argument('--uefi-nvram', default='',
help=('The absolute path of the non-volatile memory '
'to store the UEFI variables. Should be used '
'only when --uefi-loader is also specified.'))
args = parser.parse_args()
env = jinja2.Environment(loader=jinja2.FileSystemLoader(templatedir))
template = env.get_template('vm.xml')
params = {
'name': args.name,
'imagefile': args.image,
'engine': args.engine,
'arch': args.arch,
'memory': args.memory,
'cpus': args.cpus,
'bootdev': args.bootdev,
'interface_count': args.interface_count,
'nicdriver': args.libvirt_nic_driver,
'emulator': args.emulator,
'disk_format': args.disk_format,
'uefi_loader': args.uefi_loader,
'uefi_nvram': args.uefi_nvram,
}
if args.emulator:
params['emulator'] = args.emulator
else:
qemu_kvm_locations = ['/usr/bin/kvm',
'/usr/bin/qemu-kvm',
'/usr/libexec/qemu-kvm']
for location in qemu_kvm_locations:
if os.path.exists(location):
params['emulator'] = location
break
else:
raise RuntimeError("Unable to find location of kvm executable")
if args.console_log:
params['console'] = CONSOLE_LOG % {'console_log': args.console_log}
else:
params['console'] = CONSOLE_PTY
libvirt_template = template.render(**params)
conn = libvirt.open("qemu:///system")
a = conn.defineXML(libvirt_template)
print("Created machine %s with UUID %s" % (args.name, a.UUIDString()))
if __name__ == '__main__':
main()

View File

@ -1,130 +0,0 @@
#!/usr/bin/env bash
# **create-nodes**
# Creates baremetal poseur nodes for ironic testing purposes
set -ex
# Make tracing more educational
export PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}: '
# Keep track of the DevStack directory
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
while getopts "n:c:i:m:M:d:a:b:e:E:p:o:f:l:L:N:" arg; do
case $arg in
n) NAME=$OPTARG;;
c) CPU=$OPTARG;;
i) INTERFACE_COUNT=$OPTARG;;
M) INTERFACE_MTU=$OPTARG;;
m) MEM=$(( 1024 * OPTARG ));;
# Extra G to allow fuzz for partition table : flavor size and registered
# size need to be different to actual size.
d) DISK=$(( OPTARG + 1 ));;
a) ARCH=$OPTARG;;
b) BRIDGE=$OPTARG;;
e) EMULATOR=$OPTARG;;
E) ENGINE=$OPTARG;;
p) VBMC_PORT=$OPTARG;;
o) PDU_OUTLET=$OPTARG;;
f) DISK_FORMAT=$OPTARG;;
l) LOGDIR=$OPTARG;;
L) UEFI_LOADER=$OPTARG;;
N) UEFI_NVRAM=$OPTARG;;
esac
done
shift $(( $OPTIND - 1 ))
if [ -z "$UEFI_LOADER" ] && [ ! -z "$UEFI_NVRAM" ]; then
echo "Parameter -N (UEFI NVRAM) cannot be used without -L (UEFI Loader)"
exit 1
fi
LIBVIRT_NIC_DRIVER=${LIBVIRT_NIC_DRIVER:-"virtio"}
LIBVIRT_STORAGE_POOL=${LIBVIRT_STORAGE_POOL:-"default"}
LIBVIRT_CONNECT_URI=${LIBVIRT_CONNECT_URI:-"qemu:///system"}
export VIRSH_DEFAULT_CONNECT_URI=$LIBVIRT_CONNECT_URI
if ! virsh pool-list --all | grep -q $LIBVIRT_STORAGE_POOL; then
virsh pool-define-as --name $LIBVIRT_STORAGE_POOL dir --target /var/lib/libvirt/images >&2
virsh pool-autostart $LIBVIRT_STORAGE_POOL >&2
virsh pool-start $LIBVIRT_STORAGE_POOL >&2
fi
pool_state=$(virsh pool-info $LIBVIRT_STORAGE_POOL | grep State | awk '{ print $2 }')
if [ "$pool_state" != "running" ] ; then
[ ! -d /var/lib/libvirt/images ] && sudo mkdir /var/lib/libvirt/images
virsh pool-start $LIBVIRT_STORAGE_POOL >&2
fi
if [ -n "$LOGDIR" ] ; then
mkdir -p "$LOGDIR"
fi
PREALLOC=
if [ -f /etc/debian_version -a "$DISK_FORMAT" == "qcow2" ]; then
PREALLOC="--prealloc-metadata"
fi
if [ -n "$LOGDIR" ] ; then
VM_LOGGING="--console-log $LOGDIR/${NAME}_console.log"
else
VM_LOGGING=""
fi
VOL_NAME="${NAME}.${DISK_FORMAT}"
UEFI_OPTS=""
if [ ! -z "$UEFI_LOADER" ]; then
UEFI_OPTS="--uefi-loader $UEFI_LOADER"
if [ ! -z "$UEFI_NVRAM" ]; then
UEFI_OPTS+=" --uefi-nvram $UEFI_NVRAM"
fi
fi
# Create bridge and add VM interface to it.
# Additional interface will be added to this bridge and
# it will be plugged to OVS.
# This is needed in order to have interface in OVS even
# when VM is in shutdown state
INTERFACE_COUNT=${INTERFACE_COUNT:-1}
for int in $(seq 1 $INTERFACE_COUNT); do
tapif=tap-${NAME}i${int}
sudo ip tuntap add dev $tapif mode tap
sudo ip link set $tapif mtu $INTERFACE_MTU
sudo ip link set $tapif up
sudo ovs-vsctl add-port $BRIDGE $tapif
done
if ! virsh list --all | grep -q $NAME; then
virsh vol-list --pool $LIBVIRT_STORAGE_POOL | grep -q $VOL_NAME &&
virsh vol-delete $VOL_NAME --pool $LIBVIRT_STORAGE_POOL >&2
virsh vol-create-as $LIBVIRT_STORAGE_POOL ${VOL_NAME} ${DISK}G --format $DISK_FORMAT $PREALLOC >&2
volume_path=$(virsh vol-path --pool $LIBVIRT_STORAGE_POOL $VOL_NAME)
# Pre-touch the VM to set +C, as it can only be set on empty files.
sudo touch "$volume_path"
sudo chattr +C "$volume_path" || true
vm_opts=""
if [[ -n "$EMULATOR" ]]; then
vm_opts+="--emulator $EMULATOR "
fi
$PYTHON $TOP_DIR/scripts/configure-vm.py \
--bootdev network --name $NAME --image "$volume_path" \
--arch $ARCH --cpus $CPU --memory $MEM --libvirt-nic-driver $LIBVIRT_NIC_DRIVER \
--disk-format $DISK_FORMAT $VM_LOGGING --engine $ENGINE $UEFI_OPTS $vm_opts \
--interface-count $INTERFACE_COUNT >&2
# Createa Virtual BMC for the node if IPMI is used
if [[ $(type -P vbmc) != "" ]]; then
vbmc add $NAME --port $VBMC_PORT
vbmc start $NAME
fi
fi
# echo mac in format mac1,ovs-node-0i1;mac2,ovs-node-0i2;...;macN,ovs-node0iN
VM_MAC=$(echo -n $(virsh domiflist $NAME |awk '/tap-/{print $5","$1}')|tr ' ' ';')
echo -n "$VM_MAC $VBMC_PORT $PDU_OUTLET"

View File

@ -1,34 +0,0 @@
#!/usr/bin/env bash
# **setup-network**
# Setups openvswitch libvirt network suitable for
# running baremetal poseur nodes for ironic testing purposes
set -exu
# Make tracing more educational
export PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}: '
LIBVIRT_CONNECT_URI=${LIBVIRT_CONNECT_URI:-"qemu:///system"}
# Keep track of the DevStack directory
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
BRIDGE_NAME=${1:-brbm}
PUBLIC_BRIDGE_MTU=${2:-1500}
export VIRSH_DEFAULT_CONNECT_URI="$LIBVIRT_CONNECT_URI"
# Only add bridge if missing. Bring it UP.
(sudo ovs-vsctl list-br | grep ${BRIDGE_NAME}$) || sudo ovs-vsctl add-br ${BRIDGE_NAME}
sudo ip link set dev ${BRIDGE_NAME} up
# Remove bridge before replacing it.
(virsh net-list | grep "${BRIDGE_NAME} ") && virsh net-destroy ${BRIDGE_NAME}
(virsh net-list --inactive | grep "${BRIDGE_NAME} ") && virsh net-undefine ${BRIDGE_NAME}
virsh net-define <(sed s/brbm/$BRIDGE_NAME/ $TOP_DIR/templates/brbm.xml)
virsh net-autostart ${BRIDGE_NAME}
virsh net-start ${BRIDGE_NAME}
sudo ip link set dev ${BRIDGE_NAME} mtu $PUBLIC_BRIDGE_MTU

Some files were not shown because too many files have changed in this diff Show More