Merge "Standardize logger usage of catalog in identity"

This commit is contained in:
Jenkins
2016-06-23 15:27:06 +00:00
committed by Gerrit Code Review
2 changed files with 12 additions and 4 deletions

View File

@@ -13,6 +13,8 @@
"""Identity v2 Service Catalog action implementations""" """Identity v2 Service Catalog action implementations"""
import logging
from osc_lib.command import command from osc_lib.command import command
from osc_lib import exceptions from osc_lib import exceptions
from osc_lib import utils from osc_lib import utils
@@ -21,6 +23,9 @@ import six
from openstackclient.i18n import _ from openstackclient.i18n import _
LOG = logging.getLogger(__name__)
def _format_endpoints(eps=None): def _format_endpoints(eps=None):
if not eps: if not eps:
return "" return ""
@@ -92,8 +97,7 @@ class ShowCatalog(command.ShowOne):
break break
if not data: if not data:
self.app.log.error(_('service %s not found\n') % LOG.error(_('service %s not found\n'), parsed_args.service)
parsed_args.service)
return ((), ()) return ((), ())
return zip(*sorted(six.iteritems(data))) return zip(*sorted(six.iteritems(data)))

View File

@@ -13,6 +13,8 @@
"""Identity v3 Service Catalog action implementations""" """Identity v3 Service Catalog action implementations"""
import logging
from osc_lib.command import command from osc_lib.command import command
from osc_lib import exceptions from osc_lib import exceptions
from osc_lib import utils from osc_lib import utils
@@ -21,6 +23,9 @@ import six
from openstackclient.i18n import _ from openstackclient.i18n import _
LOG = logging.getLogger(__name__)
def _format_endpoints(eps=None): def _format_endpoints(eps=None):
if not eps: if not eps:
return "" return ""
@@ -87,8 +92,7 @@ class ShowCatalog(command.ShowOne):
break break
if not data: if not data:
self.app.log.error(_('service %s not found\n') % LOG.error(_('service %s not found\n'), parsed_args.service)
parsed_args.service)
return ((), ()) return ((), ())
return zip(*sorted(six.iteritems(data))) return zip(*sorted(six.iteritems(data)))