Use international logging message
Change-Id: I8e34028f0117e85fbbdc4f5fef884e41ac57a186
This commit is contained in:
@@ -32,6 +32,7 @@ from keystoneclient import session
|
||||
import six
|
||||
|
||||
from barbicanclient import client
|
||||
from barbicanclient._i18n import _LW
|
||||
from barbicanclient import version
|
||||
|
||||
|
||||
@@ -340,9 +341,9 @@ class Barbican(app.App):
|
||||
|
||||
def main(argv=sys.argv[1:]):
|
||||
logging.basicConfig()
|
||||
LOG.warning("This Barbican CLI interface has been deprecated and will be "
|
||||
"removed in the O release. Please use the openstack unified "
|
||||
"client instead.")
|
||||
LOG.warning(_LW("This Barbican CLI interface has been deprecated and "
|
||||
"will be removed in the O release. Please use the "
|
||||
"openstack unified client instead."))
|
||||
barbican_app = Barbican()
|
||||
return barbican_app.run(argv)
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ from barbicanclient import acls as acl_manager
|
||||
from barbicanclient import base
|
||||
from barbicanclient import exceptions
|
||||
from barbicanclient import formatter
|
||||
from barbicanclient._i18n import _LW
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@@ -191,7 +192,7 @@ class Secret(SecretFormatter):
|
||||
try:
|
||||
self._fetch_payload()
|
||||
except ValueError:
|
||||
LOG.warning("Secret does not contain a payload")
|
||||
LOG.warning(_LW("Secret does not contain a payload"))
|
||||
return None
|
||||
return self._payload
|
||||
|
||||
@@ -240,9 +241,10 @@ class Secret(SecretFormatter):
|
||||
@immutable_after_save
|
||||
def payload_content_type(self, value):
|
||||
LOG.warning(
|
||||
'DEPRECATION WARNING: Manually setting the payload_content_type '
|
||||
'can lead to unexpected results. It will be removed in a future '
|
||||
'release. See Launchpad Bug #1419166.'
|
||||
_LW('DEPRECATION WARNING: Manually setting the '
|
||||
'payload_content_type can lead to unexpected '
|
||||
'results. It will be removed in a future release. '
|
||||
'See Launchpad Bug #1419166.')
|
||||
)
|
||||
self._payload_content_type = value
|
||||
|
||||
@@ -250,9 +252,10 @@ class Secret(SecretFormatter):
|
||||
@immutable_after_save
|
||||
def payload_content_encoding(self, value):
|
||||
LOG.warning(
|
||||
'DEPRECATION WARNING: Manually setting the '
|
||||
'payload_content_encoding can lead to unexpected results. It '
|
||||
'will be removed in a future release. See Launchpad Bug #1419166.'
|
||||
_LW('DEPRECATION WARNING: Manually setting the '
|
||||
'payload_content_encoding can lead to unexpected '
|
||||
'results. It will be removed in a future release. '
|
||||
'See Launchpad Bug #1419166.')
|
||||
)
|
||||
self._payload_content_encoding = value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user