Esempio n. 1
0
    def checkLogFilePath(self):
        """
        function: Check log file path
        input : NA
        output: NA
        """
        clusterPath = []
        try:
            # get tool path
            clusterPath.append(DefaultValue.getClusterToolPath(self.user))
            # get tmp path
            tmpDir = DefaultValue.getTmpDirFromEnv()
            clusterPath.append(tmpDir)
            # get cluster path
            hostName = DefaultValue.GetHostIpOrName()
            dirs = self.clusterInfo.getClusterDirectorys(hostName, False)
            # loop all cluster path
            for checkdir in dirs.values():
                clusterPath.extend(checkdir)
            self.logger.debug("Cluster paths %s." % clusterPath)

            # check directory
            g_file.checkIsInDirectory(self.logFile, clusterPath)
        except Exception as e:
            self.logger.logExit(str(e))
Esempio n. 2
0
    def checkLogFilePath(self):
        """
        function: Check log file path
        input : NA
        output: NA
        """
        clusterPath = []

        try:
            self.logger.log("Check log file path.", "addStep")
            # get tool path
            clusterPath.append(DefaultValue.getClusterToolPath())

            # get tmp path
            tmpDir = DefaultValue.getTmpDir(self.user, self.xmlFile)
            clusterPath.append(tmpDir)

            # get cluster  path
            hostName = DefaultValue.GetHostIpOrName()
            dirs = self.clusterInfo.getClusterDirectorys(hostName, False)
            for checkdir in dirs.values():
                clusterPath.extend(checkdir)

            self.logger.debug("Cluster paths %s." % clusterPath)
            # check directory
            g_file.checkIsInDirectory(self.logFile, clusterPath)
            self.logger.log("Successfully checked log file path.", "constant")
        except Exception as e:
            self.logger.logExit(str(e))