Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
3e3e5bb4
authored
Mar 16, 2014
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: rearrange methods
parent
db51287a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
circle/vm/models/network.py
+12
-12
No files found.
circle/vm/models/network.py
View file @
3e3e5bb4
...
@@ -93,18 +93,6 @@ class Interface(Model):
...
@@ -93,18 +93,6 @@ class Interface(Model):
'managed'
:
self
.
host
is
not
None
'managed'
:
self
.
host
is
not
None
}
}
def
deploy
(
self
,
user
=
None
,
task_uuid
=
None
):
net_tasks
.
create
.
apply_async
(
args
=
[
self
.
get_vmnetwork_desc
()],
queue
=
self
.
instance
.
get_remote_queue_name
(
'net'
))
def
destroy
(
self
,
delete_host
=
True
,
user
=
None
,
task_uuid
=
None
):
net_tasks
.
destroy
.
apply_async
(
args
=
[
self
.
get_vmnetwork_desc
()],
queue
=
self
.
instance
.
get_remote_queue_name
(
'net'
))
if
delete_host
and
self
.
host
is
not
None
:
self
.
host
.
delete
()
@classmethod
@classmethod
def
create
(
cls
,
instance
,
vlan
,
managed
,
owner
=
None
,
base_activity
=
None
):
def
create
(
cls
,
instance
,
vlan
,
managed
,
owner
=
None
,
base_activity
=
None
):
"""Create a new interface for a VM instance to the specified VLAN.
"""Create a new interface for a VM instance to the specified VLAN.
...
@@ -149,6 +137,18 @@ class Interface(Model):
...
@@ -149,6 +137,18 @@ class Interface(Model):
iface
.
save
()
iface
.
save
()
return
iface
return
iface
def
deploy
(
self
,
user
=
None
,
task_uuid
=
None
):
net_tasks
.
create
.
apply_async
(
args
=
[
self
.
get_vmnetwork_desc
()],
queue
=
self
.
instance
.
get_remote_queue_name
(
'net'
))
def
destroy
(
self
,
delete_host
=
True
,
user
=
None
,
task_uuid
=
None
):
net_tasks
.
destroy
.
apply_async
(
args
=
[
self
.
get_vmnetwork_desc
()],
queue
=
self
.
instance
.
get_remote_queue_name
(
'net'
))
if
delete_host
and
self
.
host
is
not
None
:
self
.
host
.
delete
()
def
save_as_template
(
self
,
instance_template
):
def
save_as_template
(
self
,
instance_template
):
"""Create a template based on this interface.
"""Create a template based on this interface.
"""
"""
...
...
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