Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-node
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
cc-node
Commits
a16b7ca6
Commit
a16b7ca6
authored
9 years ago
by
Antoine Millet
Browse files
Options
Downloads
Patches
Plain Diff
Reworked vm_define to handle other formats
parent
d2fe2d66
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cloudcontrol/node/hypervisor/__init__.py
+4
-3
4 additions, 3 deletions
cloudcontrol/node/hypervisor/__init__.py
cloudcontrol/node/hypervisor/kvm.py
+1
-1
1 addition, 1 deletion
cloudcontrol/node/hypervisor/kvm.py
with
5 additions
and
4 deletions
cloudcontrol/node/hypervisor/__init__.py
+
4
−
3
View file @
a16b7ca6
...
...
@@ -199,10 +199,11 @@ class Handler(HostHandler):
@libvirt_handler
def
vm_define
(
self
,
data
,
format
=
'
xml
'
):
logger
.
debug
(
'
VM define
'
)
if
format
!=
'
xml
'
:
raise
NotImplementedError
(
'
Format not supported
'
)
return
self
.
hypervisor
.
vm_define
(
data
)
if
format
==
'
xml
'
:
return
self
.
hypervisor
.
vm_define
(
data
)
else
:
raise
NotImplementedError
(
'
Format not supported
'
)
@libvirt_handler
def
vm_undefine
(
self
,
name
):
...
...
This diff is collapsed.
Click to expand it.
cloudcontrol/node/hypervisor/kvm.py
+
1
−
1
View file @
a16b7ca6
...
...
@@ -210,7 +210,7 @@ class KVM(object):
:return: VM name created
"""
try
:
return
self
.
vir_con
.
defineXML
(
xml_desc
).
name
()
return
self
.
vir_con
.
defineXML
(
xml_desc
).
UUIDString
()
except
libvirt
.
libvirtError
:
logger
.
exception
(
'
Error while creating domain
'
)
# reraise exception for the cc-server
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment