- set/unset node tags
- get node tags
- add/delete single tag
- check whether node tag exists
- Delete all tags attached to the node when it's destroyed
This will not support creating node with tags, just ignore
the specified tags.
Change-Id: Ibe83a726d904fd33b8550c8bec134cf05644560e
Partial-bug: #1526266
This adds an API to allow manual cleaning of nodes, via
PUT /v1/nodes/<node_ident>/states/provision. The argument
'target' is 'clean', and the argument 'clean_steps' (the
list of clean steps to be performed on the node) must be
specified.
The API version is bumped to 1.15.
Change-Id: I0e34407133684e34c4ab9446b3521a24f3038f92
Partial-Bug: #1526290
Ironic should be able to provide the requisite connectivity
information to the Neutron ML2 plugin to allow drivers to
provision the top-of-rack switch for the bare metal server.
The addition of portgroups in Ironic allows the concept of
link aggregation to be handled in Ironic in order to provide
support for cases where multiple interfaces on the bare metal
server connect to switch ports of a single LAG.
This commit includes changes to:
- the DB models (extension of port model and addition of portgroup
model)
- the DB tests
Partial-bug: #1526403
DocImpact
Co-Authored-By: Laura Moore (laura.moore@sap.com)
Co-Authored-By: Jenny Moorehead (jenny.moorehead@sap.com)
Co-Authored-By: Will Stevenson (will.stevenson@sap.com)
Change-Id: Ic028c316b0670c2d18de89111e83069f3441f476
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).
Change-Id: I7ec7fdb53d9141c25a16b78a5149dc0d2909c366
Closes-Bug: #1512207
The API should not return tracebacks in a production environment. As
deployers often run services in debug mode, because OpenStack is hard to
debug, we should not return tracebacks in debug mode. To allow
developers etc to continue to use this feature, add a new config option
'debug_tracebacks_in_api' that maintains this behavior.
Also add to troubleshooting docs.
Change-Id: Idbbf7efc45140e9e3d8b9491edd58905cbba0363
Closes-Bug: #1525002
Replace HTTP 'magic numbers' (also known as unnamed numerical constants)
with constants provided by the http_client/httplib library.
For example, use 'http_client.OK' instead of '200'
This was done before in commit 107e064ca1c981480f12fad03fdd02d1f4847422
but a few more HTTP numbers have slipped in since that commit.
Change-Id: Ia3db6b0c8ef832290ffde8510a7ebe33adf356c4
Attributes which are mandatory (ie, required for object creation) should
not be removable. However, some attributes (such as Node.chassis_uuid)
are not required for object creation, but should not be removable if
they are set. This commit does the following:
- rename JsonPatchType.mandatory_attrs to non_removable_attrs to better
describe its meaning,
- change its return type to set-of-strings for faster lookup
- ensure all mandatory attributes on the type being patched are
included in the set of non-removable attributes,
- add a new field, JsonPatchType._extra_non_removable_attrs, which
should be a set of attributes that are not required for creation but
should not be removed if set.
Since the object to be patched does not exist at patch-validation time,
we leave the validation logic in methods of JsonPatchType and
subclasses. This means introspecting the types to be patched.
Closes-Bug: #1284781
Change-Id: I2bb7fed2c776c8d63535c5ee19cdc218e57806e3
We will use the base.py file for both unit and functional testing, so
move it under ironic/tests/base.py
Change-Id: Ifc36d61be60c820dd8e5ee0f9b9dadb52d8b480a
Partial-Bug: #1491670
This returns 'min_version' (minimum supported version), 'version'
(current/maximum supported version), and 'status' (of the version,
is 'CURRENT' for v1) in the response to a GET / request.
It makes our response to / very close to Nova's one[0], and will allow
us to implement a `ironic version-list` command similar to Nova's.
As this change is needed for proper versioning support on client
side, it's not versioned itself. Otherwise we'll have a
chicken-and-egg problem.
[0]http://specs.openstack.org/openstack/nova-specs/specs/kilo/implemented/api-microversions.html#versioning
Closes-Bug: #1489172
Co-Authored-By: Ruby Loo <rloo@yahoo-inc.com>
Change-Id: I6dd1ea20e23137d9a9566355adc0784067d2cb5b
Follow up patch to fix the issues from the patch:
Prepare for functional testing
commit f350d87af8
Fix comment in tests/unit/__init__.py
Changed name of base test class from 'FunctionalTest' to 'BaseApiTest'
Change-Id: I26c093826047ac604c613fd975c6d512d2c156af
Prepare for functional testing by creating two new directories:
* ironic/tests/unit
* ironic/tests/functional
Move all files currently in ironic/tests/* to ironic/tests/unit/
Update imports from 'ironic.tests.YYY' to 'ironic.tests.unit.YYY'
Fix any PEP8 issues due to longer lines
Partial-Bug: #1491670
Change-Id: I1166f20adf8c84b2042b62e348926502a4851e08