Commit 6fbd63b8 by Guba Sándor

netcelery: added native_ovs configration variable

parent 0182954b
......@@ -24,6 +24,13 @@ def to_bool(value):
return value.lower() in ("true", "yes", "y", "t")
lib_connection = None
native_ovs = False
if to_bool(getenv('LIBVIRT_KEEPALIVE', "False")):
import libvirt
lib_connection = libvirt.open(getenv('LIBVIRT_URI'))
if to_bool(getenv('NATIVE_OVS', "False")):
native_ovs = True
celery = Celery('netcelery',
broker=AMQP_URI,
......@@ -38,7 +45,3 @@ celery.conf.update(
'netdriver', type='direct'), routing_key="netdriver"),
)
)
if to_bool(getenv('LIBVIRT_KEEPALIVE', "False")):
import libvirt
lib_connection = libvirt.open(getenv('LIBVIRT_URI'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment