Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: boto/ec2/autoscale/instance.py

Issue 8386013: Merging in latest boto. (Closed) Base URL: svn://svn.chromium.org/boto
Patch Set: Redoing vendor drop by deleting and then merging. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « boto/ec2/autoscale/group.py ('k') | boto/ec2/autoscale/launchconfig.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: boto/ec2/autoscale/instance.py
diff --git a/boto/ec2/autoscale/instance.py b/boto/ec2/autoscale/instance.py
index ffdd5b18e786881dda981a743b1f3de6bfbca5bd..6eb89c2c314f5c77b27e75dcaabe778d9c225278 100644
--- a/boto/ec2/autoscale/instance.py
+++ b/boto/ec2/autoscale/instance.py
@@ -23,12 +23,21 @@
class Instance(object):
def __init__(self, connection=None):
self.connection = connection
- self.instance_id = ''
+ self.instance_id = None
+ self.health_status = None
+ self.launch_config_name = None
self.lifecycle_state = None
- self.availability_zone = ''
+ self.availability_zone = None
+ self.group_name = None
def __repr__(self):
- return 'Instance:%s' % self.instance_id
+ r = 'Instance<id:%s, state:%s, health:%s' % (self.instance_id,
+ self.lifecycle_state,
+ self.health_status)
+ if self.group_name:
+ r += ' group:%s' % self.group_name
+ r += '>'
+ return r
def startElement(self, name, attrs, connection):
return None
@@ -36,11 +45,16 @@ class Instance(object):
def endElement(self, name, value, connection):
if name == 'InstanceId':
self.instance_id = value
+ elif name == 'HealthStatus':
+ self.health_status = value
+ elif name == 'LaunchConfigurationName':
+ self.launch_config_name = value
elif name == 'LifecycleState':
self.lifecycle_state = value
elif name == 'AvailabilityZone':
self.availability_zone = value
+ elif name == 'AutoScalingGroupName':
+ self.group_name = value
else:
setattr(self, name, value)
-
« no previous file with comments | « boto/ec2/autoscale/group.py ('k') | boto/ec2/autoscale/launchconfig.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698