From e3618371566cd58338250a9bf7a7d4d1d36c8bb0 Mon Sep 17 00:00:00 2001 From: Viktor Ashirov Date: Jan 05 2017 10:36:39 +0000 Subject: Ticket 49060 - Increase number of masters, hubs and consumers in topology Bug Description: Currently only 10 masters, hubs and consumers can be created for testing using lib389. We should increase that number to at least 60 (number of supported replicas in RHEL7.3). Fix Description: Allow create_test.py to create up to 99 instances (standalone, masters, hubs and consumers). https://fedorahosted.org/389/ticket/49060 Reviewed by: spichugi (Thanks!) --- diff --git a/dirsrvtests/create_test.py b/dirsrvtests/create_test.py index 0eb3b01..423d9d2 100755 --- a/dirsrvtests/create_test.py +++ b/dirsrvtests/create_test.py @@ -29,14 +29,14 @@ def displayUsage(): '[ -m|--masters -h|--hubs ' + '-c|--consumers ] -o|--outputfile ]\n') print ('If only "-t" is provided then a single standalone instance is ' + - 'created. Or you can create a test suite script using ' + - '"-s|--suite" instead of using "-t|--ticket". The "-i" option ' + - 'can add mulitple standalone instances(maximum 10). However, you' + - ' can not mix "-i" with the replication options(-m, -h , -c). ' + - 'There is a maximum of 10 masters, 10 hubs, and 10 consumers.') + 'created. Or you can create a test suite script using ' + + '"-s|--suite" instead of using "-t|--ticket". The "-i" option ' + + 'can add mulitple standalone instances (maximum 99). However, you' + + ' can not mix "-i" with the replication options (-m, -h , -c). ' + + 'There is a maximum of 99 masters, 99 hubs, and 99 consumers.') print('If "-s|--suite" option was chosen, then no topology would be added ' + 'to the test script. You can find predefined fixtures in the lib389/topologies.py ' + - 'and usem them or write new one if you have special case.') + 'and use them or write a new one if you have a special case.') exit(1) @@ -118,30 +118,30 @@ if len(sys.argv) > 0: displayUsage() if not args.masters.isdigit() or \ - int(args.masters) > 10 or \ + int(args.masters) > 99 or \ int(args.masters) < 0: print('Invalid value for "--masters", it must be a number and it can' + - ' not be greater than 10') + ' not be greater than 99') displayUsage() - if not args.hubs.isdigit() or int(args.hubs) > 10 or int(args.hubs) < 0: + if not args.hubs.isdigit() or int(args.hubs) > 99 or int(args.hubs) < 0: print('Invalid value for "--hubs", it must be a number and it can ' + - 'not be greater than 10') + 'not be greater than 99') displayUsage() if not args.consumers.isdigit() or \ - int(args.consumers) > 10 or \ + int(args.consumers) > 99 or \ int(args.consumers) < 0: print('Invalid value for "--consumers", it must be a number and it ' + - 'can not be greater than 10') + 'can not be greater than 99') displayUsage() if args.inst: if not args.inst.isdigit() or \ - int(args.inst) > 10 or \ + int(args.inst) > 99 or \ int(args.inst) < 1: print('Invalid value for "--instances", it must be a number ' + - 'greater than 0 and not greater than 10') + 'greater than 0 and not greater than 99') displayUsage() if int(args.inst) > 0: if int(args.masters) > 0 or \