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

Garrett Holmstrom gholms at fedoraproject.org
Sat Mar 16 03:26:40 UTC 2013


The following commit has been merged in the experimental branch:
commit 7fb6937917b7b63cf4fa6bd325d8bc0d9f437855
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Tue Jan 8 14:47:14 2013 -0800

    Print previous, current states when starting
    
    This requires boto 2.6 or a patched version that includes the fix that
    appears in boto commit a23c379 due to boto bug 889.  When that fix is
    not present the tool will fall back to the old output format that does
    not include instance states.
    
    Fixes TOOLS-175

diff --git a/euca2ools/commands/euca/startinstances.py b/euca2ools/commands/euca/startinstances.py
index 35a9207..17c733b 100644
--- a/euca2ools/commands/euca/startinstances.py
+++ b/euca2ools/commands/euca/startinstances.py
@@ -31,6 +31,7 @@
 # Author: Neil Soman neil at eucalyptus.com
 #         Mitch Garnaat mgarnaat at eucalyptus.com
 
+import boto.ec2.instance
 import euca2ools.commands.eucacommand
 from boto.roboto.param import Param
 
@@ -43,8 +44,14 @@ class StartInstances(euca2ools.commands.eucacommand.EucaCommand):
 
     def display_instances(self, instances):
         for instance in instances:
-            print 'INSTANCE\t%s' % instance.id
-            
+            if 'InstanceState' in dir(boto.ec2.instance):
+                # See https://eucalyptus.atlassian.net/browse/TOOLS-109
+                print 'INSTANCE\t%s\t%s\t%s' % (instance.id,
+                                                instance.previous_state,
+                                                instance.state)
+            else:
+                print 'INSTANCE\t%s' % instance.id
+
     def main(self):
         conn = self.make_connection_cli()
         return self.make_request_cli(conn, 'start_instances',

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list