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
b096549f
authored
Nov 15, 2012
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new model: instance type
parent
c00121c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
one/models.py
+9
-1
No files found.
one/models.py
View file @
b096549f
...
...
@@ -151,13 +151,21 @@ class Network(models.Model):
class
Meta
:
ordering
=
[
'name'
]
class
InstanceType
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
100
,
unique
=
True
,
verbose_name
=
_
(
'name'
))
CPU
=
models
.
IntegerField
()
RAM
=
models
.
IntegerField
()
def
__unicode__
(
self
):
return
u"
%
s"
%
self
.
name
class
Template
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
100
,
unique
=
True
,
verbose_name
=
_
(
'név'
))
access_type
=
models
.
CharField
(
max_length
=
10
,
choices
=
[(
'rdp'
,
'rdp'
),
(
'nx'
,
'nx'
),
(
'ssh'
,
'ssh'
)])
disk
=
models
.
ForeignKey
(
Disk
)
instance_type
=
models
.
CharField
(
max_length
=
20
,
choices
=
[(
'small'
,
'small'
),
(
'medium'
,
'medium'
),
(
'large'
,
'large'
)]
)
instance_type
=
models
.
ForeignKey
(
InstanceType
)
network
=
models
.
ForeignKey
(
Network
)
owner
=
models
.
ForeignKey
(
User
)
created_at
=
models
.
DateTimeField
(
auto_now_add
=
True
)
...
...
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