Beispiel #1
0
def DiscoveryMain(Framework):

    logger.info('Start Phase 2 ... Apply Mapping transformation to Atrium CIs')

    userExtUcmdbDir = CollectorsParameters.BASE_PROBE_MGR_DIR + CollectorsParameters.getDiscoveryResourceFolder() + '\\TQLExport\\Atrium\\'

    inputFilesDirectory = File(userExtUcmdbDir + 'inter\\')
    inputFiles = inputFilesDirectory.listFiles()

    filePathDir = userExtUcmdbDir + 'results\\'
    directory = File(filePathDir)
    files = directory.listFiles()

    ## Clean up the existing result XML files
    if (files != None):
        for file in files:
            file.delete()

    ## Make sure we have XML files in the intermediate directory
    xmlFileInIntermediatesDirectory = 0
    for inputFile in inputFiles:
        inputFileName = inputFile.getName()
        if inputFileName[len(inputFileName)-4:].lower() == '.xml' and inputFile.length() > 0:
            xmlFileInIntermediatesDirectory = 1
    if not xmlFileInIntermediatesDirectory:
        logger.warn('Intermediate XML not found or invalid. Perhaps no data was received from Atrium or an error occurred in the atrium_query script.')
        return

    ## Generate the output XML files in results directory
    ip = CollectorsParameters.getValue(CollectorsParameters.KEY_SERVER_NAME)
    integrationAPI = IntegrationAPI(ip, "atrium_map.py")
    integrationAPI.processDir(userExtUcmdbDir)

    logger.info('End Phase 2 ... Apply Mapping transformation to Atrium CIs')
Beispiel #2
0
def DiscoveryMain(Framework):

    logger.info('Start Phase 2 ... Apply Mapping transformation to Atrium CIs')

    userExtUcmdbDir = CollectorsParameters.BASE_PROBE_MGR_DIR + CollectorsParameters.getDiscoveryResourceFolder(
    ) + '\\TQLExport\\Atrium\\'

    inputFilesDirectory = File(userExtUcmdbDir + 'inter\\')
    inputFiles = inputFilesDirectory.listFiles()

    filePathDir = userExtUcmdbDir + 'results\\'
    directory = File(filePathDir)
    files = directory.listFiles()

    ## Clean up the existing result XML files
    if (files != None):
        for file in files:
            file.delete()

    ## Make sure we have XML files in the intermediate directory
    xmlFileInIntermediatesDirectory = 0
    for inputFile in inputFiles:
        inputFileName = inputFile.getName()
        if inputFileName[len(inputFileName) -
                         4:].lower() == '.xml' and inputFile.length() > 0:
            xmlFileInIntermediatesDirectory = 1
    if not xmlFileInIntermediatesDirectory:
        logger.warn(
            'Intermediate XML not found or invalid. Perhaps no data was received from Atrium or an error occurred in the atrium_query script.'
        )
        return

    ## Generate the output XML files in results directory
    ip = CollectorsParameters.getValue(CollectorsParameters.KEY_SERVER_NAME)
    integrationAPI = IntegrationAPI(ip, "atrium_map.py")
    integrationAPI.processDir(userExtUcmdbDir)

    logger.info('End Phase 2 ... Apply Mapping transformation to Atrium CIs')
def exportTQL (ip, userExtDir):
	integrationAPI = IntegrationAPI (ip, "exportTQL_for_SIM_to_UCMDB.py")
	integrationAPI.processDir(userExtDir)
Beispiel #4
0
def exportTQL(ip, userExtDir):
    integrationAPI = IntegrationAPI(ip, "exportTQL_for_SIM_to_UCMDB.py")
    integrationAPI.processDir(userExtDir)
def exportTQL (ip, userExtDir):
    integrationAPI = IntegrationAPI ()
    integrationAPI.processDir(userExtDir)
def exportTQL(ip, userExtDir):
    integrationAPI = IntegrationAPI()
    integrationAPI.processDir(userExtDir)