-
Notifications
You must be signed in to change notification settings - Fork 0
/
tester.py
37 lines (26 loc) · 1.65 KB
/
tester.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /usr/bin/env python
import lib.OptParser as parser
import sys, re, os
from lib.Toolkit import log, logging, readPropertyFromPropertiesFile, scriptGlobals, initClassFromStringWithModule, createDirectoriesRecursively, printOsInformation, checkRequiredExecutablesExist, moveDirOrFile, rollbackActions, die,\
getAnswerFromUser, produceFinalReport,runOracleScript , appendLineToFileBeforeLine, appendLineToFileAfterLine, removeLineFromFile, extractFileFromZipToDir, extractFileFromCompressedTarToDir, extractCompressedTarToDir, readPropertyFromPropertiesFileWithFallback
from modules.Module import Module
from actions.FileSystemActions import ChangePathPermissions
try:
# Print OS information
printOsInformation()
# Check for required executables
#checkRequiredExecutablesExist(scriptGlobals.requiredExecutables)
# Initialize working dir
createDirectoriesRecursively(scriptGlobals.workingDir)
log.info("Working directory '" + scriptGlobals.workingDir + "'")
# Get Module Properties file
moduleProperties = extractFileFromZipToDir(parser.options.module, scriptGlobals.modulePropertiesFile, scriptGlobals.workingDir)
log.info("Module properties file '" + moduleProperties + "'")
# Initialize module to be deployed
module = Module(parser.options.module, moduleProperties, parser.options.envprops)
# Initialize Module Action Bundle
# ab = initClassFromStringWithModule(readPropertyFromPropertiesFile("module" + parser.options.action + "AB", scriptGlobals.moduleSectionName, parser.options.modprops), module)
raw_input("")
# import code; code.interact(local=locals())
except:
raise