Commit Graph

9 Commits

Author SHA1 Message Date
John L. Villalovos
2547573407 Remove translation of log messages
Remove translation of log messages. Log messages will no longer be
translated.

Closes-Bug: #1674374
Change-Id: I66791c08e335c5c5dd7b65a8df6e2132192630a2
2017-03-21 12:12:56 -07:00
John L. Villalovos
30c946d330 Use flake8-import-order
Use the flake8 plugin flake8-import-order to check import ordering. It
can do it automatically and don't need reviewers to check it.

Change-Id: Ib3fde54d8baa2c6e3567ff3f1a902de4b25f9f70
2017-02-16 09:51:31 -08:00
yuyafei
bb90b10b8b Correct reraising of exception
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
2016-08-24 12:37:59 +01:00
Aline Bousquet
fb46000e24 Add support for metrics
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
2016-06-28 13:38:01 +01: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
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
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
Faizan Barmawer
123414e327 Merge latest disk partitioning code from ironic
There were changes to the disk partitioner code in ironic project to support
local boot, local boot with uefi, uefi support in agent driver, deploy whole
disk, etc. These changes should be merged in ironic-lib before we replace all
disk partitioner code in ironic with ironic-lib.

The ironic changes were part of the following commit SHA.
file: ironic/common/disk_partitioner.py
0f4eba18544469d826b4d2d4b420d83c646af463
8c07c4fda3e6a86a40aa00759652b99acbd73331
4e0a78633996d27e21d899661a6414bbea77a0d7
b7e8a8eb51dcd00ce06c9151ad7c8bca8391210e

file: ironic/drivers/modules/deploy_utils.py
e8eeba4c0d063eac3c283b4af92608c7a6d73e7d
cb2e58207203b210d91dacca3c40d91ed1c45a24
987302450af73940794e53233129e90cd4b950f7
da9ed8d0eb1c5d467b41f61185501c26ea2e4ce5
222c84fff52be8383b26495c37df28cc5a0f98b9
dedb425770a6f91a54e990159843ac201dc2f1a5

Change-Id: I6afdaf6a173c1caa9daccb62cb15b630391f161b
Partially-implements: blueprint partition-image-support-for-agent-driver
2015-08-05 03:50:30 -07:00
Faizan Barmawer
1d78cb7167 Initial commit for ironic-lib 2015-02-26 04:15:08 -08:00