Standardize logger usage of catalog in identity
Change-Id: I5307f949b3a350e41840a4a5c191ceacf1b3b291 Partially-Implements: blueprint log-usage
This commit is contained in:
parent
51fcd7c30c
commit
e8483c9022
@ -13,6 +13,8 @@
|
||||
|
||||
"""Identity v2 Service Catalog action implementations"""
|
||||
|
||||
import logging
|
||||
|
||||
from osc_lib.command import command
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
@ -21,6 +23,9 @@ import six
|
||||
from openstackclient.i18n import _
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _format_endpoints(eps=None):
|
||||
if not eps:
|
||||
return ""
|
||||
@ -92,8 +97,7 @@ class ShowCatalog(command.ShowOne):
|
||||
break
|
||||
|
||||
if not data:
|
||||
self.app.log.error(_('service %s not found\n') %
|
||||
parsed_args.service)
|
||||
LOG.error(_('service %s not found\n'), parsed_args.service)
|
||||
return ((), ())
|
||||
|
||||
return zip(*sorted(six.iteritems(data)))
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
"""Identity v3 Service Catalog action implementations"""
|
||||
|
||||
import logging
|
||||
|
||||
from osc_lib.command import command
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
@ -21,6 +23,9 @@ import six
|
||||
from openstackclient.i18n import _
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _format_endpoints(eps=None):
|
||||
if not eps:
|
||||
return ""
|
||||
@ -87,8 +92,7 @@ class ShowCatalog(command.ShowOne):
|
||||
break
|
||||
|
||||
if not data:
|
||||
self.app.log.error(_('service %s not found\n') %
|
||||
parsed_args.service)
|
||||
LOG.error(_('service %s not found\n'), parsed_args.service)
|
||||
return ((), ())
|
||||
|
||||
return zip(*sorted(six.iteritems(data)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user