Skip to content

Commit 3dda038

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Use oslo.utils and oslo.concurrency"
2 parents 88c2bca + 86ef5d3 commit 3dda038

File tree

20 files changed

+116
-1912
lines changed

20 files changed

+116
-1912
lines changed

ironic_python_agent/cmd/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
import os
1717

1818
from oslo.config import cfg
19+
from oslo_concurrency import processutils
1920

2021
from ironic_python_agent import agent
2122
from ironic_python_agent import errors
2223
from ironic_python_agent.openstack.common import log
23-
from ironic_python_agent.openstack.common import processutils
2424
from ironic_python_agent import utils
2525

2626
CONF = cfg.CONF

ironic_python_agent/extensions/standby.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
import StringIO
2222
import time
2323

24+
from oslo_concurrency import processutils
25+
2426
from ironic_python_agent import errors
2527
from ironic_python_agent.extensions import base
2628
from ironic_python_agent import hardware
2729
from ironic_python_agent.openstack.common import log
28-
from ironic_python_agent.openstack.common import processutils
2930
from ironic_python_agent import utils
3031

3132
LOG = log.getLogger(__name__)
Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +0,0 @@
1-
#
2-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
3-
# not use this file except in compliance with the License. You may obtain
4-
# a copy of the License at
5-
#
6-
# http://www.apache.org/licenses/LICENSE-2.0
7-
#
8-
# Unless required by applicable law or agreed to in writing, software
9-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11-
# License for the specific language governing permissions and limitations
12-
# under the License.
13-
14-
import six
15-
16-
17-
six.add_move(six.MovedModule('mox', 'mox', 'mox3.mox'))
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
13+
"""oslo.i18n integration module.
14+
15+
See http://docs.openstack.org/developer/oslo.i18n/usage.html
16+
17+
"""
18+
19+
try:
20+
import oslo.i18n
21+
22+
# NOTE(dhellmann): This reference to o-s-l-o will be replaced by the
23+
# application name when this module is synced into the separate
24+
# repository. It is OK to have more than one translation function
25+
# using the same domain, since there will still only be one message
26+
# catalog.
27+
_translators = oslo.i18n.TranslatorFactory(domain='ironic_python_agent')
28+
29+
# The primary translation function using the well-known name "_"
30+
_ = _translators.primary
31+
32+
# Translators for log levels.
33+
#
34+
# The abbreviated names are meant to reflect the usual use of a short
35+
# name like '_'. The "L" is for "log" and the other letter comes from
36+
# the level.
37+
_LI = _translators.log_info
38+
_LW = _translators.log_warning
39+
_LE = _translators.log_error
40+
_LC = _translators.log_critical
41+
except ImportError:
42+
# NOTE(dims): Support for cases where a project wants to use
43+
# code from ironic_python_agent-incubator, but is not ready to be internationalized
44+
# (like tempest)
45+
_ = _LI = _LW = _LE = _LC = lambda x: x

ironic_python_agent/openstack/common/config/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)