Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalBackend
Commits
ca506c71
Commit
ca506c71
authored
Oct 29, 2018
by
Lukas Burgey
Browse files
Add CredentialState
This to enable the individual key handling needed for
#7
.
parent
c94891f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
feudal/backend/models/__init__.py
View file @
ca506c71
...
...
@@ -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
,
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment