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
37d4f294
authored
Apr 17, 2014
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: remove 'destroyed' property from network interfaces
parent
9e5265b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
21 deletions
+0
-21
circle/vm/models/network.py
+0
-21
No files found.
circle/vm/models/network.py
View file @
37d4f294
...
@@ -58,10 +58,6 @@ class Interface(Model):
...
@@ -58,10 +58,6 @@ class Interface(Model):
return
'cloud-'
+
str
(
self
.
instance
.
id
)
+
'-'
+
str
(
self
.
vlan
.
vid
)
return
'cloud-'
+
str
(
self
.
instance
.
id
)
+
'-'
+
str
(
self
.
vlan
.
vid
)
@property
@property
def
destroyed
(
self
):
return
self
.
instance
.
destroyed_at
@property
def
mac
(
self
):
def
mac
(
self
):
try
:
try
:
return
self
.
host
.
mac
return
self
.
host
.
mac
...
@@ -138,33 +134,16 @@ class Interface(Model):
...
@@ -138,33 +134,16 @@ class Interface(Model):
return
iface
return
iface
def
deploy
(
self
):
def
deploy
(
self
):
if
self
.
destroyed
:
from
.instance
import
Instance
raise
Instance
.
InstanceDestroyedError
(
self
.
instance
,
"The associated instance "
"(
%
s) has already been "
"destroyed"
%
self
.
instance
)
net_tasks
.
create
.
apply_async
(
net_tasks
.
create
.
apply_async
(
args
=
[
self
.
get_vmnetwork_desc
()],
args
=
[
self
.
get_vmnetwork_desc
()],
queue
=
self
.
instance
.
get_remote_queue_name
(
'net'
))
queue
=
self
.
instance
.
get_remote_queue_name
(
'net'
))
def
shutdown
(
self
):
def
shutdown
(
self
):
if
self
.
destroyed
:
from
.instance
import
Instance
raise
Instance
.
InstanceDestroyedError
(
self
.
instance
,
"The associated instance "
"(
%
s) has already been "
"destroyed"
%
self
.
instance
)
queue_name
=
self
.
instance
.
get_remote_queue_name
(
'net'
)
queue_name
=
self
.
instance
.
get_remote_queue_name
(
'net'
)
net_tasks
.
destroy
.
apply_async
(
args
=
[
self
.
get_vmnetwork_desc
()],
net_tasks
.
destroy
.
apply_async
(
args
=
[
self
.
get_vmnetwork_desc
()],
queue
=
queue_name
)
queue
=
queue_name
)
def
destroy
(
self
):
def
destroy
(
self
):
if
self
.
destroyed
:
return
self
.
shutdown
()
self
.
shutdown
()
if
self
.
host
is
not
None
:
if
self
.
host
is
not
None
:
self
.
host
.
delete
()
self
.
host
.
delete
()
...
...
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