コード例 #1
0
 def set_db2_bundle(language=None):
     framework = ScriptsExecutionManager.getFramework()
     if (language != None) and (language != 'NA'):
         Db2.LANG_BUNDLE = framework.getEnvironmentInformation().getBundle(
             Db2.BUNDLE_NAME, language)
     else:
         Db2.LANG_BUNDLE = framework.getEnvironmentInformation().getBundle(
             Db2.BUNDLE_NAME)
コード例 #2
0
ファイル: eview_db2.py プロジェクト: ddonnelly19/dd-git
CP11 - Fixed DB2 DSG DISPLAY command handling to handle output for DB2 version 10
CP12 - Change DB2 status check from D OPDATA to D A command
'''
import string, re, logger, modeling
import eview_lib
from appilog.common.system.types import ObjectStateHolder
from appilog.common.system.types.vectors import ObjectStateHolderVector
from eview_lib import isNotNull, isNull, printSeparator, isnumeric
from string import upper
from com.hp.ucmdb.discovery.library.clients import ScriptsExecutionManager
#from modeling import _CMDB_CLASS_MODEL

''' Variables '''
global Framework
PARAM_HOST_ID = 'hostId'
UCMDB_VERSION = logger.Version().getVersion(ScriptsExecutionManager.getFramework())


_CMD_PREFIX_DISPLAY_DDF = '%s DISPLAY DDF'
_CMD_PREFIX_DISPLAY_GROUP = '%s DISPLAY GROUP'
_CMD_PREFIX_DISPLAY_OPDATA = 'D OPDATA'
_QRY_LOCATIONS = 'SELECT LOCATION, LINKNAME, PORT, DBALIAS FROM SYSIBM.LOCATIONS'
_QRY_DATABASE = 'SELECT NAME, CREATOR, STGROUP, ENCODING_SCHEME, CREATEDTS FROM SYSIBM.SYSDATABASE'
_QRY_TABLESPACES = 'SELECT * FROM SYSIBM.SYSTABLESPACE'

''' Classes '''

class Dsg:
    name = ''
    level = ''
    protocolLevel = ''
コード例 #3
0
import file_mon_utils

from appilog.common.system.types import ObjectStateHolder
from appilog.common.system.types.vectors import ObjectStateHolderVector
from java.util import Properties, Date
from com.hp.ucmdb.discovery.library.clients.agents import BaseAgent
from com.hp.ucmdb.discovery.library.clients import ClientsConsts, ScriptsExecutionManager
from com.hp.ucmdb.discovery.library.common import CollectorsParameters
import errorobject
import errorcodes
from eview400_lib import isNotNull, isNull

# Global Variables
_STR_EMPTY = ''
UCMDB_VERSION = logger.Version().getVersion(
    ScriptsExecutionManager.getFramework())

# iSeries Commands

_CMD_EVIEW_VERSION = 'EVDSPPFM eview/version'
_CMD_SYSVAL_QMODEL = 'DSPSYSVAL SYSVAL(QMODEL)'
_CMD_SYSVAL_QSRLNBR = 'DSPSYSVAL SYSVAL(QSRLNBR)'
_CMD_ETHERNET = 'ETHERNET'
_CMD_DSPNETA = 'DSPNETA'


# Classes
class EViewConfFileNameFilter:
    def accept(self, fileName):
        return re.search('^ev400_config_.*$', fileName.lower()) is not None
コード例 #4
0
 def get_db2_bundle():
     framework = ScriptsExecutionManager.getFramework()
     if Db2.LANG_BUNDLE == None:
         Db2.LANG_BUNDLE = framework.getEnvironmentInformation().getBundle(Db2.BUNDLE_NAME)
     return Db2.LANG_BUNDLE
コード例 #5
0
 def set_db2_bundle(language=None):
     framework = ScriptsExecutionManager.getFramework()
     if (language != None) and (language != "NA"):
         Db2.LANG_BUNDLE = framework.getEnvironmentInformation().getBundle(Db2.BUNDLE_NAME, language)
     else:
         Db2.LANG_BUNDLE = framework.getEnvironmentInformation().getBundle(Db2.BUNDLE_NAME)
コード例 #6
0
def addLog(level, msg, stackTrace=None):
    ScriptsExecutionManager.addExecutionRecordLog(level, msg)
コード例 #7
0
def _getFramework():
    return ScriptsExecutionManager.getFramework()
コード例 #8
0
ファイル: TTY_HR_Main.py プロジェクト: ddonnelly19/dd-git
                    softwareInfo = applications.InstalledSoftwareInfo(cmdLineToInstalledSoftware, softNameToInstSoftOSH)
                    appSign.setInstalledSoftwareInfo(softwareInfo)

                    appSign.getApplicationsTopology(hostId)
                    if discoverP2P:
                        try:
                            p2p = process_to_process.ProcessToProcess(Framework)
                            p2p.getProcessesToProcess()
                        except:
                            errorMessage = "Failed to run p2p discovery"
                            logWarn(Framework, errorcodes.FAILED_RUNNING_DISCOVERY, ["p2p", protocol], errorMessage)

                    if appSign.crgMap:
                        vector = ObjectStateHolderVector()
                        resultVectors = ScriptsExecutionManager.getFramework().getObjectsForAddOrUpdate()
                        vector.addAll(resultVectors)
                        for osh in vector:
                            oshClass = osh.getObjectClass()
                            # weak node
                            if (
                                oshClass == "node"
                                and osh.getAttributeValue("host_iscomplete") == 0
                                and osh.getAttributeValue("host_key")
                            ):
                                ip = osh.getAttributeValue("host_key").split(" ")[0]
                                if ip in appSign.crgMap.keys():
                                    logger.debug("replace weak node:", osh.getAttribute("host_key"))
                                    resultVectors.remove(osh)
                                    resultVectors.add(appSign.crgMap[ip])
                            # root container
コード例 #9
0
ファイル: eview_cics.py プロジェクト: deezeesms/dd-git
import string, re, logger, modeling, netutils, shellutils, errormessages
import eview_lib
from appilog.common.system.types import ObjectStateHolder
from appilog.common.system.types.vectors import ObjectStateHolderVector
from appilog.common.system.defines import AppilogTypes
from java.util import Date
from eview_lib import isNotNull, printSeparator, isnumeric, isNull
from com.hp.ucmdb.discovery.library.common import CollectorsParameters
from com.hp.ucmdb.discovery.library.clients import ScriptsExecutionManager
from string import *


''' Variables '''

global Framework
UCMDB_VERSION = logger.Version().getVersion(ScriptsExecutionManager.getFramework())
PARAM_HOST_ID = 'hostId'
_CMD_F_CEMT_I_SYSTEM = 'F %s,CEMT I SYSTEM'
_CMD_F_CEMT_I_DB2CONN = 'F %s,CEMT I DB2CONN'
_CMD_F_CEMT_I_MQCONN = 'F %s,CEMT I MQCONN'
_CMD_F_CEMT_I_CONN = 'F %s,CEMT I CONN'
_CMD_F_ALL_JOBS ='*'

##############################################
##  Concatenate strings w/ any object type  ##
##############################################
def concatenate(*args):
    return ''.join(map(str,args))


#############################################################
コード例 #10
0
 def get_db2_bundle():
     framework = ScriptsExecutionManager.getFramework()
     if Db2.LANG_BUNDLE == None:
         Db2.LANG_BUNDLE = framework.getEnvironmentInformation().getBundle(
             Db2.BUNDLE_NAME)
     return Db2.LANG_BUNDLE
コード例 #11
0
ファイル: logger.py プロジェクト: ddonnelly19/dd-git
def addLog(level, msg, stackTrace=None):
    ScriptsExecutionManager.addExecutionRecordLog(level, msg)
コード例 #12
0
ファイル: logger.py プロジェクト: ddonnelly19/dd-git
def _getFramework():
    return ScriptsExecutionManager.getFramework()