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

Side by Side Diff: third_party/gsutil/boto/emr/instance_group.py

Issue 12042069: Scripts to download files from google storage based on sha1 sums (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Removed gsutil/tests and gsutil/docs Created 7 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 #
2 # Permission is hereby granted, free of charge, to any person obtaining a
3 # copy of this software and associated documentation files (the
4 # "Software"), to deal in the Software without restriction, including
5 # without limitation the rights to use, copy, modify, merge, publish, dis-
6 # tribute, sublicense, and/or sell copies of the Software, and to permit
7 # persons to whom the Software is furnished to do so, subject to the fol-
8 # lowing conditions:
9 #
10 # The above copyright notice and this permission notice shall be included
11 # in all copies or substantial portions of the Software.
12 #
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
15 # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
16 # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 # IN THE SOFTWARE.
20
21
22 class InstanceGroup(object):
23 def __init__(self, num_instances, role, type, market, name, bidprice=None):
24 self.num_instances = num_instances
25 self.role = role
26 self.type = type
27 self.market = market
28 self.name = name
29 if market == 'SPOT':
30 if not isinstance(bidprice, basestring):
31 raise ValueError('bidprice must be specified if market == SPOT')
32 self.bidprice = bidprice
33
34 def __repr__(self):
35 if self.market == 'SPOT':
36 return '%s.%s(name=%r, num_instances=%r, role=%r, type=%r, market = %r, bidprice = %r)' % (
37 self.__class__.__module__, self.__class__.__name__,
38 self.name, self.num_instances, self.role, self.type, self.market ,
39 self.bidprice)
40 else:
41 return '%s.%s(name=%r, num_instances=%r, role=%r, type=%r, market = %r)' % (
42 self.__class__.__module__, self.__class__.__name__,
43 self.name, self.num_instances, self.role, self.type, self.market )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698