Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
547d0617
authored
Mar 24, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vmdriver: fixed libvirt connection
parent
cba932e8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vmdriver.py
+2
-2
No files found.
vmdriver.py
View file @
547d0617
...
@@ -13,7 +13,7 @@ from psutil import NUM_CPUS, virtual_memory, cpu_percent
...
@@ -13,7 +13,7 @@ from psutil import NUM_CPUS, virtual_memory, cpu_percent
from
celery.contrib.abortable
import
AbortableTask
from
celery.contrib.abortable
import
AbortableTask
from
vm
import
VMInstance
from
vm
import
VMInstance
from
vmcelery
import
celery
,
lib_connection
from
vmcelery
import
celery
,
lib_connection
,
to_bool
sys
.
path
.
append
(
os
.
path
.
dirname
(
os
.
path
.
basename
(
__file__
)))
sys
.
path
.
append
(
os
.
path
.
dirname
(
os
.
path
.
basename
(
__file__
)))
...
@@ -118,7 +118,7 @@ def connect(connection_string='qemu:///system'):
...
@@ -118,7 +118,7 @@ def connect(connection_string='qemu:///system'):
the default is the local root.
the default is the local root.
"""
"""
if
os
.
getenv
(
'LIBVIRT_KEEPALIVE'
)
is
None
:
if
not
to_bool
(
os
.
getenv
(
'LIBVIRT_KEEPALIVE'
,
"False"
))
:
if
Connection
.
get
()
is
None
:
if
Connection
.
get
()
is
None
:
Connection
.
set
(
libvirt
.
open
(
connection_string
))
Connection
.
set
(
libvirt
.
open
(
connection_string
))
logging
.
debug
(
"Connection estabilished to libvirt."
)
logging
.
debug
(
"Connection estabilished to libvirt."
)
...
...
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