Permalink
Browse files

Clusters now know what intance type they contain

  • Loading branch information...
1 parent aaa3277 commit d74a4ded1891b1f89475b5040ccb509cec69cf3b @mnielsen committed Jul 6, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 ec2.py
View
@@ -138,8 +138,9 @@ class Cluster():
structures used to represent clusters.
"""
- def __init__(self, cluster_name, boto_instances):
+ def __init__(self, cluster_name, instance_type, boto_instances):
self.cluster_name = cluster_name
+ self.instance_type = instance_type
self.instances = [Instance(boto_instance)
for boto_instance in boto_instances]
@@ -201,7 +202,8 @@ def create(cluster_name, n, instance_type):
time.sleep(1)
time.sleep(120) # Give the ssh daemon time to start
# Update clusters
- clusters[cluster_name] = Cluster(cluster_name, reservation.instances)
+ clusters[cluster_name] = Cluster(
+ cluster_name, instance_type, reservation.instances)
clusters.close()
def show_all():

0 comments on commit d74a4de

Please sign in to comment.