To make tags consistent with traits, change db.api.node_tag_exists()
to raise a NodeNotFound exception if the node doesn't exist.
This is a follow up to bbff319f02.
Change-Id: Id0ddf448d97b5ac22ef5dc27154a1b229514a968
Partial-Bug:#1526266
Adds a NodeTrait model to the DB and DBAPI methods for the following:
* Set/unset node traits
* Get node traits
* Add/remove a single trait
* Check for existence of a node trait
All node traits are deleted when their owner node is deleted. Traits
cannot be specified on node creation currently.
Change-Id: I8b375a33dcb94d2cc73eaa93a5cc5aed86c27178
Partial-Bug: #1722194
This replaces the deprecated (in python 3.2) unittest.TestCase
method assertRaisesRegexp() with assertRaisesRegex().
Change-Id: Iec0f38102a76f4830ba1a96ed06743072048285f
Related-Bug: 1673768
Before this patch if _do_update_node() sets "instance_uuid" field
it fails on second execution one by one with exception. This
prevents normal usage of DB reconnect method which proposed with
change I61db83637adfd98a5394d1f570f3de4302c93497. Check of
"instance_uuid" moved to manager method.
Change-Id: I2ae84c95cbd1895068dc4bce01bc122abc7345da
This patch adds a "volume_targets" DB table in order to save
the volume target information of physical nodes. With this patch,
Ironic can put/get volume target information to/from the database.
Co-Authored-By: Stephane Miller <stephane@alum.mit.edu>
Co-Authored-By: Ruby Loo <ruby.loo@intel.com>
Change-Id: I79063f9d0aafd7b740785a883732536704e43b7c
Partial-Bug: 1526231
This patch introduces a new "volume_connectors" table in order to save
the volume connector information of physical nodes. With this patch,
Ironic can put/get volume connector information to/from the database.
Co-Authored-By: Tomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com>
Co-Authored-By: Stephane Miller <stephane@alum.mit.edu>
Co-Authored-By: Julia Kreger <juliaashleykreger@gmail.com>
Change-Id: I8237ab671a04ac9b01c8bdb2936cf0a661b9b1de
Partial-Bug: 1526231
test_reservation_in_exception_message is expecting
NodeLocked error. If it does happen, the test should
be fine. But if it does not, we should fail the test.
Change-Id: I02145db698983387ecb6951a732641fa5bbb9f13
This adds the "resource_class" field to the node table, object, and API,
as well as a database migration to go with it.
Change-Id: I936f2e7b2f4d26e01354e826e5595ff021c3a55c
Partial-Bug: #1604916
Currently, creating node with tags is not supported.
If tags values were passed over, an exception should
be thrown.
A follow-up patch of 19ef56cf00
Change-Id: I83e7db6a8da014962454e2b1248fe061985d98d8
Adds a new dbapi call get_node_by_port_addresses and associated objects call
Node.get_by_port_addresses. The logic is the same as in "lookup" agent passthru.
Will be used for a new lookup endpoint.
Change-Id: Ia5549fb16cd363f3492b9ca0400177c92a1aea19
Partial-Bug: #1570841
- 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
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