Commit ca506c71 authored by Lukas Burgey's avatar Lukas Burgey

Add CredentialState

This to enable the individual key handling needed for #7.
parent c94891f4
......@@ -552,3 +552,32 @@ class NewDeploymentStateItem(models.Model):
self.site,
self.id,
)
class CredentialState(models.Model):
DEPLOYED = 'deployed'
NOT_DEPLOYED = 'not_deployed'
STATE_CHOICES = (
(DEPLOYED, 'Deployed'),
(NOT_DEPLOYED, 'Not deployed'),
)
state = models.CharField(
max_length=50,
choices=STATE_CHOICES,
default=NOT_DEPLOYED
)
credential = models.ForeignKey(
SSHPublicKey,
related_name='credential_states',
on_delete=models.SET_NULL,
null=True
)
target = models.ForeignKey(
NewDeploymentStateItem,
related_name='credential_states',
on_delete=models.CASCADE,
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment