8 Commits

Author SHA1 Message Date
Jenkins
c34edb7852 Merge "Replace six.iteritems() with .items()" 2017-03-15 19:13:35 +00:00
gengchc2
b133b85ec1 Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable. 2.In py2, the performance
about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: I0c903ca9d566c89e4e0d6bd129dc1f7bc3e95db9
2017-03-10 01:45:40 +00:00
Dougal Matthews
662c7afbb6 Remove unused exception HeatValidationFailedError
Change-Id: Ic30a068a67e6be56b072d1e9a42d0c0dcf22f312
2016-12-15 09:53:57 +00:00
Dougal Matthews
d2cbf5219d Remove unused exception ContainerAlreadyExistsError
Change-Id: If48a8882eb0fbd1a400a4238ada97e95e2671db0
2016-12-15 09:53:34 +00:00
Julie Pichon
cbe0dbf32d Add Mistral action & workflow for root device configuration
The root device configuration code and unit tests come from the
python-tripleoclient project. By moving them into a common Mistral
action, they can be reused by other clients like the UI. The workflows
will also be used for the new 'overcloud node configure' command in the
client.

Change-Id: I5ba0a3710012c44822dd3b8e69662bbef04d3787
Related-Bug: #1595205
2016-08-25 20:07:56 +01:00
Ryan Brady
65821cc7cf Removes unused code
This patch removes the code previously committed for the API
implementation we abandoned in favor of Mistral workflows.

Change-Id: I34ece26dced3b4b07c030b7689f2b408925f86d6
2016-05-24 17:34:22 -04:00
Miles Gould
1ffef92877 Import initial_state logic from tripleoclient
Ironic API v1.11 introduced a new ENROLL state for newly-registered
baremetal nodes. Logic to allow the user to specify which initial state
to use (either ENROLL or the older AVAILABLE) was previously in
python-tripleoclient; this patch moves it into this repo, along with
supporting utility functions and tests.

Specifically, we

 - add a `provide` keyword argument to utils.nodes.register_all_nodes;
   when set to True, newly-registered nodes should be transitioned to
   the AVAILABLE state;
 - import the utility functions wait_for_provision_state and
   set_nodes_state from python-tripleoclient;
 - change set_nodes_state to return a list of node objects rather than
   generating a sequence of UUIDs. This makes its results more useful to
   client code.

Change-Id: I34d48293c90f9b3b18d05272166a72b61b209b66
2016-05-12 17:50:25 +01:00
Dmitry Tantsur
4bd594fa0c Import code working with Ironic nodes from os_cloud_config
This patch introduces tripleo_common.utils.{glance,nodes} modules.
The glance one is imported with only import fixes (including importing
a private exceptions module from the glance client).

The nodes.py is a rewritten and fixed version taken from
https://review.openstack.org/#/c/263309/. Main changes:
* Stop hardcoding flavor (e.g. agent, pxe) for each driver
* Support only generic properties with pm_* names. Driver-specific things
  should stay with their prefix. Existing pm_* driver-specific things
  were deprecated.
* Pass through everything that starts with driver-specific prefix to
  node's driver_info.
* Dropped handling Conflict exceptions - ironicclient is doing it for
  some time already (and does better job in it).
* Issue a specific exception for malformed instackenv.json.
* Optimize calls to ironic (use list with details instead of list+get)
* Use 'add' operation instead of 'replace', as it allows both adding
  and overwriting (despite its name).
* Fixed some small issues like adding a dict to a set.

Change-Id: I7efffc5c6627776a20fad4bf4cf266330c4b8b6b
2016-03-21 16:53:49 +00:00