This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).
Change-Id: Ifbec28e1510fd2fa5a48b471458c16b5a1ef8ad3
This patch is adding a function called match_root_device_hints() to the
utils.py module. This function tries to find a device that matches all the
given root device hints.
Closes-Bug: #1561137
Change-Id: Ia3ad098d6334ba22387c0f6d17b4bd518b178ca9
Sync tools/tox_install.sh with python-openstackclient. This brings in
the following improvements:
* Do not leave temporary directory around, instead delete temporary
directory directly after usage (change
I939eae82dba3287fd4e4086128ebf4609a0e0770).
* Do not set ZUUL_BRANCH explicitely and remove unused if condition
(change I0077c986a17d6bb92791474e03d1e77776e9382f).
Change-Id: I455222311fb1e9e029cb586c8cc6a06debaaa225
This patch is extending the parse_root_device_hints() method to make it
work with the oslo.utils operators.
Partial-Bug: #1561137
Change-Id: I9ab7357e396b89e1fe0c326d9bdfaca71916910e
Following OpenStack Style Guidelines:
http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
[H203] Unit test assertions tend to give better messages for more specific assertions.
As a result, assertIsNone(...) is preferred over assertEqual(None, ...)
Change-Id: Id34fb0851d698ed9c1c77cbb230f32aa21678c4e
When an exception was caught and rethrown, it should call 'raise'
without any arguments because it shows the place where an exception
occured initially instead of place where the exception re-raised.
Change-Id: I112eeea489470bca34b588bd862500d615c84e67
Adds developer documentation to ironic-lib index page about how to emit
metrics and what each metric type is useful for.
Change-Id: I3e835717aa141f0e0fa0f026b910b9a9ed60665e
Partial-bug: #1611559
This patch fixes all sphinx warnings generated by malformed docstrings.
Additionally, it contains formatting and accuracy fixes for the metrics
docstrings, to ensure blockquotes are properly rendered, and to indicate
the get_metrics_logger() method is actually in metrics_utils.
Finally, this adds doc8 to the pep8 job, ensuring we don't reintroduce
some of these errors. As a note, there are items that can cause warnings
in doc builds that aren't enforced by doc8, and can't be enforced until
a doc build job is added to project-config.
Change-Id: I622812bfe8af576ab215c098dd211c6faf697a0c
Partial-bug: #1614272
Partial-bug: #1611559
This adds a doc build for ironic-lib. Currently the only documentation
is that generated from docstrings.
Change-Id: I6ee00ad863bc7ce72958db4e8d5b6871a5b96eb0
Partial-bug: #1614272
This will work for UEFI only or BIOS only images. It will not
work for hybrid images; which are capable of boot from BIOS
and UEFI boot mode.
Partial-Bug: #1493328
Change-Id: I4c517f63d620b5a9de31ecb2d7c209776d5ded48
This patch is adding a function called parse_root_device_hints to the
utils.py module. This function is responsible for parsing the root
device hints dictionary from the node's properties attribute.
Both Ironic and Ironic Python Agent project have similar functions so
adding it to ironic-lib would make it easier to share code between both
projects and fix bugs in only one place.
Change-Id: Ida6d20d1fdb40e50fe33ffec1c953286d4cbc2b7
Partial-Bug: #1605631
Wipefs sometimes failed with errors like 'Device or resource busy',
include --force option to fix the problems.
Change-Id: Iad864d7ae9ab67286853f3c533a9c385ffe2cb05
Closes-Bug: #1590304
Closes-Bug: #1580169
This adds the keyword argument 'log_stdout' (Boolean) to utils.execute().
If set to True, it will log the stdout returned by executing the
command. By default, it is True.
This argument is used in ipa's (ironic-python-agent) copy of execute(),
and is being added here in preparation for changing ipa to use this
library's execute().
The docstrings associated with utils.execute() were updated to reflect
the copy in ipa.
Change-Id: I44148c6e9150c7afd3de7b0b59bedb4983d9a6a7
Partial-Bug: 1587199
Some of the mocked objects in the unit tests do not have
autospec=True specified. This patch adds them, so that the
tests are consistent.
autospec=True is useful because it creates mock objects
that have the same attributes and methods as the objects
they are replacing.
Change-Id: I49b3a2dd7694666f6f62d3557ccee19a582d5868
This patch adds metrics to ironic-lib, so that it can be used by both
Ironic and IPA. It implements a generic MetricLogger including timers,
counters, and gauges with their respective decorators and context
managers. Two default MetricLogger are included: NoopMetricLogger and
StatsdMetricLogger.
Change-Id: I8a62414e6c03acb6f3457f1b8f81c03a9d3a8576
Co-Authored-By: Josh Gachnang <josh@pcsforeducation.com>
Co-Authored-By: Jim Rollenhagen <jim@jimrollenhagen.com>
Co-Authored-By: Alex Weeks <alex.weeks@gmail.com>
Partial-Bug: #1526219
This removes support for the deprecated configuration
options in the [deploy] group: efi_system_partition_size,
dd_block_size, iscsi_verify_attempts. They are available
in the [disk_util] group.
The three configuration options in [disk_util] had originally
been in ironic code (the [deploy] group) and was moved in
Feb 2015 to this library. Ironic started using this library
in (early) Mitaka development cycle.
Change-Id: Ie8ee2aab69ef2f0d711b276f3538c832c3369f29
Ironic doesn't support local booting of images in BIOS boot mode
when the disk_label is GPT. The current changes creates BIOS Boot
partition when the disk_label is chosen as gpt. The partition size
is a configurable parameter.
Change-Id: Iade60da0316b8f1c0bf8ce4c79931c1105d19cec
Closes-bug: #1563291
This patch is updating the README file to clarify that only projects
under the Ironic governance should be consuming this library.
Change-Id: Ie1430c955e44311bbe5d60503ee146ce1601612e
--coverage-package-name option was no longer supported by 'testr'[1].
This commit replaces from 'testr' to 'test' as coverage option.
[1] https://review.openstack.org/#/c/217847/
Change-Id: I0e3e5e837ee2f7275c489502700e91c15c7d44aa
Add entry points to explore config options.
This could be used for oslo-config-generator.
Partial-Bug: #1564195
Change-Id: Ibf844b903340f834cca5cc4539ddd9cecbeda90a