------------------------------------------------------------ revno: 27 fixes bug(s): https://launchpad.net/bugs/547059 committer: Scott Moser branch nick: lucid.dev timestamp: Thu 2010-03-25 13:16:38 -0400 message: euca-describe-snapshots: make output compatible with ec2-describe-snapshots LP: #547059 diff: === modified file 'bin/euca-describe-snapshots' --- bin/euca-describe-snapshots 2010-03-05 16:59:25 +0000 +++ bin/euca-describe-snapshots 2010-03-25 17:16:38 +0000 @@ -71,6 +71,7 @@ def main(): euca = None + restorable_by = "self" try: euca = Euca2ool() except Exception, e: @@ -91,13 +92,16 @@ print 'Invalid snapshot id' sys.exit(1) + if snapshot_ids: + restorable_by = None + try: euca_conn = euca.make_connection() except ConnectionFailed, e: print e.message sys.exit(1) try: - snapshots = euca_conn.get_all_snapshots() + snapshots = euca_conn.get_all_snapshots(restorable_by=restorable_by, snapshot_ids=snapshot_ids) except Exception, ex: euca.display_error_and_exit('%s' % ex)