[pkg-eucalyptus-commits] [euca2ools] 04/41: Fix NIC attachment printing
Charles Plessy
plessy at alioth.debian.org
Sat Oct 12 03:24:09 UTC 2013
This is an automated email from the git hooks/post-receive script.
plessy pushed a commit to branch master
in repository euca2ools.
commit 7d4274a040b34b47649cc19e73bc8e4cb902151d
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Fri Jul 5 14:48:20 2013 -0700
Fix NIC attachment printing
Fixes TOOLS-353
---
euca2ools/commands/euca/__init__.py | 4 ++--
euca2ools/commands/euca/describeinstances.py | 2 +-
euca2ools/commands/euca/runinstances.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/euca2ools/commands/euca/__init__.py b/euca2ools/commands/euca/__init__.py
index a1d6839..53d239f 100644
--- a/euca2ools/commands/euca/__init__.py
+++ b/euca2ools/commands/euca/__init__.py
@@ -294,8 +294,8 @@ class EucalyptusRequest(AWSQueryRequest, TabifyingMixin):
'subnetId', 'vpcId', 'ownerId', 'status', 'privateIpAddress',
'privateDnsName', 'sourceDestCheck')]
print self.tabify(['NIC'] + nic_info)
- for attachment in nic.get('attachment', []):
- attachment_info = [attachment.get(attr) for attr in (
+ if nic.get('attachment'):
+ attachment_info = [nic['attachment'].get(attr) for attr in (
'attachmentID', 'deviceIndex', 'status', 'attachTime',
'deleteOnTermination')]
print self.tabify(['NICATTACHMENT'] + attachment_info)
diff --git a/euca2ools/commands/euca/describeinstances.py b/euca2ools/commands/euca/describeinstances.py
index f2102fa..b22e212 100644
--- a/euca2ools/commands/euca/describeinstances.py
+++ b/euca2ools/commands/euca/describeinstances.py
@@ -183,7 +183,7 @@ class DescribeInstances(EucalyptusRequest):
help='[VPC only] ID of the VPC the instance is in')]
LIST_TAGS = ['reservationSet', 'instancesSet', 'groupSet', 'tagSet',
'blockDeviceMapping', 'productCodes', 'networkInterfaceSet',
- 'attachment', 'association', 'privateIpAddressesSet']
+ 'association', 'privateIpAddressesSet']
def print_result(self, result):
for reservation in result.get('reservationSet'):
diff --git a/euca2ools/commands/euca/runinstances.py b/euca2ools/commands/euca/runinstances.py
index 3df0b9f..203f224 100644
--- a/euca2ools/commands/euca/runinstances.py
+++ b/euca2ools/commands/euca/runinstances.py
@@ -135,7 +135,7 @@ class RunInstances(EucalyptusRequest):
LIST_TAGS = ['reservationSet', 'instancesSet', 'groupSet', 'tagSet',
'blockDeviceMapping', 'productCodes', 'networkInterfaceSet',
- 'attachment', 'association', 'privateIpAddressesSet']
+ 'association', 'privateIpAddressesSet']
def configure(self):
EucalyptusRequest.configure(self)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-eucalyptus/euca2ools.git
More information about the pkg-eucalyptus-commits
mailing list