Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
59ffcc20
Commit
59ffcc20
authored
Jun 27, 2012
by
Christos Stavrakakis
Browse files
Add backend method for removing a vm's nic
parent
3c34cd6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/logic/backend.py
View file @
59ffcc20
...
...
@@ -486,6 +486,16 @@ def disconnect_from_network(vm, network):
return
job
def
disconnect_nic_from_vm
(
vm
,
nic
):
"""Remove a NetworkInterface from a VirtualMachine.
"""
op
=
[(
'remove'
,
nic
.
index
,
{})]
return
vm
.
client
.
ModifyInstance
(
vm
.
backend_vm_id
,
nics
=
op
,
hotplug
=
True
,
dry_run
=
settings
.
TEST
)
def
_delete_network
(
network
,
backend_jobs
=
None
):
if
not
backend_jobs
:
backend_jobs
=
[(
backend
,
[])
for
backend
in
...
...
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