''' 
	Access Control Lists stressing script
	To lauch on the first client
	Aurelien Charbon - Bull SA
'''

from random_gen import *
from optparse import OptionParser
import commands
import os
import random

alphabet='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789_-()'
t_alphabet=len(alphabet)

test = RandomGen()

parser = OptionParser()
parser.set_defaults(nbfiles=5,nbusers=5,nbgroups=5 )
parser.add_option("-p", "--path", dest="path",
                  help="path on which the test is executed")
parser.add_option("-f", "--nbfiles", dest="nbfiles",
                  help="nb of files to do the test (default=5)")
parser.add_option("-u", "--nbusers", dest="nbusers",
                  help="nb of users (default=5)")
parser.add_option("-g", "--nbgrp", dest="nbgroups",
                  help="nb of groups (default=5)")
(options, args) = parser.parse_args()

test.createFile(options.path,options.nbfiles)
test.getNUserList(options.nbusers)
test.getNGroupList(options.nbgroups)
for i in range (100000):
	test.randomOp(path)

