replace string format arguments with function parameters
There are files containing string format arguments inside logging messages. Using logging function parameters should be preferred. Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
This commit is contained in:
parent
870e7ddbcc
commit
3b485de6b0
@ -103,7 +103,7 @@ def get_extension_modules(group):
|
||||
"""Add extension clients"""
|
||||
mod_list = []
|
||||
for ep in pkg_resources.iter_entry_points(group):
|
||||
LOG.debug('found extension %r' % ep.name)
|
||||
LOG.debug('found extension %r', ep.name)
|
||||
|
||||
__import__(ep.module_name)
|
||||
module = sys.modules[ep.module_name]
|
||||
|
@ -37,7 +37,7 @@ class CommandManager(cliff.commandmanager.CommandManager):
|
||||
group = self.namespace
|
||||
self.group_list.append(group)
|
||||
for ep in pkg_resources.iter_entry_points(group):
|
||||
LOG.debug('found command %r' % ep.name)
|
||||
LOG.debug('found command %r', ep.name)
|
||||
cmd_name = (
|
||||
ep.name.replace('_', ' ')
|
||||
if self.convert_underscores
|
||||
|
@ -52,7 +52,7 @@ class ShowLimits(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
volume_client = self.app.client_manager.volume
|
||||
|
@ -39,7 +39,7 @@ class ListModule(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
data = {}
|
||||
# Get module versions
|
||||
|
@ -79,7 +79,7 @@ class SetQuota(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
volume_client = self.app.client_manager.volume
|
||||
@ -148,7 +148,7 @@ class ShowQuota(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
volume_client = self.app.client_manager.volume
|
||||
|
@ -34,7 +34,7 @@ def make_client(instance):
|
||||
API_NAME,
|
||||
instance._api_version[API_NAME],
|
||||
API_VERSIONS)
|
||||
LOG.debug('instantiating compute client: %s' % compute_client)
|
||||
LOG.debug('instantiating compute client: %s', compute_client)
|
||||
|
||||
# Set client http_log_debug to True if verbosity level is high enough
|
||||
http_log_debug = utils.get_effective_log_level() <= logging.DEBUG
|
||||
|
@ -60,7 +60,7 @@ class CreateAgent(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
args = (
|
||||
parsed_args.os,
|
||||
@ -88,7 +88,7 @@ class DeleteAgent(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
compute_client.agents.delete(parsed_args.id)
|
||||
return
|
||||
@ -108,7 +108,7 @@ class ListAgent(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
columns = (
|
||||
"Agent ID",
|
||||
@ -152,7 +152,7 @@ class SetAgent(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
args = (
|
||||
parsed_args.id,
|
||||
|
@ -47,7 +47,7 @@ class AddAggregateHost(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
@ -89,7 +89,7 @@ class CreateAggregate(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
@ -124,7 +124,7 @@ class DeleteAggregate(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
data = utils.find_resource(
|
||||
@ -150,7 +150,7 @@ class ListAggregate(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
@ -207,7 +207,7 @@ class RemoveAggregateHost(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
@ -257,7 +257,7 @@ class SetAggregate(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
aggregate = utils.find_resource(
|
||||
@ -304,7 +304,7 @@ class ShowAggregate(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
data = utils.find_resource(
|
||||
|
@ -48,7 +48,7 @@ class ShowConsoleLog(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
server = utils.find_resource(
|
||||
@ -104,7 +104,7 @@ class ShowConsoleURL(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
server = utils.find_resource(
|
||||
compute_client.servers,
|
||||
|
@ -42,7 +42,7 @@ class AddFixedIP(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
network = utils.find_resource(
|
||||
@ -75,7 +75,7 @@ class RemoveFixedIP(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
server = utils.find_resource(
|
||||
|
@ -93,7 +93,7 @@ class CreateFlavor(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
args = (
|
||||
@ -128,7 +128,7 @@ class DeleteFlavor(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
flavor = utils.find_resource(compute_client.flavors,
|
||||
parsed_args.flavor)
|
||||
@ -142,7 +142,7 @@ class ListFlavor(lister.Lister):
|
||||
log = logging.getLogger(__name__ + ".ListFlavor")
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
columns = (
|
||||
"ID",
|
||||
@ -177,7 +177,7 @@ class ShowFlavor(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
flavor = utils.find_resource(compute_client.flavors,
|
||||
parsed_args.flavor)._info.copy()
|
||||
|
@ -45,7 +45,7 @@ class AddFloatingIP(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
server = utils.find_resource(
|
||||
@ -70,7 +70,7 @@ class CreateFloatingIP(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
floating_ip = compute_client.floating_ips.create(parsed_args.pool)
|
||||
|
||||
@ -94,7 +94,7 @@ class DeleteFloatingIP(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
floating_ip = utils.find_resource(
|
||||
@ -112,7 +112,7 @@ class ListFloatingIP(lister.Lister):
|
||||
log = logging.getLogger(__name__ + '.ListFloatingIP')
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
columns = ('ID', 'Pool', 'IP', 'Fixed IP', 'Instance ID')
|
||||
@ -146,7 +146,7 @@ class RemoveFloatingIP(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
server = utils.find_resource(
|
||||
|
@ -28,7 +28,7 @@ class ListFloatingIPPool(lister.Lister):
|
||||
log = logging.getLogger(__name__ + '.ListFloatingIPPool')
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
columns = ('Name',)
|
||||
|
@ -36,7 +36,7 @@ class ListHost(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
columns = (
|
||||
"Host Name",
|
||||
@ -64,7 +64,7 @@ class ShowHost(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
columns = (
|
||||
"Host",
|
||||
|
@ -39,7 +39,7 @@ class ListHypervisor(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
columns = (
|
||||
"ID",
|
||||
@ -71,7 +71,7 @@ class ShowHypervisor(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
hypervisor = utils.find_resource(compute_client.hypervisors,
|
||||
parsed_args.id)._info.copy()
|
||||
|
@ -48,7 +48,7 @@ class CreateKeypair(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
public_key = parsed_args.public_key
|
||||
@ -93,7 +93,7 @@ class DeleteKeypair(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
compute_client.keypairs.delete(parsed_args.name)
|
||||
return
|
||||
@ -105,7 +105,7 @@ class ListKeypair(lister.Lister):
|
||||
log = logging.getLogger(__name__ + ".ListKeypair")
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
columns = (
|
||||
"Name",
|
||||
@ -140,7 +140,7 @@ class ShowKeypair(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
keypair = utils.find_resource(compute_client.keypairs,
|
||||
parsed_args.name)
|
||||
|
@ -71,7 +71,7 @@ class CreateSecurityGroup(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
@ -100,7 +100,7 @@ class DeleteSecurityGroup(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
data = utils.find_resource(
|
||||
@ -134,7 +134,7 @@ class ListSecurityGroup(lister.Lister):
|
||||
except KeyError:
|
||||
return project_id
|
||||
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
columns = (
|
||||
@ -187,7 +187,7 @@ class SetSecurityGroup(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
data = utils.find_resource(
|
||||
@ -228,7 +228,7 @@ class ShowSecurityGroup(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
info = {}
|
||||
@ -286,7 +286,7 @@ class CreateSecurityGroupRule(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
group = utils.find_resource(
|
||||
@ -340,7 +340,7 @@ class DeleteSecurityGroupRule(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
group = utils.find_resource(
|
||||
@ -374,7 +374,7 @@ class ListSecurityGroupRule(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
group = utils.find_resource(
|
||||
|
@ -121,7 +121,7 @@ class AddServerVolume(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
volume_client = self.app.client_manager.volume
|
||||
@ -162,7 +162,7 @@ class AddServerSecurityGroup(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
@ -278,7 +278,7 @@ class CreateServer(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
# Lookup parsed_args.image
|
||||
@ -363,8 +363,8 @@ class CreateServer(show.ShowOne):
|
||||
scheduler_hints=hints,
|
||||
config_drive=config_drive)
|
||||
|
||||
self.log.debug('boot_args: %s' % boot_args)
|
||||
self.log.debug('boot_kwargs: %s' % boot_kwargs)
|
||||
self.log.debug('boot_args: %s', boot_args)
|
||||
self.log.debug('boot_kwargs: %s', boot_kwargs)
|
||||
server = compute_client.servers.create(*boot_args, **boot_kwargs)
|
||||
|
||||
if parsed_args.wait:
|
||||
@ -375,7 +375,7 @@ class CreateServer(show.ShowOne):
|
||||
):
|
||||
sys.stdout.write('\n')
|
||||
else:
|
||||
self.log.error('Error creating server: %s' %
|
||||
self.log.error('Error creating server: %s',
|
||||
parsed_args.server_name)
|
||||
sys.stdout.write('\nError creating server')
|
||||
raise SystemExit
|
||||
@ -409,7 +409,7 @@ class CreateServerImage(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
image_client = self.app.client_manager.image
|
||||
server = utils.find_resource(
|
||||
@ -435,7 +435,7 @@ class CreateServerImage(show.ShowOne):
|
||||
sys.stdout.write('\n')
|
||||
else:
|
||||
self.log.error(
|
||||
'Error creating server snapshot: %s' %
|
||||
'Error creating server snapshot: %s',
|
||||
parsed_args.image_name,
|
||||
)
|
||||
sys.stdout.write('\nError creating server snapshot')
|
||||
@ -465,7 +465,7 @@ class DeleteServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
server = utils.find_resource(
|
||||
compute_client.servers, parsed_args.server)
|
||||
@ -530,7 +530,7 @@ class ListServer(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
search_opts = {
|
||||
'reservation_id': parsed_args.reservation_id,
|
||||
@ -600,7 +600,7 @@ class LockServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
utils.find_resource(
|
||||
@ -672,7 +672,7 @@ class MigrateServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
@ -716,7 +716,7 @@ class PauseServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
utils.find_resource(
|
||||
@ -762,7 +762,7 @@ class RebootServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
server = utils.find_resource(
|
||||
compute_client.servers, parsed_args.server)
|
||||
@ -811,7 +811,7 @@ class RebuildServer(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
# Lookup parsed_args.image
|
||||
@ -856,7 +856,7 @@ class RemoveServerSecurityGroup(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
@ -892,7 +892,7 @@ class RemoveServerVolume(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
volume_client = self.app.client_manager.volume
|
||||
@ -927,7 +927,7 @@ class RescueServer(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
server = utils.find_resource(
|
||||
@ -968,7 +968,7 @@ class ResizeServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
server = utils.find_resource(
|
||||
@ -1013,7 +1013,7 @@ class ResumeServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
utils.find_resource(
|
||||
@ -1054,7 +1054,7 @@ class SetServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
server = utils.find_resource(
|
||||
@ -1102,7 +1102,7 @@ class ShowServer(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
server = utils.find_resource(compute_client.servers,
|
||||
parsed_args.server)
|
||||
@ -1224,7 +1224,7 @@ class SshServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
server = utils.find_resource(
|
||||
@ -1272,7 +1272,7 @@ class SshServer(command.Command):
|
||||
cmd += " -v"
|
||||
|
||||
cmd += " %s@%s"
|
||||
self.log.debug("ssh command: %s" % (cmd % (login, ip_address)))
|
||||
self.log.debug("ssh command: %s", (cmd % (login, ip_address)))
|
||||
os.system(cmd % (login, ip_address))
|
||||
|
||||
|
||||
@ -1291,7 +1291,7 @@ class SuspendServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
utils.find_resource(
|
||||
@ -1315,7 +1315,7 @@ class UnlockServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
utils.find_resource(
|
||||
@ -1339,7 +1339,7 @@ class UnpauseServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
utils.find_resource(
|
||||
@ -1363,7 +1363,7 @@ class UnrescueServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
compute_client = self.app.client_manager.compute
|
||||
utils.find_resource(
|
||||
@ -1395,7 +1395,7 @@ class UnsetServer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
server = utils.find_resource(
|
||||
compute_client.servers,
|
||||
|
@ -40,7 +40,7 @@ class ListService(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
columns = (
|
||||
"Binary",
|
||||
@ -88,7 +88,7 @@ class SetService(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
columns = (
|
||||
"Host",
|
||||
|
@ -47,7 +47,7 @@ class ListUsage(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
def _format_project(project):
|
||||
if not project:
|
||||
|
@ -46,7 +46,7 @@ class CreateEC2Creds(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.project:
|
||||
@ -93,7 +93,7 @@ class DeleteEC2Creds(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.user:
|
||||
@ -123,7 +123,7 @@ class ListEC2Creds(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.user:
|
||||
@ -166,7 +166,7 @@ class ShowEC2Creds(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.user:
|
||||
|
@ -57,7 +57,7 @@ class CreateEndpoint(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
service = common.find_service(identity_client, parsed_args.service)
|
||||
endpoint = identity_client.endpoints.create(
|
||||
@ -88,7 +88,7 @@ class DeleteEndpoint(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
identity_client.endpoints.delete(parsed_args.endpoint)
|
||||
return
|
||||
@ -109,7 +109,7 @@ class ListEndpoint(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
if parsed_args.long:
|
||||
columns = ('ID', 'Region', 'Service Name', 'Service Type',
|
||||
@ -143,7 +143,7 @@ class ShowEndpoint(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
data = identity_client.endpoints.list()
|
||||
match = None
|
||||
|
@ -64,7 +64,7 @@ class CreateProject(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
enabled = True
|
||||
@ -101,7 +101,7 @@ class DeleteProject(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
project = utils.find_resource(
|
||||
@ -129,7 +129,7 @@ class ListProject(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
if parsed_args.long:
|
||||
columns = ('ID', 'Name', 'Description', 'Enabled')
|
||||
else:
|
||||
@ -185,7 +185,7 @@ class SetProject(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if (not parsed_args.name
|
||||
@ -236,7 +236,7 @@ class ShowProject(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
project = utils.find_resource(
|
||||
identity_client.tenants,
|
||||
|
@ -51,7 +51,7 @@ class AddRole(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
role = utils.find_resource(identity_client.roles, parsed_args.role)
|
||||
project = utils.find_resource(
|
||||
@ -84,7 +84,7 @@ class CreateRole(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
role = identity_client.roles.create(parsed_args.role_name)
|
||||
|
||||
@ -108,7 +108,7 @@ class DeleteRole(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
role = utils.find_resource(
|
||||
@ -126,7 +126,7 @@ class ListRole(lister.Lister):
|
||||
log = logging.getLogger(__name__ + '.ListRole')
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
columns = ('ID', 'Name')
|
||||
data = self.app.client_manager.identity.roles.list()
|
||||
return (columns,
|
||||
@ -156,7 +156,7 @@ class ListUserRole(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
auth_ref = self.app.client_manager.auth_ref
|
||||
|
||||
@ -228,7 +228,7 @@ class RemoveRole(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
role = utils.find_resource(identity_client.roles, parsed_args.role)
|
||||
project = utils.find_resource(
|
||||
@ -256,7 +256,7 @@ class ShowRole(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
role = utils.find_resource(identity_client.roles, parsed_args.role)
|
||||
|
||||
|
@ -53,7 +53,7 @@ class CreateService(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
service = identity_client.services.create(
|
||||
@ -81,7 +81,7 @@ class DeleteService(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
service = common.find_service(identity_client, parsed_args.service)
|
||||
identity_client.services.delete(service.id)
|
||||
@ -103,7 +103,7 @@ class ListService(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
if parsed_args.long:
|
||||
columns = ('ID', 'Name', 'Type', 'Description')
|
||||
@ -138,7 +138,7 @@ class ShowService(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.catalog:
|
||||
|
@ -31,7 +31,7 @@ class CreateToken(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
token = identity_client.service_catalog.get_token()
|
||||
token['project_id'] = token.pop('tenant_id')
|
||||
|
@ -72,7 +72,7 @@ class CreateUser(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.project:
|
||||
@ -123,7 +123,7 @@ class DeleteUser(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
user = utils.find_resource(
|
||||
@ -155,7 +155,7 @@ class ListUser(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
def _format_project(project):
|
||||
@ -277,7 +277,7 @@ class SetUser(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.password_prompt:
|
||||
@ -343,7 +343,7 @@ class ShowUser(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
user = utils.find_resource(
|
||||
|
@ -41,7 +41,7 @@ class CreateConsumer(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
consumer = identity_client.consumers.create_consumer(
|
||||
parsed_args.description
|
||||
@ -66,7 +66,7 @@ class DeleteConsumer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
consumer = utils.find_resource(
|
||||
identity_client.consumers, parsed_args.consumer)
|
||||
@ -80,7 +80,7 @@ class ListConsumer(lister.Lister):
|
||||
log = logging.getLogger(__name__ + '.ListConsumer')
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
columns = ('ID', 'Description')
|
||||
data = self.app.client_manager.identity.consumers.list_consumers()
|
||||
return (columns,
|
||||
@ -110,7 +110,7 @@ class SetConsumer(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
consumer = utils.find_resource(
|
||||
identity_client.consumers, parsed_args.consumer)
|
||||
@ -147,7 +147,7 @@ class ShowConsumer(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
consumer = utils.find_resource(
|
||||
identity_client.consumers, parsed_args.consumer)
|
||||
|
@ -58,7 +58,7 @@ class CreateCredential(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
user_id = utils.find_resource(identity_client.users,
|
||||
parsed_args.user).id
|
||||
@ -91,7 +91,7 @@ class DeleteCredential(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
identity_client.credentials.delete(parsed_args.credential)
|
||||
return
|
||||
@ -103,7 +103,7 @@ class ListCredential(lister.Lister):
|
||||
log = logging.getLogger(__name__ + '.ListCredential')
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
columns = ('ID', 'Type', 'User ID', 'Data', 'Project ID')
|
||||
data = self.app.client_manager.identity.credentials.list()
|
||||
return (columns,
|
||||
@ -149,7 +149,7 @@ class SetCredential(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
user_id = utils.find_resource(identity_client.users,
|
||||
parsed_args.user).id
|
||||
@ -187,7 +187,7 @@ class ShowCredential(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
credential = utils.find_resource(identity_client.credentials,
|
||||
parsed_args.credential)
|
||||
|
@ -58,7 +58,7 @@ class CreateDomain(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
domain = identity_client.domains.create(
|
||||
name=parsed_args.name,
|
||||
@ -84,7 +84,7 @@ class DeleteDomain(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
domain = utils.find_resource(identity_client.domains,
|
||||
parsed_args.domain)
|
||||
@ -98,7 +98,7 @@ class ListDomain(lister.Lister):
|
||||
log = logging.getLogger(__name__ + '.ListDomain')
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
columns = ('ID', 'Name', 'Enabled', 'Description')
|
||||
data = self.app.client_manager.identity.domains.list()
|
||||
return (columns,
|
||||
@ -147,7 +147,7 @@ class SetDomain(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
domain = utils.find_resource(identity_client.domains,
|
||||
parsed_args.domain)
|
||||
@ -181,7 +181,7 @@ class ShowDomain(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
domain = utils.find_resource(identity_client.domains,
|
||||
parsed_args.domain)
|
||||
|
@ -68,7 +68,7 @@ class CreateEndpoint(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
service = common.find_service(identity_client, parsed_args.service)
|
||||
|
||||
@ -101,7 +101,7 @@ class DeleteEndpoint(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
endpoint_id = utils.find_resource(identity_client.endpoints,
|
||||
parsed_args.endpoint).id
|
||||
@ -115,7 +115,7 @@ class ListEndpoint(lister.Lister):
|
||||
log = logging.getLogger(__name__ + '.ListEndpoint')
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
columns = ('ID', 'Region', 'Service Name', 'Service Type',
|
||||
'Enabled', 'Interface', 'URL')
|
||||
@ -177,7 +177,7 @@ class SetEndpoint(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
endpoint = utils.find_resource(identity_client.endpoints,
|
||||
parsed_args.endpoint)
|
||||
@ -214,7 +214,7 @@ class ShowEndpoint(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
endpoint = utils.find_resource(identity_client.endpoints,
|
||||
parsed_args.endpoint)
|
||||
|
@ -46,7 +46,7 @@ class AddUserToGroup(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
user_id = utils.find_resource(identity_client.users,
|
||||
@ -84,7 +84,7 @@ class CheckUserInGroup(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
user_id = utils.find_resource(identity_client.users,
|
||||
@ -125,7 +125,7 @@ class CreateGroup(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
if parsed_args.domain:
|
||||
domain = utils.find_resource(identity_client.domains,
|
||||
@ -156,7 +156,7 @@ class DeleteGroup(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
group = utils.find_resource(identity_client.groups, parsed_args.group)
|
||||
identity_client.groups.delete(group.id)
|
||||
@ -202,7 +202,7 @@ class ListGroup(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.role:
|
||||
@ -292,7 +292,7 @@ class RemoveUserFromGroup(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
user_id = utils.find_resource(identity_client.users,
|
||||
@ -336,7 +336,7 @@ class SetGroup(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
group = utils.find_resource(identity_client.groups, parsed_args.group)
|
||||
kwargs = {}
|
||||
@ -370,7 +370,7 @@ class ShowGroup(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
group = utils.find_resource(identity_client.groups, parsed_args.group)
|
||||
|
||||
|
@ -59,7 +59,7 @@ class CreateIdentityProvider(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
idp = identity_client.identity_providers.create(
|
||||
parsed_args.identity_provider_id,
|
||||
@ -85,7 +85,7 @@ class DeleteIdentityProvider(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
identity_client.identity_providers.delete(
|
||||
parsed_args.identity_provider)
|
||||
@ -98,7 +98,7 @@ class ListIdentityProvider(lister.Lister):
|
||||
log = logging.getLogger(__name__ + '.ListIdentityProvider')
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
columns = ('ID', 'Enabled', 'Description')
|
||||
data = self.app.client_manager.identity.identity_providers.list()
|
||||
return (columns,
|
||||
@ -135,7 +135,7 @@ class SetIdentityProvider(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.enable is True:
|
||||
@ -169,7 +169,7 @@ class ShowIdentityProvider(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
identity_provider = utils.find_resource(
|
||||
identity_client.identity_providers,
|
||||
|
@ -47,7 +47,7 @@ class CreatePolicy(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
blob = utils.read_blob_file_contents(parsed_args.blob_file)
|
||||
|
||||
identity_client = self.app.client_manager.identity
|
||||
@ -73,7 +73,7 @@ class DeletePolicy(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
identity_client.policies.delete(parsed_args.policy)
|
||||
return
|
||||
@ -95,7 +95,7 @@ class ListPolicy(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
if parsed_args.include_blob:
|
||||
columns = ('ID', 'Type', 'Blob')
|
||||
else:
|
||||
@ -133,7 +133,7 @@ class SetPolicy(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
blob = None
|
||||
|
||||
@ -168,7 +168,7 @@ class ShowPolicy(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
policy = utils.find_resource(identity_client.policies,
|
||||
parsed_args.policy)
|
||||
|
@ -69,7 +69,7 @@ class CreateProject(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.domain:
|
||||
@ -115,7 +115,7 @@ class DeleteProject(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
project = utils.find_resource(
|
||||
@ -148,7 +148,7 @@ class ListProject(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
if parsed_args.long:
|
||||
columns = ('ID', 'Name', 'Domain ID', 'Description', 'Enabled')
|
||||
@ -216,7 +216,7 @@ class SetProject(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if (not parsed_args.name
|
||||
@ -274,7 +274,7 @@ class ShowProject(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
project = utils.find_resource(identity_client.projects,
|
||||
parsed_args.project)
|
||||
|
@ -63,7 +63,7 @@ class AddRole(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if (not parsed_args.user and not parsed_args.domain
|
||||
@ -152,7 +152,7 @@ class CreateRole(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
role = identity_client.roles.create(name=parsed_args.name)
|
||||
@ -175,7 +175,7 @@ class DeleteRole(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
role = utils.find_resource(
|
||||
@ -193,7 +193,7 @@ class ListRole(lister.Lister):
|
||||
log = logging.getLogger(__name__ + '.ListRole')
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
columns = ('ID', 'Name')
|
||||
data = self.app.client_manager.identity.roles.list()
|
||||
return (columns,
|
||||
@ -240,7 +240,7 @@ class RemoveRole(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if (not parsed_args.user and not parsed_args.domain
|
||||
@ -334,7 +334,7 @@ class SetRole(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if not parsed_args.name:
|
||||
@ -364,7 +364,7 @@ class ShowRole(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
role = utils.find_resource(
|
||||
|
@ -57,7 +57,7 @@ class CreateService(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
enabled = True
|
||||
@ -88,7 +88,7 @@ class DeleteService(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
service = common.find_service(identity_client, parsed_args.service)
|
||||
@ -103,7 +103,7 @@ class ListService(lister.Lister):
|
||||
log = logging.getLogger(__name__ + '.ListService')
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
columns = ('ID', 'Name', 'Type', 'Enabled')
|
||||
data = self.app.client_manager.identity.services.list()
|
||||
@ -150,7 +150,7 @@ class SetService(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if (not parsed_args.name
|
||||
@ -195,7 +195,7 @@ class ShowService(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
service = common.find_service(identity_client, parsed_args.service)
|
||||
|
@ -60,7 +60,7 @@ class AuthenticateAccessToken(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
token_client = self.app.client_manager.identity.tokens
|
||||
keystone_token = token_client.authenticate_access_token(
|
||||
parsed_args.consumer_key, parsed_args.consumer_secret,
|
||||
@ -84,7 +84,7 @@ class AuthorizeRequestToken(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
token_client = self.app.client_manager.identity.tokens
|
||||
|
||||
verifier_pin = token_client.authorize_request_token(
|
||||
@ -134,7 +134,7 @@ class CreateAccessToken(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
token_client = self.app.client_manager.identity.tokens
|
||||
access_token = token_client.create_access_token(
|
||||
parsed_args.consumer_key, parsed_args.consumer_secret,
|
||||
@ -175,7 +175,7 @@ class CreateRequestToken(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
token_client = self.app.client_manager.identity.tokens
|
||||
request_token = token_client.create_request_token(
|
||||
parsed_args.consumer_key,
|
||||
@ -195,7 +195,7 @@ class CreateToken(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
token = identity_client.service_catalog.get_token()
|
||||
if 'tenant_id' in token:
|
||||
@ -223,7 +223,7 @@ class DeleteAccessToken(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
identity_client = self.app.client_manager.identity
|
||||
user = utils.find_resource(
|
||||
@ -248,7 +248,7 @@ class ListAccessToken(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
identity_client = self.app.client_manager.identity
|
||||
user = utils.find_resource(
|
||||
|
@ -83,7 +83,7 @@ class CreateUser(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.project:
|
||||
@ -136,7 +136,7 @@ class DeleteUser(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
user = utils.find_resource(
|
||||
@ -187,7 +187,7 @@ class ListUser(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.role:
|
||||
@ -321,7 +321,7 @@ class SetUser(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
if parsed_args.password_prompt:
|
||||
@ -385,7 +385,7 @@ class ShowUser(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
identity_client = self.app.client_manager.identity
|
||||
|
||||
user = utils.find_resource(
|
||||
|
@ -163,7 +163,7 @@ class CreateImage(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
# NOTE(jk0): Since create() takes kwargs, it's easiest to just make a
|
||||
# copy of parsed_args and remove what we don't need.
|
||||
@ -233,7 +233,7 @@ class DeleteImage(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
image_client = self.app.client_manager.image
|
||||
image = utils.find_resource(
|
||||
@ -258,7 +258,7 @@ class ListImage(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
image_client = self.app.client_manager.image
|
||||
|
||||
@ -292,7 +292,7 @@ class SaveImage(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
image_client = self.app.client_manager.image
|
||||
image = utils.find_resource(
|
||||
@ -376,7 +376,7 @@ class SetImage(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
# NOTE(jk0): Since create() takes kwargs, it's easiest to just make a
|
||||
# copy of parsed_args and remove what we don't need.
|
||||
@ -417,7 +417,7 @@ class ShowImage(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
image_client = self.app.client_manager.image
|
||||
image = utils.find_resource(
|
||||
|
@ -41,7 +41,7 @@ class DeleteImage(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
image_client = self.app.client_manager.image
|
||||
image = utils.find_resource(
|
||||
@ -66,7 +66,7 @@ class ListImage(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
image_client = self.app.client_manager.image
|
||||
|
||||
@ -100,7 +100,7 @@ class SaveImage(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
image_client = self.app.client_manager.image
|
||||
image = utils.find_resource(
|
||||
@ -127,7 +127,7 @@ class ShowImage(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
|
||||
image_client = self.app.client_manager.image
|
||||
image = utils.find_resource(
|
||||
|
@ -69,7 +69,7 @@ class ListContainer(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
if parsed_args.long:
|
||||
columns = ('Name', 'Bytes', 'Count')
|
||||
@ -116,7 +116,7 @@ class ShowContainer(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
data = lib_container.show_container(
|
||||
self.app.restapi,
|
||||
|
@ -79,7 +79,7 @@ class ListObject(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
if parsed_args.long:
|
||||
columns = (
|
||||
@ -140,7 +140,7 @@ class ShowObject(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
data = lib_object.show_object(
|
||||
self.app.restapi,
|
||||
|
@ -422,13 +422,14 @@ class OpenStackShell(app.App):
|
||||
ver = getattr(self.options, mod.API_VERSION_OPTION, None)
|
||||
if ver:
|
||||
self.api_version[mod.API_NAME] = ver
|
||||
self.log.debug('%s API version %s' % (mod.API_NAME, ver))
|
||||
self.log.debug('%(name)s API version %(version)s',
|
||||
{'name': mod.API_NAME, 'version': ver})
|
||||
|
||||
# Add the API version-specific commands
|
||||
for api in self.api_version.keys():
|
||||
version = '.v' + self.api_version[api].replace('.', '_')
|
||||
cmd_group = 'openstack.' + api.replace('-', '_') + version
|
||||
self.log.debug('command group %s' % cmd_group)
|
||||
self.log.debug('command group %s', cmd_group)
|
||||
self.command_manager.add_command_group(cmd_group)
|
||||
|
||||
# Commands that span multiple APIs
|
||||
|
@ -57,7 +57,7 @@ class CreateBackup(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
volume_id = utils.find_resource(volume_client.volumes,
|
||||
parsed_args.volume).id
|
||||
@ -87,7 +87,7 @@ class DeleteBackup(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
backup_id = utils.find_resource(volume_client.backups,
|
||||
parsed_args.backup).id
|
||||
@ -101,7 +101,7 @@ class ListBackup(lister.Lister):
|
||||
log = logging.getLogger(__name__ + '.ListBackup')
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
columns = (
|
||||
'ID',
|
||||
'Display Name',
|
||||
@ -135,7 +135,7 @@ class RestoreBackup(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
backup = utils.find_resource(volume_client.backups,
|
||||
parsed_args.backup)
|
||||
@ -159,7 +159,7 @@ class ShowBackup(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
backup = utils.find_resource(volume_client.backups,
|
||||
parsed_args.backup)
|
||||
|
@ -59,7 +59,7 @@ class CreateSnapshot(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
volume_id = utils.find_resource(volume_client.volumes,
|
||||
parsed_args.volume).id
|
||||
@ -88,7 +88,7 @@ class DeleteSnapshot(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
snapshot_id = utils.find_resource(volume_client.volume_snapshots,
|
||||
parsed_args.snapshot).id
|
||||
@ -102,7 +102,7 @@ class ListSnapshot(lister.Lister):
|
||||
log = logging.getLogger(__name__ + '.ListSnapshot')
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
columns = (
|
||||
'ID',
|
||||
'Display Name',
|
||||
@ -140,7 +140,7 @@ class SetSnapshot(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
snapshot = utils.find_resource(volume_client.volume_snapshots,
|
||||
parsed_args.snapshot)
|
||||
@ -171,7 +171,7 @@ class ShowSnapshot(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
snapshot = utils.find_resource(volume_client.volume_snapshots,
|
||||
parsed_args.snapshot)
|
||||
|
@ -48,7 +48,7 @@ class CreateVolumeType(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
volume_type = volume_client.volume_types.create(parsed_args.name)
|
||||
volume_type._info.pop('extra_specs')
|
||||
@ -76,7 +76,7 @@ class DeleteVolumeType(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
volume_type_id = utils.find_resource(
|
||||
volume_client.volume_types, parsed_args.volume_type).id
|
||||
@ -99,7 +99,7 @@ class ListVolumeType(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
if parsed_args.long:
|
||||
columns = ('ID', 'Name', 'Extra Specs')
|
||||
column_headers = ('ID', 'Name', 'Properties')
|
||||
@ -136,7 +136,7 @@ class SetVolumeType(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
volume_type = utils.find_resource(
|
||||
volume_client.volume_types, parsed_args.volume_type)
|
||||
@ -170,7 +170,7 @@ class UnsetVolumeType(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
volume_type = utils.find_resource(
|
||||
volume_client.volume_types,
|
||||
|
@ -96,7 +96,7 @@ class CreateVolume(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
identity_client = self.app.client_manager.identity
|
||||
volume_client = self.app.client_manager.volume
|
||||
@ -164,7 +164,7 @@ class DeleteVolume(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
volume = utils.find_resource(
|
||||
volume_client.volumes, parsed_args.volume)
|
||||
@ -207,7 +207,7 @@ class ListVolume(lister.Lister):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
|
||||
if parsed_args.long:
|
||||
columns = (
|
||||
@ -293,7 +293,7 @@ class SetVolume(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
volume = utils.find_resource(volume_client.volumes, parsed_args.volume)
|
||||
|
||||
@ -329,7 +329,7 @@ class ShowVolume(show.ShowOne):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
volume = utils.find_resource(volume_client.volumes, parsed_args.volume)
|
||||
# Map 'metadata' column to 'properties'
|
||||
@ -370,7 +370,7 @@ class UnsetVolume(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug('take_action(%s)' % parsed_args)
|
||||
self.log.debug('take_action(%s)', parsed_args)
|
||||
volume_client = self.app.client_manager.volume
|
||||
volume = utils.find_resource(
|
||||
volume_client.volumes, parsed_args.volume)
|
||||
|
Loading…
Reference in New Issue
Block a user