diff -Nru euca2ools-2.0.2/debian/changelog euca2ools-2.0.2/debian/changelog --- euca2ools-2.0.2/debian/changelog 2012-06-09 22:07:46.000000000 -0700 +++ euca2ools-2.0.2/debian/changelog 2012-06-13 09:31:28.000000000 -0700 @@ -1,3 +1,12 @@ +euca2ools (2.0.2-1ubuntu1) precise; urgency=low + + * Carried over three remaining patches + - describe-images-results.patch + - describe-instances-add-additional-fields.patch + - describe-snapshots-improve.patch + + -- Brian Thomason Wed, 13 Jun 2012 09:30:00 -0700 + euca2ools (2.0.2-1) unstable; urgency=low [ Miguel Landaeta ] diff -Nru euca2ools-2.0.2/debian/patches/describe-images-results.patch euca2ools-2.0.2/debian/patches/describe-images-results.patch --- euca2ools-2.0.2/debian/patches/describe-images-results.patch 1969-12-31 16:00:00.000000000 -0800 +++ euca2ools-2.0.2/debian/patches/describe-images-results.patch 2012-06-13 09:29:35.000000000 -0700 @@ -0,0 +1,49 @@ +Description: fix describe-images output to be consistent with ec2-describe-images + This was initially fixed under bug 541468, but has since regressed. + I've run the same 'go.sh' that is referenced in that bug against this + branch and got the same results. + . + The current issue is that 'euca-describe-images' currently lists + all images even though it should only list "owned or executable by self". + a 'make man' will fail for eustore-install-image. This simply + makes it attempt to gain environment after command line arguments are + processed, so that no EC2_CERT and friends are required to run '--help'. +Origin: Scott Moser +Forwarded: https://code.launchpad.net/~smoser/euca2ools/describe-images-results/+merge/85743 +Last-Update: 2011-12-14 +--- a/euca2ools/commands/euca/describeimages.py ++++ b/euca2ools/commands/euca/describeimages.py +@@ -156,12 +156,28 @@ class DescribeImages(euca2ools.commands. + if self.all: + self.executable_by = [] + self.owner = [] +- ++ + conn = self.make_connection_cli() +- images = self.make_request_cli(conn, 'get_all_images', +- image_ids=self.image, +- owners=self.owner, +- executable_by=self.executable_by) ++ if (self.executable_by or self.owner or self.image or self.all): ++ images = self.make_request_cli(conn, 'get_all_images', ++ image_ids=self.image, ++ owners=self.owner, ++ executable_by=self.executable_by) ++ else: ++ owned = self.make_request_cli(conn, 'get_all_images', ++ image_ids = None, owners = ("self",), executable_by = None) ++ launchable = self.make_request_cli(conn, 'get_all_images', ++ image_ids = None, owners = None, executable_by = ("self")) ++ ++ seen = { } ++ images = [ ] ++ for image in owned: ++ seen[image.id] = True ++ images.append(image) ++ for image in launchable: ++ if image.id not in seen: ++ images.append(image) ++ + return images + + def main_cli(self): diff -Nru euca2ools-2.0.2/debian/patches/describe-instances-add-additional-fields.patch euca2ools-2.0.2/debian/patches/describe-instances-add-additional-fields.patch --- euca2ools-2.0.2/debian/patches/describe-instances-add-additional-fields.patch 1969-12-31 16:00:00.000000000 -0800 +++ euca2ools-2.0.2/debian/patches/describe-instances-add-additional-fields.patch 2012-06-13 09:26:04.000000000 -0700 @@ -0,0 +1,54 @@ +Description: include additional fields in describe-instances output + This adds some additional fields to describe-instances output. + Most immediately useful are private_ip and public_ip. +Origin: Scott Moser +Forwarded: https://code.launchpad.net/~smoser/euca2ools/describe-instances.extra-fields/+merge/96291 +Bug: https://bugs.launchpad.net/euca2ools/+bug/947342 +=== modified file 'euca2ools/utils.py' +--- a/euca2ools/utils.py 2012-01-05 22:24:20 +0000 ++++ b/euca2ools/utils.py 2012-03-05 18:19:25 +0000 +@@ -70,10 +70,21 @@ + dict[keylist[i]] = values[i] + + def print_instances(instances, nil=""): ++ ++ # I was not able to correctly identify fields with an 'xx' below the ++ # descriptions at ++ # http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-DescribeInstances.html ++ # were not sufficiently detailed, even when coupled with some limited ++ # experimentation ++ # ++ # Additionally, in order to get 'hypervisor', the api request version ++ # in the make_ec2_connection method would need to be increased. + members=( "id", "image_id", "public_dns_name", "private_dns_name", + "state", "key_name", "ami_launch_index", "product_codes", + "instance_type", "launch_time", "placement", "kernel", +- "ramdisk" ) ++ "ramdisk", "xx", "_monitoring", 'ip_address', 'private_ip_address', ++ "vpc_id", "subnet_id", "root_device_type", "xx", "xx", "xx", "xx", ++ "virtualizationType", "hypervisor", "xx", "_groupnames", "_groupids" ) + + for instance in instances: + # in old describe-instances, there was a check for 'if instance:' +@@ -82,7 +93,19 @@ + if not instance: continue + items=[ ] + for member in members: +- val = getattr(instance,member,nil) ++ # boto's "monitoring" item is blank string ++ if member == "_monitoring": ++ if instance.monitored: ++ val = "monitoring-enabled" ++ else: ++ val = "monitoring-disabled" ++ elif member == "_groupids": ++ val = [x.name for x in instance.groups] ++ elif member == "_groupnames": ++ val = [x.id for x in instance.groups] ++ else: ++ val = getattr(instance,member,nil) ++ + # product_codes is a list + if val is None: val = nil + if hasattr(val,'__iter__'): + diff -Nru euca2ools-2.0.2/debian/patches/describe-snapshots-improve.patch euca2ools-2.0.2/debian/patches/describe-snapshots-improve.patch --- euca2ools-2.0.2/debian/patches/describe-snapshots-improve.patch 1969-12-31 16:00:00.000000000 -0800 +++ euca2ools-2.0.2/debian/patches/describe-snapshots-improve.patch 2012-06-13 09:25:52.000000000 -0700 @@ -0,0 +1,53 @@ +Description: improve describe-snapshots + This patch does 2 things: + a.) adds additional fields to describe-snapshots output in keeping + with ec2-describe-snapshots + b.) adds the --all flag and change default output to '-r self' + which is the same as ec2-describe-snapshots (LP: #744976) +Origin: Scott Moser +Forwarded: https://code.launchpad.net/~smoser/euca2ools/describe-snapshots-improve/+merge/85752 +Last-Update: 2011-12-14 +--- a/euca2ools/commands/euca/describesnapshots.py ++++ b/euca2ools/commands/euca/describesnapshots.py +@@ -41,6 +41,9 @@ class DescribeSnapshots(euca2ools.comman + Options = [Param(name='owner', short_name='o', long_name='owner', + optional=True, ptype='string', + doc='ID of the user who owns the snapshot.'), ++ Param(name='all', short_name='a', long_name='all', ++ optional=True, ptype='boolean', default=False, ++ doc='Describe all snapshots, public, private or shared'), + Param(name='restorable_by', + short_name='r', long_name='restorable-by', + optional=True, ptype='string', +@@ -78,14 +81,27 @@ class DescribeSnapshots(euca2ools.comman + doc='The size of the volume, in GiB.')] + + def display_snapshots(self, snapshots): ++ members=( "id", "volume_id", "status", "start_time", "progress", ++ "owner_id", "volume_size", "description" ) ++ + for snapshot in snapshots: +- snapshot_string = '%s\t%s\t%s\t%s\t%s' % (snapshot.id, +- snapshot.volume_id, snapshot.status, +- snapshot.start_time, snapshot.progress) +- print 'SNAPSHOT\t%s' % snapshot_string ++ items=[ ] ++ for member in members: ++ val = getattr(snapshot, member, "") ++ items.append(str(val)) ++ print "SNAPSHOT\t%s" % '\t'.join(items) ++ + + def main(self): + conn = self.make_connection_cli() ++ ++ if self.all and (self.owner or self.snapshot): ++ msg = "--all is incompatible with --owner or --restorable-by" ++ self.display_error_and_exit(msg) ++ ++ if not (self.all or self.owner or self.restorable_by or self.snapshot): ++ self.restorable_by = "self" ++ + return self.make_request_cli(conn, 'get_all_snapshots', + snapshot_ids=self.snapshot, + owner=self.owner, diff -Nru euca2ools-2.0.2/debian/patches/series euca2ools-2.0.2/debian/patches/series --- euca2ools-2.0.2/debian/patches/series 1969-12-31 16:00:00.000000000 -0800 +++ euca2ools-2.0.2/debian/patches/series 2012-06-13 09:28:35.000000000 -0700 @@ -0,0 +1,3 @@ +describe-images-results.patch +describe-snapshots-improve.patch +describe-instances-add-additional-fields.patch