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
Commit
d62c2443
authored
Dec 18, 2013
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: move 'lease' field to common base class
parent
58a22093
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
circle/vm/models/instance.py
+2
-5
No files found.
circle/vm/models/instance.py
View file @
d62c2443
...
@@ -20,7 +20,7 @@ from acl.models import AclBase
...
@@ -20,7 +20,7 @@ from acl.models import AclBase
from
storage.models
import
Disk
from
storage.models
import
Disk
from
..tasks
import
local_tasks
,
vm_tasks
from
..tasks
import
local_tasks
,
vm_tasks
from
.activity
import
instance_activity
from
.activity
import
instance_activity
from
.common
import
BaseResourceConfigModel
from
.common
import
BaseResourceConfigModel
,
Lease
from
.network
import
Interface
from
.network
import
Interface
from
.node
import
Node
,
Trait
from
.node
import
Node
,
Trait
...
@@ -62,6 +62,7 @@ class VirtualMachineDescModel(BaseResourceConfigModel):
...
@@ -62,6 +62,7 @@ class VirtualMachineDescModel(BaseResourceConfigModel):
boot_menu
=
BooleanField
(
verbose_name
=
_
(
'boot menu'
),
default
=
False
,
boot_menu
=
BooleanField
(
verbose_name
=
_
(
'boot menu'
),
default
=
False
,
help_text
=
_
(
help_text
=
_
(
'Show boot device selection menu on boot.'
))
'Show boot device selection menu on boot.'
))
lease
=
ForeignKey
(
Lease
,
help_text
=
_
(
"Preferred expiration periods."
))
raw_data
=
TextField
(
verbose_name
=
_
(
'raw_data'
),
blank
=
True
,
help_text
=
_
(
raw_data
=
TextField
(
verbose_name
=
_
(
'raw_data'
),
blank
=
True
,
help_text
=
_
(
'Additional libvirt domain parameters in XML format.'
))
'Additional libvirt domain parameters in XML format.'
))
req_traits
=
ManyToManyField
(
Trait
,
blank
=
True
,
req_traits
=
ManyToManyField
(
Trait
,
blank
=
True
,
...
@@ -110,9 +111,6 @@ class InstanceTemplate(VirtualMachineDescModel, TimeStampedModel):
...
@@ -110,9 +111,6 @@ class InstanceTemplate(VirtualMachineDescModel, TimeStampedModel):
disks
=
ManyToManyField
(
Disk
,
verbose_name
=
_
(
'disks'
),
disks
=
ManyToManyField
(
Disk
,
verbose_name
=
_
(
'disks'
),
related_name
=
'template_set'
,
related_name
=
'template_set'
,
help_text
=
_
(
'Disks which are to be mounted.'
))
help_text
=
_
(
'Disks which are to be mounted.'
))
lease
=
ForeignKey
(
'Lease'
,
related_name
=
'template_set'
,
verbose_name
=
_
(
'lease'
),
help_text
=
_
(
'Expiration times.'
))
class
Meta
:
class
Meta
:
app_label
=
'vm'
app_label
=
'vm'
...
@@ -200,7 +198,6 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
...
@@ -200,7 +198,6 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
disks
=
ManyToManyField
(
Disk
,
related_name
=
'instance_set'
,
disks
=
ManyToManyField
(
Disk
,
related_name
=
'instance_set'
,
help_text
=
_
(
"Set of mounted disks."
),
help_text
=
_
(
"Set of mounted disks."
),
verbose_name
=
_
(
'disks'
))
verbose_name
=
_
(
'disks'
))
lease
=
ForeignKey
(
'Lease'
,
help_text
=
_
(
"Preferred expiration periods."
))
vnc_port
=
IntegerField
(
blank
=
True
,
default
=
None
,
null
=
True
,
vnc_port
=
IntegerField
(
blank
=
True
,
default
=
None
,
null
=
True
,
help_text
=
_
(
"TCP port where VNC console listens."
),
help_text
=
_
(
"TCP port where VNC console listens."
),
unique
=
True
,
verbose_name
=
_
(
'vnc_port'
))
unique
=
True
,
verbose_name
=
_
(
'vnc_port'
))
...
...
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