示例#1
0
		argParser = None
		args = None
		option = None
		sys.exit()
		
	if options.envid == None and options.project == None:
		print "\n***Envid and project are mandatory arguments***\n"
		printHelp(argParser)
		argParser = None
		args = None
		option = None
		sys.exit()
	
	h2hprops[KYPIUH2HDIR] = os.sys.currentWorkingDir
	createPropertyMap()
	validateEnvid(options.envid)
	validateProject(options.project)
	if not _checkAction(options):
		print "\n***Specify the action to perform <-f|-s|-m|-H|-q|-i|-r>***\n"
		printHelp(argParser)
		sys.exit(1)

	logPrefix = options.envid + "_" + options.project + "_" + str(date.today()) + "_" + time.strftime("%H-%M-%S", time.gmtime())
	initLogger(logPrefix, options.debug)

	if options.daysOlder != None and int(options.daysOlder) > 0:
		print "NOTE: Only housekeeping will be performed, All other requests are ignored"
		deleteOldLogFiles(options.daysOlder, options.envid, options.project)
		sys.exit(1)
		
	processTarFile(argParser, options)
示例#2
0
	argParser.add_option("-f", "--fwkDeploy", action="store_true", dest="fwkDeploy", default=False, help="package for framework")
	argParser.add_option("-d", "--debug", action="store_true", default=False, dest="debug", help="run in debug")
	argParser.add_option("-p", "--project", action="store", default = None, dest="project", help="define project to use: SP|ESES")
	
	(options,args) = argParser.parse_args(sys.argv)

	if options.envid == None or options.project == None or options.mqCheckList == False and options.momDeploy == False and options.fwkDeploy == False:
		printHelp(argParser)
		sys.exit()

	envid = options.envid.lower()
	project = options.project.upper()
	propertyFile = getPropertyFile('config/request/' + envid + '_' + project + '_h2hpackage.properties', PACKAGEPROPERTYFILE, envid)
	
	createPropertyMap()
	validateEnvid(envid)
	#if options.daysOlder != None and int(options.daysOlder) > 0:
	#	deleteOldLogFiles(options.daysOlder, envid)
	#	sys.exit(1)

	#checkAction(options)
        packcom = ""
        if (options.momDeploy):
		packcom = packcom + "c"

	if (options.mqCheckList):
		packcom = packcom + "q"

	if (options.fwkDeploy):
                packcom = packcom + "f"