示例#1
0
    def __init__(self, openstack_compatible=True):
        LOG.info("Virtman: start to create a Virtman Compute_node")
        self.openstack_compatible = openstack_compatible
        self.images = {}
        self.instance_names = {}
        self.lock = threading.Lock()
        self.image_type = self.get_image_type(openstack_compatible)

        if not fcg.is_valid():
            fcg.create_group()

        self.heartbeat_event = threading.Event()
        self.heartbeat_thread = threading.Thread(target=self.heartbeat_clock)
        self.heartbeat_thread.daemon = True
        # self.heartbeat_thread.start()
        LOG.info("Virtman: create a Virtman Compute_node completed")
示例#2
0
    def __init__(self, openstack_compatible=True):
        LOG.info("Virtman: start to create a Virtman Compute_node")
        self.openstack_compatible = openstack_compatible
        self.images = {}
        self.instance_names = {}
        self.lock = threading.Lock()

        if self.openstack_compatible:
            config_files = ['/etc/nova/nova.conf', '/etc/virtman/virtman.conf']
        else:
            config_files = ['/etc/virtman/virtman.conf']
        CONF(sys.argv[1:], project='virtman', default_config_files=config_files)

        logging.setup('virtman')
        if not fcg.is_valid():
            fcg.create_group()

        self.heartbeat_event = threading.Event()
        self.heartbeat_thread = threading.Thread(target=self.heartbeat_clock)
        self.heartbeat_thread.daemon = True
        self.heartbeat_thread.start()
        LOG.info("Virtman: create a Virtman Compute_node completed")