当前位置: 首页>>代码示例>>Python>>正文


Python ActionBundle.ActionBundle类代码示例

本文整理汇总了Python中actionbundles.ActionBundle.ActionBundle的典型用法代码示例。如果您正苦于以下问题:Python ActionBundle类的具体用法?Python ActionBundle怎么用?Python ActionBundle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ActionBundle类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, module):
        """
        Constructor
        """
        ActionBundle.__init__(self, module)

        previousVersionBackupPath = module.executionContext["previousVersionBackupPath"]
        versionInfo = module.executionContext["versionInfo"]
        revisionInfo = module.executionContext["revisionInfo"]

        previousVersionInfo, previousRevisionInfo = getVersionAndRevisionInfo(
            module.versionInformationRegex,
            module.revisionInformationRegex,
            previousVersionBackupPath,
            module.relativeVersionInformationPath,
        )
        majorVersionInfo = versionInfo[versionInfo.find("-") + 1 : findNthSubstring(versionInfo, ".", 3)]

        # Compare current and new versions
        log.info("Version currently installed    : " + previousVersionInfo)
        log.info("Revision currently installed   : " + previousRevisionInfo)
        log.info("Version to be installed        : " + versionInfo)
        log.info("Revision to be installed       : " + revisionInfo)

        module.executionContext["majorVersionInfo"] = majorVersionInfo
        module.executionContext["previousVersionInfo"] = previousVersionInfo
        module.executionContext["previousRevisionInfo"] = previousRevisionInfo
开发者ID:idimitrakopoulos,项目名称:fireworks,代码行数:27,代码来源:CRMActionBundles.py

示例2: __init__

    def __init__(self, module):
        '''
        Constructor
        '''
        
        ActionBundle.__init__(self, module)
        
        # Generate a unique ActionBundle execution id
        guid = generateGUID()    
        log.info("Unique ActionBundle execution ID generated: " + guid)                
 
        # Configure marketing-suite-admin.properties using envprops
        # Configure mgage.properties using envprops
        for k, v in module.relativeConfigurationFiles.items():
            exactExtractedLocation = module.subModule.unzippedPackagePath + scriptGlobals.osDirSeparator + k
            ConfigureTemplateFile(module.name, lib.OptParser.options.envprops, exactExtractedLocation)
            CheckFileConfigurationIsComplete(exactExtractedLocation)

        # Copy marketing-suite-admin.properties to conf
        # Copy mgage.properties to conf
        # Copy jboss-log4j.xml to conf
        for k, v in module.relativeConfigurationFiles.items():
            exactExtractedLocation = module.subModule.unzippedPackagePath + scriptGlobals.osDirSeparator + k
            exactTargetLocation = module.targetDeploymentPath + scriptGlobals.osDirSeparator + v 
            CopyDirOrFile(exactExtractedLocation, exactTargetLocation)    
开发者ID:idimitrakopoulos,项目名称:fireworks,代码行数:25,代码来源:MSAdminActionBundles.py

示例3: __init__

    def __init__(self, module):
        '''
        Constructor
        '''
        ActionBundle.__init__(self, module)

        # Initialize application server object
        # appServer = ApplicationServer(module, scriptGlobals.appsrvProperties)

        # Generate a unique ActionBundle execution id
        guid = generateGUID()
        log.info("Unique ActionBundle execution ID generated: " + guid)

        # Check if Server is running
        if getProcessPIDByPathAndIdentifier(module.targetDeploymentPath, module.subModule.processIdentifier): die("\n\nThe " + module.subModule.name + " server at '" + module.targetDeploymentPath + "' is up. Installation will not continue\n")

        # Run script
        moduleDeployPath = module.targetDeploymentPath  + "/"  + module.subModule.name
        path2 = moduleDeployPath +  "/"  + module.subModule.installUpdateScript
        ChangePathPermissions(path2, 0744)
        path2=path2 + " CREATE YES "
        ExecuteOSCommand(path2, None)

        # Find version/revision info
        manifestFilePath=moduleDeployPath + "/META-INF/MANIFEST.MF"
        versionInfo = grepFile(module.versionInformationRegex, manifestFilePath)
        buildInfo = grepFile(module.buildInformationRegex, manifestFilePath)
        revisionInfo = grepFile(module.revisionInformationRegex, manifestFilePath)

        versionInfo = (versionInfo.replace(module.versionInformationRegex, "")).strip()
        if buildInfo != None:
            buildInfo = (buildInfo.replace(module.buildInformationRegex, "")).strip()

        revisionInfo = (revisionInfo.replace(module.revisionInformationRegex, "")).strip()

        # Construct the email notification
        emailSender = readPropertyFromPropertiesFileWithFallback("emailNotificationSenderAddress", scriptGlobals.scriptVarSectionName, lib.OptParser.options.envprops, scriptGlobals.emailNotificationSenderAddress)
        emailRecipients = scriptGlobals.globalNotificationEmailList
        emailSubject = "MSM Installation: " + module.name + "@"+ getCurrentHostname() + " (" + module.friendlyServerName + ")"
        emailText = detailedCleanInstallationReportTemplate(module.subModule.name,
                                                    versionInfo,
                                                    lib.OptParser.options.action,
                                                    getCurrentHostname(),
                                                    os.getcwd(),
                                                    guid,
                                                    " ".join(platform.uname()),
                                                    getpass.getuser(),
                                                    buildInfo,
                                                    revisionInfo,
                                                    lib.OptParser.options.envprops,
                                                    scriptGlobals.workingDir)

        # Email all required parties
        SendEmail(emailSender,
                  emailRecipients,
                  emailSubject,
                  emailText,
                  scriptGlobals.smtpHost,
                  scriptGlobals.smtpPort)
开发者ID:idimitrakopoulos,项目名称:fireworks,代码行数:59,代码来源:MSMStandaloneActionBundles.py

示例4: __init__

    def __init__(self, module):
        '''
        Constructor
        '''
        ActionBundle.__init__(self, module)
        
        # Generate a unique ActionBundle execution id
        guid = generateGUID()
        log.info("Unique ActionBundle execution ID generated: " + guid)
        
        # Check if JBOSS is running
        if getProcessPIDByPath(module.targetDeploymentPath): die("The JBOSS server at '" + module.targetDeploymentPath + "' is up. Installation will not continue")        
        
        # Prepare directory to unpack package
        unzippedPackagePath = createDirectoriesRecursively(scriptGlobals.workingDir + scriptGlobals.osDirSeparator + "unzippedPackage")
        
        # Since Builder is deployed on JBOSS some paths have an %s to allow a configurable 
        # profile, so do a little sprintf to fix them
        sprintfOnDictionaryValues(module.relativeConfigurationFiles, module.targetDeploymentProfile) 
        sprintfOnDictionaryValues(module.relativeCopyableFilesOrFolders, module.targetDeploymentProfile)
        sprintfOnListValues(module.subModule.relativeCleanUpFiles, module.targetDeploymentProfile)
        
        # Extract Builder package into tmp dir
        ExtractZipToDir(module.moduleFilename, unzippedPackagePath)
        
    
        # Do this again in case new settings have been added
        # Configure m-web-builder.properties using envprops
        # Configure mgage.properties using envprops
        for k, v in module.relativeConfigurationFiles.items():
            exactExtractedLocation = unzippedPackagePath + scriptGlobals.osDirSeparator + k
            ConfigureTemplateFile(module.name, lib.OptParser.options.envprops, exactExtractedLocation)
            CheckFileConfigurationIsComplete(exactExtractedLocation)
        
        
        # Copy m-web-builder.properties to conf
        # Copy mgage.properties to conf
        # Copy jboss-log4j.xml to conf
        for k, v in module.relativeConfigurationFiles.items():
            exactExtractedLocation = unzippedPackagePath + scriptGlobals.osDirSeparator + k
            exactTargetLocation = module.targetDeploymentPath + scriptGlobals.osDirSeparator + v 
            CopyDirOrFile(exactExtractedLocation, exactTargetLocation)       

        # Clean up files that might have been left over from previous manuall installations
        cleanUp(module)
        
        # Copy artifacts to profile
        for k, v in module.relativeCopyableFilesOrFolders.items():
            exactExtractedLocation = unzippedPackagePath + scriptGlobals.osDirSeparator + k
            exactTargetLocation = module.targetDeploymentPath + scriptGlobals.osDirSeparator + v 
            CopyDirOrFile(exactExtractedLocation, exactTargetLocation)
                
        # Install Plugins    
        staticFolder = readPropertyFromPropertiesFile("STATIC_FOLDER", module.name, lib.OptParser.options.envprops)  
        installDefaultPlugins(staticFolder, unzippedPackagePath, module)
开发者ID:idimitrakopoulos,项目名称:fireworks,代码行数:55,代码来源:BuilderActionBundles.py

示例5: __init__

 def __init__(self, module):
     '''
     Constructor
     '''
     ActionBundle.__init__(self, module)
     euclidModule = module.subModule
     guid = generateGUID()
     log.info("Unique ActionBundle execution ID generated: " + guid)
     unzippedPackagePath = createDirectoriesRecursively(scriptGlobals.workingDir + scriptGlobals.osDirSeparator + "unzippedPackage")
     ExtractZipToDir(module.moduleFilename, unzippedPackagePath)
     versionTmpPath = createDirectoriesRecursively(scriptGlobals.workingDir + scriptGlobals.osDirSeparator + "tmp")
     installedWarPath = module.targetDeploymentPath + scriptGlobals.osDirSeparator + "server" + scriptGlobals.osDirSeparator + module.targetDeploymentProfile + scriptGlobals.osDirSeparator + "deploy" + scriptGlobals.osDirSeparator + module.name + ".war"
     installedVersionInfo = getVersionInfoFromWar(installedWarPath, module.relativeVersionInformationPath, module.versionInformationRegex, module.revisionInformationRegex, versionTmpPath)
     newWarPath = unzippedPackagePath + scriptGlobals.osDirSeparator + "bin" + scriptGlobals.osDirSeparator + module.name + ".war"
     newVersionInfo = getVersionInfoFromWar(newWarPath, module.relativeVersionInformationPath, module.versionInformationRegex, module.revisionInformationRegex, versionTmpPath)
     print "\n------ UPDATE VERSION INFO ------"
     print "Currently installed: " + installedVersionInfo[0] + " (" + installedVersionInfo[1] + ")"
     print "    To be installed: " + newVersionInfo[0] + " (" + newVersionInfo[1] + ")\n"
开发者ID:idimitrakopoulos,项目名称:fireworks,代码行数:18,代码来源:AnalyticsActionBundles.py

示例6: __init__

    def __init__(self, module):
        """
        Constructor
        """
        ActionBundle.__init__(self, module)

        # Initialize application server object
        appServer = ApplicationServer(module, scriptGlobals.appsrvProperties)

        # Generate a unique ActionBundle execution id
        guid = generateGUID()
        log.info("Unique ActionBundle execution ID generated: " + guid)

        # Check if Tomcat is running
        if getProcessPIDByPathAndIdentifier(module.targetDeploymentPath, appServer.processIdentifier):
            die("\n\nThe Jboss server at '" + module.targetDeploymentPath + "' is up. Installation will not continue")

        # Since MSM is deployed on JBOSS some paths have an %s to allow a configurable
        # profile, so do a little sprintf to fix them
        sprintfOnDictionaryValues(module.relativeConfigurationFiles, module.targetDeploymentProfile)
        sprintfOnDictionaryValues(module.relativeCopyableFilesOrFolders, module.targetDeploymentProfile)

        # For JbosswebappPath = "/server/" + module.targetDeploymentProfile + "/deploy/" + module.subModule.name + ".war"
        # for Tomcat webappPath =  "/webapps/" + module.subModule.name
        webappPath = "/webapps/" + module.subModule.name

        # Check if module exists.
        for k, v in module.relativeCopyableFilesOrFolders.items():
            exactTargetLocation = module.targetDeploymentPath + scriptGlobals.osDirSeparator + v
            if exactTargetLocation.find(webappPath) != -1:
                if not os.path.isdir(exactTargetLocation):
                    die(
                        "\n\n"
                        + module.subModule.name
                        + " is not installed under:"
                        + module.targetDeploymentPath
                        + ". Please first run a clean installation"
                    )

        # Get Previous Hudson data
        previousManifilePath = module.targetDeploymentPath + webappPath + "/META-INF/MANIFEST.MF"
        previousVersionInfo = grepFile(module.versionInformationRegex, previousManifilePath)
        previousBuildInfo = grepFile(module.buildInformationRegex, previousManifilePath)
        previousRevisionInfo = grepFile(module.revisionInformationRegex, previousManifilePath)
        previousVersionInfo = (previousVersionInfo.replace(module.versionInformationRegex, "")).strip()
        if previousBuildInfo != None:
            previousBuildInfo = (previousBuildInfo.replace(module.buildInformationRegex, "")).strip()

        previousRevisionInfo = (previousRevisionInfo.replace(module.revisionInformationRegex, "")).strip()

        # Prepare directory to keep backups
        previousVersionBackupPath = createDirectoriesRecursively(
            scriptGlobals.workingDir + scriptGlobals.osDirSeparator + "previousVersionBackup"
        )

        # Backup webapps
        if lib.OptParser.action != "install-nodb-nobackup":
            for k, v in module.relativeCopyableFilesOrFolders.items():
                exactLocation = module.targetDeploymentPath + scriptGlobals.osDirSeparator + v
                exactBackupLocation = previousVersionBackupPath + scriptGlobals.osDirSeparator + k
                CopyDirOrFile3(exactLocation, exactBackupLocation)

        # Prepare directory to unpack package
        unzippedPackagePath = createDirectoriesRecursively(
            scriptGlobals.workingDir + scriptGlobals.osDirSeparator + "unzippedPackage"
        )

        # Extract MSM package into tmp dir
        ExtractZipToDir(module.moduleFilename, unzippedPackagePath)
        CreateDirectory(unzippedPackagePath + "/bin/" + module.subModule.name)
        ExtractZipToDir(
            unzippedPackagePath + "/bin/" + module.subModule.name + ".war",
            unzippedPackagePath + "/bin/" + module.subModule.name,
        )

        # Configure xxx.properties in tmp/../conf using envprops
        for k, v in module.relativeConfigurationFiles.items():
            exactExtractedLocation = unzippedPackagePath + scriptGlobals.osDirSeparator + k
            ConfigureTemplateFile(module.name, lib.OptParser.options.envprops, exactExtractedLocation)
            CheckFileConfigurationIsComplete(exactExtractedLocation)

        # Copy tmp/../conf/xxx.properties to to specified locations on Server (values)
        for k, v in module.relativeConfigurationFiles.items():
            exactExtractedLocation = unzippedPackagePath + scriptGlobals.osDirSeparator + k
            exactTargetLocation = module.targetDeploymentPath + scriptGlobals.osDirSeparator + v
            CopyDirOrFile(exactExtractedLocation, exactTargetLocation)

        # Construct the email notification
        emailSender = readPropertyFromPropertiesFileWithFallback(
            "emailNotificationSenderAddress",
            scriptGlobals.scriptVarSectionName,
            lib.OptParser.options.envprops,
            scriptGlobals.emailNotificationSenderAddress,
        )
        emailRecipients = scriptGlobals.globalNotificationEmailList
        emailSubject = (
            "MSM Installation: "
            + module.subModule.name
            + "@"
            + getCurrentHostname()
#.........这里部分代码省略.........
开发者ID:idimitrakopoulos,项目名称:fireworks,代码行数:101,代码来源:MSMWebAppActionBundles.py


注:本文中的actionbundles.ActionBundle.ActionBundle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。