Permalink
Browse files

local tests passed. issues with ec2 still need to be ironed out.

  • Loading branch information...
1 parent f625ce6 commit 9d00c19ba3385f6e2b1ec9f2835a6ca36d88299a BuzzTroll committed Mar 10, 2011
Showing with 16 additions and 10 deletions.
  1. +1 −1 cloudinitd/bootfabtasks.py
  2. +15 −9 cloudinitd/cb_iaas.py
View
2 cloudinitd/bootfabtasks.py
@@ -72,5 +72,5 @@ def bootpgm(pgm=None, conf=None, output=None):
pass
def fetch_conf(output=None):
- remote_output = "%s/bootout.json" % REMOTE_WORKING_DIR
+ remote_output = "%s/bootout.json" % (REMOTE_WORKING_DIR)
get(remote_output, output)
View
24 cloudinitd/cb_iaas.py
@@ -81,7 +81,12 @@ def __init__(self, con):
self._con = con
def get_all_instances(self, instance_ids=None):
- pass
+ nodes = conn.list_nodes()
+ if instance_ids:
+ nodes = [IaaSLibCloudInstance(n) for n in nodes if n.name in instance_ids]
+ else:
+ nodes = [IaaSLibCloudInstance(n) for n in nodes]
+ return nodes
# name String with a name for this new node (required) (type: str )#
#size The size of resources allocated to this node. (required) (type: NodeSize )
#image OS Image to boot on node. (required) (type: NodeImage )
@@ -92,7 +97,8 @@ def run_instance(self, image, instance_type, key_name, security_groupname=None):
pass
def find_instance(self, instance_id):
- pass
+ i_a = self.get_all_instances([instance_id,])
+ return i_a[0]
class IaaSTestInstance(object):
@@ -156,23 +162,23 @@ def get_id(self):
class IaaSLibCloudInstance(object):
- def __init__(self, instance):
- self._instance = instance
+ def __init__(self, node):
+ self._node = node
def terminate(self):
- return self._instance.terminate()
+ pass
def update(self):
- return self._instance.update()
+ pass
def get_hostname(self):
- return self._instance.public_dns_name
+ pass
def get_state(self):
- return self._instance.state
+ pass
def get_id(self):
- return self._instance.id
+ pass
def iaas_get_con(key, secret, iaashostname=None, iaasport=None, iaas="us-east-1"):

0 comments on commit 9d00c19

Please sign in to comment.