summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authortermie <github@anarkystic.com>2012-01-09 21:30:09 -0800
committertermie <github@anarkystic.com>2012-01-10 16:33:46 -0800
commit230a00386014c06e01b9d79a641640f4d6d6e764 (patch)
tree688828e400947bbea4209b5e6680ecb44a4504d6 /bin
parent59614300798793e40619ce2d272bc8a7d8fd62d7 (diff)
downloadkeystone-230a00386014c06e01b9d79a641640f4d6d6e764.tar.gz
keystone-230a00386014c06e01b9d79a641640f4d6d6e764.tar.xz
keystone-230a00386014c06e01b9d79a641640f4d6d6e764.zip
add id-only flag to return IDs
Diffstat (limited to 'bin')
-rwxr-xr-xbin/keystone-manage6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/keystone-manage b/bin/keystone-manage
index a07acc25..310b5bfa 100755
--- a/bin/keystone-manage
+++ b/bin/keystone-manage
@@ -29,6 +29,9 @@ config.register_cli_str('endpoint',
config.register_cli_str('token',
default='$admin_token',
group='ks')
+config.register_cli_bool('id-only',
+ default=False,
+ group='ks')
class BaseApp(cli.log.LoggingApp):
@@ -93,6 +96,9 @@ class ClientCommand(BaseApp):
action_name = self.ACTION_MAP[self.params.action]
kv = self._parse_keyvalues(self.params.keyvalues)
resp = getattr(self.handle, action_name)(**kv)
+ if CONF.ks.id_only and getattr(resp, 'id'):
+ print resp.id
+ return
print resp