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

Unified Diff: boto/emr/instance_group.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/emr/emrobject.py ('k') | boto/emr/step.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: boto/emr/instance_group.py
diff --git a/boto/emr/bootstrap_action.py b/boto/emr/instance_group.py
similarity index 52%
copy from boto/emr/bootstrap_action.py
copy to boto/emr/instance_group.py
index c1c90387f709ecf5244230bc8706e46bbe854268..be229510f6cc3d43bce8dd302fcfc9d80977e47c 100644
--- a/boto/emr/bootstrap_action.py
+++ b/boto/emr/instance_group.py
@@ -1,4 +1,3 @@
-# Copyright (c) 2010 Spotify AB
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
@@ -19,25 +18,26 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-class BootstrapAction(object):
- def __init__(self, name, path, bootstrap_action_args):
- self.name = name
- self.path = path
-
- if isinstance(bootstrap_action_args, basestring):
- bootstrap_action_args = [bootstrap_action_args]
-
- self.bootstrap_action_args = bootstrap_action_args
- def args(self):
- args = []
-
- if self.bootstrap_action_args:
- args.extend(self.bootstrap_action_args)
-
- return args
+class InstanceGroup(object):
+ def __init__(self, num_instances, role, type, market, name, bidprice=None):
+ self.num_instances = num_instances
+ self.role = role
+ self.type = type
+ self.market = market
+ self.name = name
+ if market == 'SPOT':
+ if not isinstance(bidprice, basestring):
+ raise ValueError('bidprice must be specified if market == SPOT')
+ self.bidprice = bidprice
def __repr__(self):
- return '%s.%s(name=%r, path=%r, bootstrap_action_args=%r)' % (
- self.__class__.__module__, self.__class__.__name__,
- self.name, self.path, self.bootstrap_action_args)
+ if self.market == 'SPOT':
+ return '%s.%s(name=%r, num_instances=%r, role=%r, type=%r, market = %r, bidprice = %r)' % (
+ self.__class__.__module__, self.__class__.__name__,
+ self.name, self.num_instances, self.role, self.type, self.market,
+ self.bidprice)
+ else:
+ return '%s.%s(name=%r, num_instances=%r, role=%r, type=%r, market = %r)' % (
+ self.__class__.__module__, self.__class__.__name__,
+ self.name, self.num_instances, self.role, self.type, self.market)
« no previous file with comments | « boto/emr/emrobject.py ('k') | boto/emr/step.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698