1#!/usr/bin/env python3 2''' 3 Access Control Lists stressing script 4 To lauch on the first client 5 Aurelien Charbon - Bull SA 6''' 7 8from random_gen import * 9from optparse import OptionParser 10import subprocess 11import os 12import random 13 14alphabet='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789_-()' 15t_alphabet=len(alphabet) 16 17test = RandomGen() 18 19parser = OptionParser() 20parser.set_defaults(nbfiles=5,nbusers=5,nbgroups=5,nloop=100 ) 21parser.add_option("-n","--nloop", dest="nloop",type="int", help="number of loop to do in the test") 22parser.add_option("-p", "--path", dest="path",help="path on which the test is executed") 23parser.add_option("-f", "--nbfiles", dest="nbfiles",type="int",help="nb of files to do the test (default=5)") 24parser.add_option("-u", "--nbusers", dest="nbusers",type="int",help="nb of users (default=5)") 25parser.add_option("-g", "--nbgrp", dest="nbgroups",type="int",help="nb of groups (default=5)") 26(options, args) = parser.parse_args() 27 28test.createFile(options.path,options.nbfiles) 29test.getNUserList(options.nbusers) 30test.getNGroupList(options.nbgroups) 31for i in range (options.nloop): 32 test.randomOp(options.path) 33