Repository: cloudstack-cloudmonkey
Updated Branches:
  refs/heads/master 8ac5da4a3 -> c3cba3bd9


cloudmonkey: show partial chars when printing current profile when set is called

Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/commit/c3cba3bd
Tree: 
http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/c3cba3bd
Diff: 
http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/c3cba3bd

Branch: refs/heads/master
Commit: c3cba3bd9d3b650c64ea4fb13ef4747a59370cb9
Parents: 8ac5da4
Author: Rohit Yadav <rohit.ya...@shapeblue.com>
Authored: Thu Oct 30 16:04:06 2014 +0530
Committer: Rohit Yadav <rohit.ya...@shapeblue.com>
Committed: Thu Oct 30 16:04:06 2014 +0530

----------------------------------------------------------------------
 cloudmonkey/cloudmonkey.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/c3cba3bd/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/cloudmonkey.py b/cloudmonkey/cloudmonkey.py
index 28d6428..951aba3 100644
--- a/cloudmonkey/cloudmonkey.py
+++ b/cloudmonkey/cloudmonkey.py
@@ -540,7 +540,10 @@ class CloudMonkeyShell(cmd.Cmd, object):
         if key.strip() == 'profile':
             print "\nLoaded server profile '%s' with options:" % value
             for option in default_profile.keys():
-                print "    %s = %s" % (option, self.get_attr(option))
+                value = self.get_attr(option)
+                if option in ["password", "apikey", "secretkey"] and value:
+                    value = value[:2] + "XX" + value[4:6] + "YY..."
+                print "    %s = %s" % (option, value)
             print
 
     def complete_set(self, text, line, begidx, endidx):

Reply via email to