Commit e157378d authored by Antoine Millet's avatar Antoine Millet

Implemented vir_uri tag

parent f8545d4f
......@@ -14,6 +14,7 @@
# along with CloudControl. If not, see <http://www.gnu.org/licenses/>.
import socket
import logging
import logging.config
from StringIO import StringIO
......@@ -103,6 +104,10 @@ class NodeConfigParser(object):
self.plugins_store_path = config.get('node', 'plugins_store_path',
'/var/lib/cc-node/plugins')
# Libvirt URI to export to cc-server (vir_uri tag)
default_libvirt_uri = 'qemu+tcp://%s/system' % socket.gethostbyname(socket.gethostname())
self.libvirt_uri = config.get('node', 'libvirt_uri', default_libvirt_uri)
# Path to define script
default_define_script = 'hkvm-define'
self.define_script = config.get('node', 'define_script', default_define_script)
......
......@@ -60,6 +60,10 @@ def vir_status(handl):
return {True: 'connected', False: 'disconnected'}[handl.virt_connected]
def vir_uri(handl):
return handl.main.config.libvirt_uri
# hypervisor related tags
def htype():
"""Hypervisor type."""
......
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 to comment