diff options
Diffstat (limited to 'openstackclient/identity/v2_0')
| -rw-r--r-- | openstackclient/identity/v2_0/project.py | 7 | ||||
| -rw-r--r-- | openstackclient/identity/v2_0/role.py | 7 | ||||
| -rw-r--r-- | openstackclient/identity/v2_0/service.py | 8 | ||||
| -rw-r--r-- | openstackclient/identity/v2_0/user.py | 7 |
4 files changed, 24 insertions, 5 deletions
diff --git a/openstackclient/identity/v2_0/project.py b/openstackclient/identity/v2_0/project.py index c4f730e0..6c5db13c 100644 --- a/openstackclient/identity/v2_0/project.py +++ b/openstackclient/identity/v2_0/project.py @@ -15,6 +15,8 @@ """Identity v2 Project action implementations""" +import logging + from keystoneauth1 import exceptions as ks_exc from osc_lib.cli import parseractions from osc_lib.command import command @@ -24,6 +26,9 @@ import six from openstackclient.i18n import _ +LOG = logging.getLogger(__name__) + + class CreateProject(command.ShowOne): """Create new project""" @@ -87,7 +92,7 @@ class CreateProject(command.ShowOne): identity_client.tenants, parsed_args.name, ) - self.log.info(_('Returning existing project %s'), project.name) + LOG.info(_('Returning existing project %s'), project.name) else: raise e diff --git a/openstackclient/identity/v2_0/role.py b/openstackclient/identity/v2_0/role.py index 4c3fe6e2..6d06230c 100644 --- a/openstackclient/identity/v2_0/role.py +++ b/openstackclient/identity/v2_0/role.py @@ -15,6 +15,8 @@ """Identity v2 Role action implementations""" +import logging + from keystoneauth1 import exceptions as ks_exc from osc_lib.command import command from osc_lib import exceptions @@ -24,6 +26,9 @@ import six from openstackclient.i18n import _ +LOG = logging.getLogger(__name__) + + class AddRole(command.ShowOne): """Add role to project:user""" @@ -94,7 +99,7 @@ class CreateRole(command.ShowOne): identity_client.roles, parsed_args.role_name, ) - self.log.info(_('Returning existing role %s'), role.name) + LOG.info(_('Returning existing role %s'), role.name) else: raise e diff --git a/openstackclient/identity/v2_0/service.py b/openstackclient/identity/v2_0/service.py index c67dede7..df332eb6 100644 --- a/openstackclient/identity/v2_0/service.py +++ b/openstackclient/identity/v2_0/service.py @@ -16,6 +16,7 @@ """Service action implementations""" import argparse +import logging from osc_lib.command import command from osc_lib import exceptions @@ -26,6 +27,9 @@ from openstackclient.i18n import _ from openstackclient.identity import common +LOG = logging.getLogger(__name__) + + class CreateService(command.ShowOne): """Create new service""" @@ -69,8 +73,8 @@ class CreateService(command.ShowOne): # display deprecation message. elif type: name = type_or_name - self.log.warning(_('The argument --type is deprecated, use service' - ' create --name <service-name> type instead.')) + LOG.warning(_('The argument --type is deprecated, use service' + ' create --name <service-name> type instead.')) # If --name option is present the positional is handled as <type>. # Making --type optional is new, but back-compatible elif name: diff --git a/openstackclient/identity/v2_0/user.py b/openstackclient/identity/v2_0/user.py index b8bbdaf4..0f327830 100644 --- a/openstackclient/identity/v2_0/user.py +++ b/openstackclient/identity/v2_0/user.py @@ -15,6 +15,8 @@ """Identity v2.0 User action implementations""" +import logging + from keystoneauth1 import exceptions as ks_exc from osc_lib.command import command from osc_lib import utils @@ -23,6 +25,9 @@ import six from openstackclient.i18n import _ +LOG = logging.getLogger(__name__) + + class CreateUser(command.ShowOne): """Create new user""" @@ -103,7 +108,7 @@ class CreateUser(command.ShowOne): identity_client.users, parsed_args.name, ) - self.log.info(_('Returning existing user %s'), user.name) + LOG.info(_('Returning existing user %s'), user.name) else: raise e |
