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

Commit

Permalink
add chef version to layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Monroy committed Jul 25, 2013
1 parent 01df37f commit 8f582f5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ class Layer(UuidAuditedModel):
flavor = models.ForeignKey('Flavor')
nodes = models.PositiveSmallIntegerField(default=0)
# chef settings
chef_version = models.CharField(max_length=32, default='11.4.4')
run_list = models.CharField(max_length=512)
initial_attributes = fields.JSONField(default='{}', blank=True)
environment = models.CharField(max_length=64, default='_default')
Expand Down Expand Up @@ -548,6 +549,8 @@ def _prepare_launch_args(self):
chef['validation_name'] = settings.CHEF_VALIDATION_NAME
chef['validation_key'] = settings.CHEF_VALIDATION_KEY
chef['node_name'] = self.id
if self.layer.chef_version:
chef['version'] = self.layer.chef_version
if self.layer.run_list:
chef['run_list'] = self.layer.run_list.split(',')
if self.layer.initial_attributes:
Expand Down

0 comments on commit 8f582f5

Please sign in to comment.