2826 Commits

Author SHA1 Message Date
OpenStack Proposal Bot
340d323d50 Updated from global requirements
Change-Id: If7680f63372ce346c91346675ab55633337a58df
2016-01-01 20:28:35 +00:00
Ruby Loo
d6b46e9929 Sync test_utils from ironic
Some unit tests were copied/moved from ironic to test_utils,
but they are out of sync now. This syncs the tests from
ironic/tests/unit/common/test_utils.py

Change-Id: I301c209f58b930cf109d5df7b82a8542c1aff185
2015-12-23 02:13:04 +00:00
Ruby Loo
8b6866f16d Add tests for qemu_img_info() & convert_image()
disk_utils.qemu_img_info() & convert_image() were moved from
ironic to this library. This moves the unit tests from ironic
(878e6f8e0a/ironic/tests/unit/common/test_images.py (L48))
to here.

Change-Id: I46c4945f9808b5fdb842cba47a2575e43e5d204b
2015-12-23 00:53:19 +00:00
ChangBo Guo(gcb)
5e642ee4cb Use imageutils from oslo.utils
oslo-incubator was cleaned up in
Ibc5a8f11c6e5c308cec15a60eeb07a898254f9b7, and imageutils (from
oslo-incubator) with unit tests was sync'd in oslo.utils version 3.1.

This switches from using imageutils in the old oslo incubator, to
oslo.utils' imageutils.

Change-Id: Icc8b56616a241c08afb0c95be18bf81c7997fc64
2015-12-22 21:36:09 +00:00
OpenStack Proposal Bot
46a5963cf1 Updated from global requirements
Change-Id: Ie80bef0ab4783b1c293f4a8cbc49d26740c74d5d
2015-12-15 18:55:33 +00:00
OpenStack Proposal Bot
048129a9d9 Updated from global requirements
Change-Id: I8287e3798a6b1aeab689510ced3ef62e59060df3
2015-12-11 15:19:46 +00:00
OpenStack Proposal Bot
b576a64c4c Updated from global requirements
Change-Id: Ia106fc54a26405ad65290ccdc0e89f515b6d01bb
2015-12-08 12:36:00 +00:00
OpenStack Proposal Bot
912c481112 Updated from global requirements
Change-Id: I67d68d2ca99bba936389b0e4c5b1f5833a370d9b
2015-11-27 22:37:49 +00:00
Jenkins
e816b12a7b Merge "Default for root_helper config" 0.5.0 2015-11-25 19:28:23 +00:00
Ruby Loo
97ce4a6eff Default for root_helper config
This sets the default for root_helper config to the value used
by ironic: 'sudo ironic-rootwrap /etc/ironic/rootwrap.conf'.

The logic was changed a bit so as not to pass root_helper or
run_as_root arguments to processutils.execute() unless they
had been specified or needed to be passed.

Change-Id: I8cf8c07102d0a8bd4fff14afc8c2f9db6beeb949
Fixes-Bug: #1519870
2015-11-25 15:59:07 +00:00
Jenkins
ed66874d6f Merge "Replace deprecated LOG.warn with LOG.warning" 2015-11-25 15:42:08 +00:00
Ruby Loo
bf3938e439 Replace deprecated LOG.warn with LOG.warning
LOG.warn is deprecated so this replaces it with LOG.warning.

Change-Id: I4b7b55cce2cfb3f0ae779351daf14e42472d43de
Closes-Bug: 1508442
2015-11-23 15:57:02 +00:00
OpenStack Proposal Bot
bf8f27bc21 Updated from global requirements
Change-Id: I63ef6c7f62e58be692c51d9997fc5fbff3141067
2015-11-19 22:53:42 +00:00
Jenkins
92fdf322ce Merge "Replace rootwrap_config and rootwrap_helper_cmd with root_helper" 0.4.0 2015-11-19 19:24:33 +00:00
Faizan Barmawer
6c273960d5 Replace rootwrap_config and rootwrap_helper_cmd with root_helper
ironic-lib will use the command set in the new 'root_helper' conf parameter to execute
commands as root user. If this configuration paramter is not specified,
ironic-lib will execute commands with run_as_root=False. This configuration
is not set by default.

'rootwrap_config' and 'rootwrap_helper_cmd' configs are deleted, since
they are replaced by the new 'root_helper' config.

This fix also delivers a sample ironic-lib.filters file, which should be used
with rootwrap command.

Change-Id: I61ef7c15237c995e9d4cc85095ac48a30a8f6c7d
Closes-bug: #1515943
2015-11-19 14:26:01 +00:00
OpenStack Proposal Bot
4a9474ccf8 Updated from global requirements
Change-Id: I4a2f7b0dd1d2b5ef0560225f0a9368fc868f271a
2015-11-18 20:47:07 +00:00
OpenStack Proposal Bot
8fee6398ec Updated from global requirements
Change-Id: I50a28d4576863d78b8e185952917937851d305f4
2015-11-17 02:35:03 +00:00
OpenStack Proposal Bot
a58eb12874 Updated from global requirements
Change-Id: I7f009f1bf047fd80e111ace728f16dbd13490ed3
2015-11-12 22:08:50 +00:00
Ruby Loo
f173eaa731 Remove tempdir config, add tempdir parameter
This removes the tempdir config because it is only being used by
one method. Instead, disk_utils.work_on_disk() was modified to
include a tempdir parameter.

Change-Id: Ic91bce4ebe295c79fb7303bba2c4a2390f4d4a53
Closes-Bug: #1514613
2015-11-12 00:29:27 +00:00
OpenStack Proposal Bot
c8dbc2e0ed Updated from global requirements
Change-Id: Iade8411929a1597b55f1cfd4b91a43c6a02167ae
2015-10-23 18:45:20 +00:00
Jenkins
a16f8bb49d Merge "Fix help string for 'rootwrap_helper_cmd'" 2015-10-22 19:46:34 +00:00
OpenStack Proposal Bot
d4e7d1d1ba Updated from global requirements
Change-Id: Id0f89a1afe39b5ce5babd8cd9614be2cd8df64b7
2015-10-19 23:28:09 +00:00
OpenStack Proposal Bot
fbceda6844 Updated from global requirements
Change-Id: I17a7092423acd971c2387e393af58ce214155fe7
2015-10-16 14:18:43 +00:00
Ruby Loo
830da03fb8 Fix help string for 'rootwrap_helper_cmd'
This fixes the help string for the 'rootwrap_helper_cmd' config
so that it is correct.

Change-Id: I361189b0107ec7182e8510dab58ded360546993f
Closes-Bug: #1506526
2015-10-15 15:41:06 +00:00
OpenStack Proposal Bot
4b769fb386 Updated from global requirements
Change-Id: I982d4e2e4a713f1fee2df783b544ca9f9037a5f5
2015-10-09 05:00:24 +00:00
OpenStack Proposal Bot
b8a1aaaf29 Updated from global requirements
Change-Id: If309fd50dc0355cdf481502d4c8bdadb8c2b3442
2015-10-07 01:42:03 +00:00
Jenkins
b0892e2700 Merge "Replace .iteritems() with .items()" 2015-10-07 00:48:25 +00:00
Naohiro Tamura
9df46cb550 Use standard locale when executing 'parted' command
Not only 'dd' command but also 'parted' makes iscsi deploy fail in
Japanese environment. This patch applies the same fix as 'dd'.

 ironic.drivers.modules.iscsi_deploy [-] Deploy failed for instance
 <uuid>. Error: 'ascii' codec can't decode byte 0xe8 in position 20:
 ordinal not in range(128)

Related-Bug: #1488289
Change-Id: Ie3aedba60a4ed883ab24760947e65b8b3e9fa6b0
2015-10-06 18:03:50 +09:00
Jenkins
ed6e0952f7 Merge "Add more info level logs to disk_utils.work_on_disk() method" 0.3.0 2015-10-05 18:29:48 +00:00
Jenkins
1022292f5a Merge "Sync the make_partitions function with ironic" 2015-10-05 18:29:27 +00:00
John L. Villalovos
e05116288a Replace .iteritems() with .items()
As mentioned in the developer's guide[0] and in a discussion[1], we
shouldn't use six.iteritems() unless there's a good reason (eg large
data set).

Since there's no need to use six.iteritems() or dict.iteritems() in the
two places where it is being used, this patch replaces them with
items().

[0] http://docs.openstack.org/infra/manual/developers.html#peer-review
[1] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: Iaf4ffc755293454a054fff3efffd5a30e1c18fd7
2015-10-02 10:57:53 -07:00
OpenStack Proposal Bot
7de3055b4f Updated from global requirements
Change-Id: I42da3cb2a80c6d2cc27b4868f95ff8e27ab018e7
2015-10-02 16:27:00 +00:00
John L. Villalovos
c437095245 Add more info level logs to disk_utils.work_on_disk() method
The disk_utils.work_on_disk() is an important method for pxe_* drivers,
so add more info log for debugging helps identify if breaks in the
work_on_disk_method call.

This is a cross-port of Ironic commit:
64943229a802285f3b61c0cb4ca5af2791189978

Change-Id: I466482f7eba812effe6043a0bdb88cc972f37e2e
2015-10-01 16:15:59 -07:00
John L. Villalovos
69d9b66b99 Sync the make_partitions function with ironic
The make_partions function was mysteriously different from what is in
ironic. Re-sync the code to be in-line with ironic.

Also remove the is_iscsi_device function as it is not used anymore
after this change.

Change-Id: If1a7fef61b839efafa8c44423bda67f15735332e
2015-10-01 13:04:31 -07:00
John L. Villalovos
b2877e43f6 Add 'node_uuid' in debug logs to assist debugging
Some people in other patch about info log level suggested that some
LOG.debug calls should also inform the 'node_uuid' on the log message,
so this patch addresses this suggestion.

This is cross-porting from ironic the commit
efa64a2fec12da2e34c958893f9dc0930957c67e

Change-Id: I1b033837b3b8f87b4a5564eab9e4f6c40b72de96
2015-10-01 11:11:30 -07:00
Jenkins
2888c2d2c7 Merge "Move to oslo.i18n" 0.2.0 2015-10-01 17:29:58 +00:00
Jenkins
448e8a5723 Merge "Update setup.cfg" 2015-10-01 16:38:30 +00:00
Jim Rollenhagen
cf73a8fb7f Move to oslo.i18n
This brings in i18n.py from ironic (as a helper) and switches all i18n
references to use that module.

The _i18n module from oslo-incubator is left, as syncing imageutils
brings it in.

Change-Id: I012ceb7031695407febbb3bbd24622773a2d9d0f
2015-10-01 09:38:29 -07:00
Jenkins
bab7ddf00f Merge "Remove TODO" 2015-10-01 13:42:29 +00:00
John L. Villalovos
63f83cc9ff Put py34 first in the env order of tox
To solve the problem of "db type could not be determined" on py34 we
have to run first the py34 env to, then, run py27.  This patch puts py34
first on the tox.ini list of envs to avoid this problem to happen.

Change-Id: I80b755d0aa18db7c55ccaecd1c4f64d4fe09b4c5
Closes-Bug: #1489059
2015-10-01 06:07:29 +00:00
Jenkins
86e25fc1b2 Merge "Add a cover target to tox" 2015-10-01 06:04:50 +00:00
Jenkins
ca14dbb6e5 Merge "Better optimize test runs" 2015-10-01 06:04:44 +00:00
Jenkins
1fc3e0569d Merge "Move tests/ under ironic_lib/, use ostestr" 2015-10-01 06:04:24 +00:00
Jenkins
2c7571da1a Merge "Remove execute permission from exception.py" 2015-10-01 05:44:25 +00:00
Jenkins
a88f5a9bf0 Merge "Remove README.md and update README.rst" 2015-10-01 05:42:13 +00:00
John L. Villalovos
a66db8414b Remove README.md and update README.rst
Let's only have one README file for the project

Change-Id: I35648f5ab9f414599421d84eaef5bd87281b831f
2015-09-30 14:53:06 -07:00
John L. Villalovos
467c10d8d1 Update link for where to report bugs
Bugs should be reported against ironic-lib and not ironic

Change-Id: I7b5755043e87e88499610923d698e4108aefd36c
2015-09-30 13:53:11 -07:00
John L. Villalovos
f1630095ff Remove execute permission from exception.py
The exception.py file was marked as executable

Change-Id: I3e16b706bf4fd4997f848f4656e5fe8fee014521
2015-09-30 13:49:09 -07:00
Jim Rollenhagen
d7d3d03ddf Add a cover target to tox
This allows a post job to generate coverage data for ironic-lib. The
package name needs to be overridden, as the default is taken to be
ironic-lib, not ironic_lib.

Omit openstack.common as we aren't responsible for testing that.

Change-Id: I30a810effd918b8cb88485a527ecbfbc01dfb2e1
2015-09-30 09:37:26 -07:00
Jim Rollenhagen
eb1277cc59 Better optimize test runs
This syncs a few changes from ironic's tox.ini:

* Specify minimum tox version as 1.8
* Skips sdist generation
* Don't write bytecode (pyc) when running tests
* Run tests in English so that log messages are consistent

Change-Id: If0b8afb1102d8ee2ba31ea88f1259fbb42143605
2015-09-30 09:37:26 -07:00