Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
d23686e0
authored
Feb 08, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one: add Instance.state field
parent
19ec0a15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
one/migrations/0006_auto__add_field_template_state.py
+0
-0
one/models.py
+3
-0
No files found.
one/migrations/0006_auto__add_field_template_state.py
0 → 100644
View file @
d23686e0
This diff is collapsed.
Click to expand it.
one/models.py
View file @
d23686e0
...
...
@@ -223,6 +223,8 @@ class InstanceType(models.Model):
def
__unicode__
(
self
):
return
u"
%
s"
%
self
.
name
TEMPLATE_STATES
=
((
'NEW'
,
_
(
'new'
)),
(
'PREPARING'
,
_
(
'preparing'
)),
(
'SAVING'
,
_
(
'saving'
)),
(
'READY'
,
_
(
'ready'
)),
)
"""
Virtual machine template specifying OS, disk, type and network.
"""
...
...
@@ -237,6 +239,7 @@ class Template(models.Model):
network
=
models
.
ForeignKey
(
Network
,
verbose_name
=
_
(
'network'
))
owner
=
models
.
ForeignKey
(
User
,
verbose_name
=
_
(
'owner'
))
created_at
=
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
_
(
'created at'
))
state
=
models
.
CharField
(
max_length
=
10
,
choices
=
TEMPLATE_STATES
,
default
=
'NEW'
)
def
__unicode__
(
self
):
return
self
.
name
...
...
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