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

Unified Diff: boto/ec2/autoscale/scheduled.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/policy.py ('k') | boto/ec2/autoscale/trigger.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: boto/ec2/autoscale/scheduled.py
diff --git a/boto/ec2/autoscale/instance.py b/boto/ec2/autoscale/scheduled.py
similarity index 57%
copy from boto/ec2/autoscale/instance.py
copy to boto/ec2/autoscale/scheduled.py
index ffdd5b18e786881dda981a743b1f3de6bfbca5bd..d8f051c19a1cb9cb6110d7a3afd191ba0110beeb 100644
--- a/boto/ec2/autoscale/instance.py
+++ b/boto/ec2/autoscale/scheduled.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 Reza Lotun http://reza.lotun.name/
+# Copyright (c) 2009-2010 Reza Lotun http://reza.lotun.name/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
@@ -20,27 +20,41 @@
# IN THE SOFTWARE.
-class Instance(object):
+from datetime import datetime
+
+
+class ScheduledUpdateGroupAction(object):
def __init__(self, connection=None):
self.connection = connection
- self.instance_id = ''
- self.lifecycle_state = None
- self.availability_zone = ''
+ self.name = None
+ self.action_arn = None
+ self.time = None
+ self.desired_capacity = None
+ self.max_size = None
+ self.min_size = None
def __repr__(self):
- return 'Instance:%s' % self.instance_id
+ return 'ScheduledUpdateGroupAction:%s' % self.name
def startElement(self, name, attrs, connection):
return None
def endElement(self, name, value, connection):
- if name == 'InstanceId':
- self.instance_id = value
- elif name == 'LifecycleState':
- self.lifecycle_state = value
- elif name == 'AvailabilityZone':
- self.availability_zone = value
+ if name == 'DesiredCapacity':
+ self.desired_capacity = value
+ elif name == 'ScheduledActionName':
+ self.name = value
+ elif name == 'MaxSize':
+ self.max_size = int(value)
+ elif name == 'MinSize':
+ self.min_size = int(value)
+ elif name == 'ScheduledActionARN':
+ self.action_arn = value
+ elif name == 'Time':
+ try:
+ self.time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ')
+ except ValueError:
+ self.time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')
else:
setattr(self, name, value)
-
« no previous file with comments | « boto/ec2/autoscale/policy.py ('k') | boto/ec2/autoscale/trigger.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698