Extract instance ids from the instance objects returned by boto.
This commit is contained in:
parent
2d7e844753
commit
1d68594dc2
1 changed files with 3 additions and 3 deletions
|
@ -118,12 +118,12 @@ class EC2Executor(BuilderExecutor):
|
|||
elif len(reservation.instances) != 1:
|
||||
raise ExecutorException('EC2 started wrong number of instances!')
|
||||
|
||||
return reservation.instances[0]
|
||||
return reservation.instances[0].id
|
||||
|
||||
def stop_builder(self, builder_id):
|
||||
ec2_conn = self._get_conn()
|
||||
stopped_instances = ec2_conn.stop_instances([builder_id], force=True)
|
||||
if builder_id not in stopped_instances:
|
||||
stopped_instance_ids = [si.id for si in ec2_conn.stop_instances([builder_id], force=True)]
|
||||
if builder_id not in stopped_instance_ids:
|
||||
raise ExecutorException('Unable to stop instance: %s' % builder_id)
|
||||
|
||||
class PopenExecutor(BuilderExecutor):
|
||||
|
|
Reference in a new issue