Revision a9bb2a1a

b/snf-cyclades-app/synnefo/logic/reconciliation.py
357 357
    """
358 358
    def get_network_groups(group_list):
359 359
        groups = set()
360
        for g in group_list:
361
            g_name = g.split('(')[0]
362
            groups.add(g_name)
360
        for (name, mode, link) in group_list:
361
            groups.add(name)
363 362
        return groups
364 363

  
365 364
    with pooled_rapi_client(backend) as c:
b/snf-cyclades-gtools/synnefo/ganeti/eventd.py
56 56
from signal import signal, SIGINT, SIGTERM
57 57
import setproctitle
58 58

  
59
from ganeti import utils, jqueue, constants, serializer, cli
59
from ganeti import utils, jqueue, constants, serializer, pathutils, cli
60 60
from ganeti import errors as ganeti_errors
61
from ganeti.ssconf import SimpleConfigReader
61
from ganeti.ssconf import SimpleStore
62 62

  
63 63

  
64 64
from synnefo import settings
......
207 207
            return
208 208

  
209 209
        data = serializer.LoadJson(data)
210
        try:  # Compatibility with Ganeti version
211
            job = jqueue._QueuedJob.Restore(None, data, False)
212
        except TypeError:
213
            job = jqueue._QueuedJob.Restore(None, data)
210
        job = jqueue._QueuedJob.Restore(None, data, False, False)
214 211

  
215 212
        job_id = int(job.id)
216 213

  
......
351 348
def find_cluster_name():
352 349
    global handler_logger
353 350
    try:
354
        scr = SimpleConfigReader()
355
        name = scr.GetClusterName()
351
        ss = SimpleStore()
352
        name = ss.GetClusterName()
356 353
    except Exception as e:
357 354
        handler_logger.error('Can not get the name of the Cluster: %s' % e)
358 355
        raise e
......
457 454

  
458 455
    try:
459 456
        # Fail if adding the inotify() watch fails for any reason
460
        res = wm.add_watch(constants.QUEUE_DIR, mask)
461
        if res[constants.QUEUE_DIR] < 0:
457
        res = wm.add_watch(pathutils.QUEUE_DIR, mask)
458
        if res[pathutils.QUEUE_DIR] < 0:
462 459
            raise Exception("pyinotify add_watch returned negative descriptor")
463 460

  
464
        logger.info("Now watching %s of %s" %
465
                    (constants.QUEUE_DIR, cluster_name))
461
        logger.info("Now watching %s of %s" % (pathutils.QUEUE_DIR,
462
                    cluster_name))
466 463

  
467 464
        while True:    # loop forever
468 465
            # process the queue of events as explained above

Also available in: Unified diff