Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
d2668593
Commit
d2668593
authored
Oct 12, 2012
by
Christos Stavrakakis
Browse files
Create QuotaHolderSerial table
parent
0dc28e89
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/db/models.py
View file @
d2668593
...
...
@@ -184,6 +184,21 @@ BACKEND_STATUSES = (
)
class
QuotaHolderSerial
(
models
.
Model
):
serial
=
models
.
BigIntegerField
(
null
=
False
,
primary_key
=
True
,
db_index
=
True
)
pending
=
models
.
BooleanField
(
default
=
True
,
db_index
=
True
)
accepted
=
models
.
BooleanField
(
default
=
False
)
rejected
=
models
.
BooleanField
(
default
=
False
)
class
Meta
:
verbose_name
=
u
'Quota Serial'
ordering
=
[
"serial"
]
def
save
(
self
,
*
args
,
**
kwargs
):
self
.
pending
=
not
(
self
.
accepted
or
self
.
rejected
)
super
(
QuotaHolderSerial
,
self
).
save
(
*
args
,
**
kwargs
)
class
VirtualMachine
(
models
.
Model
):
# The list of possible actions for a VM
ACTIONS
=
(
...
...
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