Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ececb093
authored
Jul 31, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: basic min value for resources
parent
a3b1220c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
circle/vm/models/common.py
+9
-4
No files found.
circle/vm/models/common.py
View file @
ececb093
...
...
@@ -18,6 +18,7 @@
from
__future__
import
absolute_import
,
unicode_literals
from
datetime
import
timedelta
,
datetime
from
django.core.validators
import
MinValueValidator
from
django.db.models
import
Model
,
CharField
,
IntegerField
,
permalink
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.utils.timesince
import
timeuntil
...
...
@@ -37,16 +38,20 @@ class BaseResourceConfigModel(Model):
"""
num_cores
=
IntegerField
(
verbose_name
=
_
(
'number of cores'
),
help_text
=
_
(
'Number of virtual CPU cores '
'available to the virtual machine.'
))
'available to the virtual machine.'
),
validators
=
[
MinValueValidator
(
0
)])
ram_size
=
IntegerField
(
verbose_name
=
_
(
'RAM size'
),
help_text
=
_
(
'Mebibytes of memory.'
))
help_text
=
_
(
'Mebibytes of memory.'
),
validators
=
[
MinValueValidator
(
0
)])
max_ram_size
=
IntegerField
(
verbose_name
=
_
(
'maximal RAM size'
),
help_text
=
_
(
'Upper memory size limit '
'for balloning.'
))
'for balloning.'
),
validators
=
[
MinValueValidator
(
0
)])
arch
=
CharField
(
max_length
=
10
,
verbose_name
=
_
(
'architecture'
),
choices
=
ARCHITECTURES
)
priority
=
IntegerField
(
verbose_name
=
_
(
'priority'
),
help_text
=
_
(
'CPU priority.'
))
help_text
=
_
(
'CPU priority.'
),
validators
=
[
MinValueValidator
(
0
)])
class
Meta
:
abstract
=
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