[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, experimental, updated. debian/2.1.1-1_experimental1-51-g95835b7

Andrew Hamilton ahamilton55 at gmail.com
Thu Jan 3 11:06:06 UTC 2013


The following commit has been merged in the experimental branch:
commit 22ce2a86e378ef2186df3116291ee5f01f0ce582
Author: Andrew Hamilton <ahamilton55 at gmail.com>
Date:   Fri Jul 20 21:38:34 2012 -0700

    Change output habits of euca-create-keypair
    
    - Added a method print_fingerprint that is always printed.
    - If no the -f flag is not used then the private key should be printed
      to STDOUT.

diff --git a/euca2ools/commands/euca/createkeypair.py b/euca2ools/commands/euca/createkeypair.py
index 14c0f17..252590f 100644
--- a/euca2ools/commands/euca/createkeypair.py
+++ b/euca2ools/commands/euca/createkeypair.py
@@ -49,8 +49,10 @@ class CreateKeyPair(euca2ools.commands.eucacommand.EucaCommand):
                   doc='unique name for a keypair to be created',
                   cardinality=1, optional=False)]
 
-    def display_keypair(self, keypair):
+    def display_fingerprint(self, keypair):
         print 'KEYPAIR\t%s\t%s' % (keypair.name, keypair.fingerprint)
+
+    def display_keypair(self, keypair):
         print keypair.material
 
     def save_keypair_to_file(self, keypair):
@@ -67,7 +69,9 @@ class CreateKeyPair(euca2ools.commands.eucacommand.EucaCommand):
 
     def main_cli(self):
         keypair = self.main()
-        self.display_keypair(keypair)
+        self.display_fingerprint(keypair)
         if self.filename != None:
             self.save_keypair_to_file(keypair)
+        else:
+            self.display_keypair(keypair)
 

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list