Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
include formation name in layer infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Monroy committed Jul 25, 2013
1 parent b11c9f0 commit 483b4d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@ def __str__(self):

def build(self, *args, **kwargs):
tasks = import_tasks(self.flavor.provider.type)
args = (self.id, self.flavor.provider.creds.copy(),
name = "{0}-{1}".format(self.formation.id, self.id)
args = (name, self.flavor.provider.creds.copy(),
self.flavor.params.copy())
return tasks.build_layer.subtask(args)

Expand All @@ -473,7 +474,8 @@ def destroy(self):
job = group(*subtasks)
job.apply_async().join() # block for termination
# purge other hosting provider infrastructure
tasks.destroy_layer.delay(self.id,
name = "{0}-{1}".format(self.formation.id, self.id)
tasks.destroy_layer.delay(name,
self.flavor.provider.creds.copy(),
self.flavor.params.copy()).wait() # block

Expand Down

0 comments on commit 483b4d2

Please sign in to comment.