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
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
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
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
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
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
This fixes the help string for the 'rootwrap_helper_cmd' config
so that it is correct.
Change-Id: I361189b0107ec7182e8510dab58ded360546993f
Closes-Bug: #1506526
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
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
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
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
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
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
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
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