Merge "Remove log translations"
This commit is contained in:
commit
80df1b309d
senlinclient
@ -22,12 +22,3 @@ _translators = oslo_i18n.TranslatorFactory(domain='senlinclient')
|
|||||||
|
|
||||||
# The primary translation function using the well-known name "_"
|
# The primary translation function using the well-known name "_"
|
||||||
_ = _translators.primary
|
_ = _translators.primary
|
||||||
|
|
||||||
# Translators for log levels.
|
|
||||||
# The abbreviated names are meant to reflect the usual use of a short
|
|
||||||
# name like '_'. The "L" is for "log" and the other letter comes from
|
|
||||||
# the level.
|
|
||||||
_LI = _translators.log_info
|
|
||||||
_LW = _translators.log_warning
|
|
||||||
_LE = _translators.log_error
|
|
||||||
_LC = _translators.log_critical
|
|
||||||
|
@ -26,7 +26,6 @@ from oslo_utils import strutils
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from senlinclient.common.i18n import _
|
from senlinclient.common.i18n import _
|
||||||
from senlinclient.common.i18n import _LI
|
|
||||||
from senlinclient.common import utils as senlin_utils
|
from senlinclient.common import utils as senlin_utils
|
||||||
|
|
||||||
|
|
||||||
@ -312,10 +311,10 @@ class DeleteCluster(command.Command):
|
|||||||
if not prompt_response.startswith('y'):
|
if not prompt_response.startswith('y'):
|
||||||
return
|
return
|
||||||
except KeyboardInterrupt: # Ctrl-c
|
except KeyboardInterrupt: # Ctrl-c
|
||||||
self.log.info(_LI('Ctrl-c detected.'))
|
self.log.info('Ctrl-c detected.')
|
||||||
return
|
return
|
||||||
except EOFError: # Ctrl-d
|
except EOFError: # Ctrl-d
|
||||||
self.log.info(_LI('Ctrl-d detected'))
|
self.log.info('Ctrl-d detected')
|
||||||
return
|
return
|
||||||
|
|
||||||
result = {}
|
result = {}
|
||||||
|
@ -23,7 +23,6 @@ from oslo_utils import strutils
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from senlinclient.common.i18n import _
|
from senlinclient.common.i18n import _
|
||||||
from senlinclient.common.i18n import _LI
|
|
||||||
from senlinclient.common import utils as senlin_utils
|
from senlinclient.common import utils as senlin_utils
|
||||||
|
|
||||||
|
|
||||||
@ -315,10 +314,10 @@ class DeleteNode(command.Command):
|
|||||||
if not prompt_response.startswith('y'):
|
if not prompt_response.startswith('y'):
|
||||||
return
|
return
|
||||||
except KeyboardInterrupt: # Ctrl-c
|
except KeyboardInterrupt: # Ctrl-c
|
||||||
self.log.info(_LI('Ctrl-c detected.'))
|
self.log.info('Ctrl-c detected.')
|
||||||
return
|
return
|
||||||
except EOFError: # Ctrl-d
|
except EOFError: # Ctrl-d
|
||||||
self.log.info(_LI('Ctrl-d detected'))
|
self.log.info('Ctrl-d detected')
|
||||||
return
|
return
|
||||||
|
|
||||||
result = {}
|
result = {}
|
||||||
|
@ -20,7 +20,7 @@ from osc_lib.command import command
|
|||||||
from osc_lib import exceptions as exc
|
from osc_lib import exceptions as exc
|
||||||
from osc_lib import utils
|
from osc_lib import utils
|
||||||
|
|
||||||
from senlinclient.common.i18n import _, _LI
|
from senlinclient.common.i18n import _
|
||||||
from senlinclient.common import utils as senlin_utils
|
from senlinclient.common import utils as senlin_utils
|
||||||
|
|
||||||
|
|
||||||
@ -254,10 +254,10 @@ class DeletePolicy(command.Command):
|
|||||||
if not prompt_response.startswith('y'):
|
if not prompt_response.startswith('y'):
|
||||||
return
|
return
|
||||||
except KeyboardInterrupt: # Ctrl-c
|
except KeyboardInterrupt: # Ctrl-c
|
||||||
self.log.info(_LI('Ctrl-c detected.'))
|
self.log.info('Ctrl-c detected.')
|
||||||
return
|
return
|
||||||
except EOFError: # Ctrl-d
|
except EOFError: # Ctrl-d
|
||||||
self.log.info(_LI('Ctrl-d detected'))
|
self.log.info('Ctrl-d detected')
|
||||||
return
|
return
|
||||||
|
|
||||||
failure_count = 0
|
failure_count = 0
|
||||||
|
@ -20,7 +20,7 @@ from osc_lib.command import command
|
|||||||
from osc_lib import exceptions as exc
|
from osc_lib import exceptions as exc
|
||||||
from osc_lib import utils
|
from osc_lib import utils
|
||||||
|
|
||||||
from senlinclient.common.i18n import _, _LI
|
from senlinclient.common.i18n import _
|
||||||
from senlinclient.common import utils as senlin_utils
|
from senlinclient.common import utils as senlin_utils
|
||||||
|
|
||||||
|
|
||||||
@ -190,10 +190,10 @@ class DeleteProfile(command.Command):
|
|||||||
if not prompt_response.startswith('y'):
|
if not prompt_response.startswith('y'):
|
||||||
return
|
return
|
||||||
except KeyboardInterrupt: # Ctrl-c
|
except KeyboardInterrupt: # Ctrl-c
|
||||||
self.log.info(_LI('Ctrl-c detected.'))
|
self.log.info('Ctrl-c detected.')
|
||||||
return
|
return
|
||||||
except EOFError: # Ctrl-d
|
except EOFError: # Ctrl-d
|
||||||
self.log.info(_LI('Ctrl-d detected'))
|
self.log.info('Ctrl-d detected')
|
||||||
return
|
return
|
||||||
|
|
||||||
failure_count = 0
|
failure_count = 0
|
||||||
|
@ -20,7 +20,7 @@ from osc_lib.command import command
|
|||||||
from osc_lib import exceptions as exc
|
from osc_lib import exceptions as exc
|
||||||
from osc_lib import utils
|
from osc_lib import utils
|
||||||
|
|
||||||
from senlinclient.common.i18n import _, _LI
|
from senlinclient.common.i18n import _
|
||||||
from senlinclient.common import utils as senlin_utils
|
from senlinclient.common import utils as senlin_utils
|
||||||
|
|
||||||
|
|
||||||
@ -246,10 +246,10 @@ class DeleteReceiver(command.Command):
|
|||||||
if not prompt_response.startswith('y'):
|
if not prompt_response.startswith('y'):
|
||||||
return
|
return
|
||||||
except KeyboardInterrupt: # Ctrl-c
|
except KeyboardInterrupt: # Ctrl-c
|
||||||
self.log.info(_LI('Ctrl-c detected.'))
|
self.log.info('Ctrl-c detected.')
|
||||||
return
|
return
|
||||||
except EOFError: # Ctrl-d
|
except EOFError: # Ctrl-d
|
||||||
self.log.info(_LI('Ctrl-d detected'))
|
self.log.info('Ctrl-d detected')
|
||||||
return
|
return
|
||||||
|
|
||||||
failure_count = 0
|
failure_count = 0
|
||||||
|
@ -20,7 +20,7 @@ from oslo_utils import strutils
|
|||||||
import six
|
import six
|
||||||
|
|
||||||
from senlinclient.common import exc
|
from senlinclient.common import exc
|
||||||
from senlinclient.common.i18n import _, _LW
|
from senlinclient.common.i18n import _
|
||||||
from senlinclient.common import utils
|
from senlinclient.common import utils
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -28,8 +28,8 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
def show_deprecated(deprecated, recommended):
|
def show_deprecated(deprecated, recommended):
|
||||||
logger.warning(
|
logger.warning(
|
||||||
_LW('"%(old)s" is deprecated and will be removed by Apr 2017, '
|
('"%(old)s" is deprecated and will be removed by Apr 2017, '
|
||||||
'please use "%(new)s" instead.'),
|
'please use "%(new)s" instead.'),
|
||||||
{'old': deprecated, 'new': recommended})
|
{'old': deprecated, 'new': recommended})
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user