예제 #1
0
        container.checkStatus(full=False)
        print(INFO("Adding fingerprint to ssh known_hosts "))
        container.checkSSH()

if __name__ == "__main__":
    args = parseArgs()
    c = parseConfig(configFile)
    image = Image(c.image, c.path)
    paths = Paths(c.path)
    if args.o == "status":
        Network(c.bridge, c.ipt).checkNetwork()
        paths.checkStatus()
        image.loop.checkStatus()
        checkContainers(c)
    elif args.o == "getimage":
        paths.createWorkingDirs()
        image.checkPre()
        image.fetch()
    elif args.o == "cleanup":
        paths.rmWorkingDirs()
    elif args.o == "spawn":
        c.cntVariables.prepareSSHPublicKey()
        c.cntVariables.generateVariablesFile(c.cntCommon.variablesFile)
        image.loop.mountImagePartition()
        image.loop.mountToLower()
        spawnContainers(c, image.lower)
    elif args.o == "stop":
        stopContainers(c)
        image.loop.umountLower()
        image.loop.releaseDevice()
    elif args.o == "pids":