Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8b31f066
authored
Sep 11, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: add Instance*.has_agent attribute
parent
7ab98d6f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
circle/vm/migrations/0027_auto__add_field_instance_has_agent__add_field_instancetemplate_has_age.py
+0
-0
circle/vm/models/instance.py
+6
-1
No files found.
circle/vm/migrations/0027_auto__add_field_instance_has_agent__add_field_instancetemplate_has_age.py
0 → 100644
View file @
8b31f066
This diff is collapsed.
Click to expand it.
circle/vm/models/instance.py
View file @
8b31f066
...
@@ -123,6 +123,10 @@ class VirtualMachineDescModel(BaseResourceConfigModel):
...
@@ -123,6 +123,10 @@ class VirtualMachineDescModel(BaseResourceConfigModel):
'format like "
%
s".'
)
%
'format like "
%
s".'
)
%
'Ubuntu 12.04 LTS Desktop amd64'
))
'Ubuntu 12.04 LTS Desktop amd64'
))
tags
=
TaggableManager
(
blank
=
True
,
verbose_name
=
_
(
"tags"
))
tags
=
TaggableManager
(
blank
=
True
,
verbose_name
=
_
(
"tags"
))
has_agent
=
BooleanField
(
verbose_name
=
_
(
'has agent'
),
default
=
True
,
help_text
=
_
(
'If the machine has agent installed, and '
'the manager should wait for its start.'
))
class
Meta
:
class
Meta
:
abstract
=
True
abstract
=
True
...
@@ -424,7 +428,8 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
...
@@ -424,7 +428,8 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
# prepare parameters
# prepare parameters
common_fields
=
[
'name'
,
'description'
,
'num_cores'
,
'ram_size'
,
common_fields
=
[
'name'
,
'description'
,
'num_cores'
,
'ram_size'
,
'max_ram_size'
,
'arch'
,
'priority'
,
'boot_menu'
,
'max_ram_size'
,
'arch'
,
'priority'
,
'boot_menu'
,
'raw_data'
,
'lease'
,
'access_method'
,
'system'
]
'raw_data'
,
'lease'
,
'access_method'
,
'system'
,
'has_agent'
]
params
=
dict
(
template
=
template
,
owner
=
owner
,
pw
=
pwgen
())
params
=
dict
(
template
=
template
,
owner
=
owner
,
pw
=
pwgen
())
params
.
update
([(
f
,
getattr
(
template
,
f
))
for
f
in
common_fields
])
params
.
update
([(
f
,
getattr
(
template
,
f
))
for
f
in
common_fields
])
params
.
update
(
kwargs
)
# override defaults w/ user supplied values
params
.
update
(
kwargs
)
# override defaults w/ user supplied values
...
...
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