Exemplo n.º 1
0
def __init__():
    set.readNodes()
    serverList()
    global serverString1
    global serverString2
    print set.servers
    print set.name
    print set.ip
Exemplo n.º 2
0
def serverList():
    set.readNodes()
    serverString_1 = ''
    serverString_2 = ''
    #print set.name
    #print set.servers
    for node in set.servers:
        serverString_1 = serverString_1 + '    - %s\n' % (
            set.ip[set.name.index(node)])
        serverString_2 = serverString_2 + '"%s",' % (
            set.ip[set.name.index(node)])
Exemplo n.º 3
0
subprocess.call(['mkdir measurements/%s/' % currentInstance], shell=True)
subprocess.call(['mkdir log/%s/' % currentInstance], shell=True)
subprocess.call(['mkdir log/%s/container/' % currentInstance], shell=True)
#print currentInstance
doc = open('measurements/currentInstance.txt', 'w+')
doc.write(currentInstance)
doc.close()

subprocess.call(['rm -f measurements/%s/torrentsNr.txt' % currentInstance],
                shell=True)
doc = open('measurements/%s/torrentsNr.txt' % currentInstance, 'w+')
doc.write('0\n')
doc.close()

containerInfo()
set.readNodes()

print("Restarting links for ipv6")
restartLinks(G, net)
print("Limit links")
limitLinks(G, net, 'hallo')
print("Start container")
startDocker(G, net)
time.sleep(5)
print("Check for faulty containers")
check.check()

set.findInterfaces()
set.setupIptables()
set.restartExited()
CLI(net)