def create_fake_nodestack(tdir, tconf, registry, name='Node1'):
    def msgHandler(msg):
        pass

    stackParams = {"name": name, "ha": genHa(), "auto": 2, "basedirpath": tdir}
    stack = nodeStackClass(stackParams,
                           msgHandler,
                           registry,
                           randomString(32),
                           config=tconf)
    return stack
def create_fake_nodestack(tdir, tconf, registry, name='Node1'):
    def msgHandler(msg):
        pass

    stackParams = {
        "name": name,
        "ha": genHa(),
        "auto": 2,
        "basedirpath": tdir
    }
    stack = nodeStackClass(stackParams, msgHandler, registry, randomString(32), config=tconf)
    return stack
Beispiel #3
0
 def create_stack(count):
     genKeys(tdir, registry.keys())
     stacks = []
     for name, ha in registry.items():
         printer = Printer(name)
         stackParams = dict(name=name,
                            ha=ha,
                            basedirpath=tdir,
                            auth_mode=AuthMode.RESTRICTED.value)
         reg = copy(registry)
         reg.pop(name)
         stack = nodeStackClass(stackParams, printer.print, reg)
         stack.start()
         stacks.append(stack)
         if len(stacks) == count:
             break
     return stacks