예제 #1
0
### Imports
######################################################
import sys
import traceback
from ext.MamUtils import MamUtils
from ext.TargetFile import TargetFile
from java.lang import StringBuffer
from java.util import Properties
from java.net import InetAddress
from appilog.common.system.defines import AppilogTypes
from appilog.collectors.services.dynamic.agents import AgentConstants
from appilog.collectors.util import ProtocolDictionaryManager
from appilog.collectors.util import NetworkXmlUtil
from appilog.collectors.util import HostKeyUtil
from appilog.common.utils import Protocol
mam_utils = MamUtils('BusinessGroupPart.py')
if mam_utils.isInfoEnabled():
    mam_utils.info('########## Start BusinessGroupPart')
#######################################################
### Define needed variables
### Framework.getDestinationAttribut from pattern settings
### ObjectStateHolder() from CMDB
#######################################################
sid = Framework.getDestinationAttribute('database_sid')
port = Framework.getDestinationAttribute('database_port')
host_id = Framework.getDestinationAttribute('hostId')
oracle_id = Framework.getDestinationAttribute('oracle_id')
ip = Framework.getDestinationAttribute('database_ip')
credential_id = Framework.getDestinationAttribute('oracle_credential_id')
view_name = Framework.getDestinationAttribute('view_name')
request_type_name = Framework.getDestinationAttribute('request_type_name')
import sys
import traceback
from ext.MamUtils import MamUtils
from ext.TargetFile import TargetFile
from java.lang import StringBuffer
from java.util import Properties
from java.net import InetAddress
from appilog.common.system.defines import AppilogTypes
from appilog.collectors.services.dynamic.agents import AgentConstants
from appilog.collectors.util import ProtocolDictionaryManager
from appilog.collectors.util import NetworkXmlUtil
from appilog.collectors.util import HostKeyUtil
from appilog.common.utils import Protocol

mam_utils = MamUtils('BusinessProgramTransaction.py')

# 1 ##############################	
if mam_utils.isInfoEnabled():
	mam_utils.info('----- Start Transaction->Program')
# 2 ##############################
########################################### Oracle Data
sid				= Framework.getDestinationAttribute('database_sid')
port				= Framework.getDestinationAttribute('database_port')
ip				= Framework.getDestinationAttribute('database_ip')
hostId				= Framework.getDestinationAttribute('hostId')
oracle_id				= Framework.getDestinationAttribute('id')
credential_id				= Framework.getDestinationAttribute('oracle_credential_id')
########################################### ITG Data
TABLE_USER 			= Framework.getDestinationAttribute('table_user')
VIEW_NAME   			= Framework.getDestinationAttribute('view_name')
TABLE_NAME 			= Framework.getDestinationAttribute('table_name')
예제 #3
0
import traceback
import sys

from org.jdom.input import SAXBuilder
from java.io import File

from ext.MamUtils import MamUtils
from com.hp.ucmdb.discovery.library.common import CollectorsParameters
from appilog.common.system.types import ObjectStateHolder
from appilog.common.system.types.vectors import ObjectStateHolderVector

##############################################
########      VARIABLES             ##########
##############################################
SCRIPT_NAME = "Push_to_UCMDB_from_ARIS.py"
mam_utils = MamUtils(SCRIPT_NAME + ' ')
dataTypeMap = {
    'StrProp': 'String',
    'StrListProp': 'StringList',
    'DoubleProp': 'Double',
    'IntProp': 'Integer',
    'BoolProp': 'Boolean',
    'LongProp': 'Long'
}


##############################################
##  Concatenate strings w/ any object type  ##
##############################################
def concatenate(*args):
    return ''.join(map(str, args))
import sys
import traceback
from ext.MamUtils import MamUtils
from ext.TargetFile import TargetFile
from java.lang import StringBuffer
from java.util import Properties
from java.net import InetAddress
from appilog.common.system.defines import AppilogTypes
from appilog.collectors.services.dynamic.agents import AgentConstants
from appilog.collectors.util import ProtocolDictionaryManager
from appilog.collectors.util import NetworkXmlUtil
from appilog.collectors.util import HostKeyUtil
from appilog.common.utils import Protocol

mam_utils = MamUtils('BusinessProgram.py')

# 1 ##############################
if mam_utils.isInfoEnabled():
    mam_utils.info('----- Start Program')
# 2 ##############################
########################################### Oracle Data
sid = Framework.getDestinationAttribute('database_sid')
port = Framework.getDestinationAttribute('database_port')
ip = Framework.getDestinationAttribute('database_ip')
hostId = Framework.getDestinationAttribute('hostId')
oracle_id = Framework.getDestinationAttribute('id')
credential_id = Framework.getDestinationAttribute('oracle_credential_id')
########################################### ITG Data
TABLE_USER = Framework.getDestinationAttribute('table_user')
VIEW_NAME = Framework.getDestinationAttribute('view_name')
TABLE_NAME = Framework.getDestinationAttribute('table_name')
### Imports
######################################################
import sys
import traceback
from ext.MamUtils import MamUtils
from ext.TargetFile import TargetFile
from java.lang import StringBuffer
from java.util import Properties
from java.net import InetAddress
from appilog.common.system.defines import AppilogTypes
from appilog.collectors.services.dynamic.agents import AgentConstants
from appilog.collectors.util import ProtocolDictionaryManager
from appilog.collectors.util import NetworkXmlUtil
from appilog.collectors.util import HostKeyUtil
from appilog.common.utils import Protocol
mam_utils = MamUtils('BusinessDevCR.py')
if mam_utils.isInfoEnabled():
    mam_utils.info('########## Start BusinessDevCR')
#######################################################
### Define needed variables
### Framework.getDestinationAttribut from pattern settings
### ObjectStateHolder() from CMDB
#######################################################
sid                           = Framework.getDestinationAttribute('database_sid')
port                          = Framework.getDestinationAttribute('database_port')
host_id                       = Framework.getDestinationAttribute('hostId')
oracle_id                     = Framework.getDestinationAttribute('oracle_id')
ip                            = Framework.getDestinationAttribute('database_ip')
credential_id                 = Framework.getDestinationAttribute('oracle_credential_id')
view_name                     = Framework.getDestinationAttribute('view_name')
request_type_name             = Framework.getDestinationAttribute('request_type_name')
### Imports
######################################################
import sys
import traceback
from ext.MamUtils import MamUtils
from ext.TargetFile import TargetFile
from java.lang import StringBuffer
from java.util import Properties
from java.net import InetAddress
from appilog.common.system.defines import AppilogTypes
from appilog.collectors.services.dynamic.agents import AgentConstants
from appilog.collectors.util import ProtocolDictionaryManager
from appilog.collectors.util import NetworkXmlUtil
from appilog.collectors.util import HostKeyUtil
from appilog.common.utils import Protocol
mam_utils = MamUtils('BusinessProcPart.py')
if mam_utils.isInfoEnabled():
    mam_utils.info('########## Start BusinessProcPart')
#######################################################
### Define needed variables
### Framework.getDestinationAttribut from pattern settings
### ObjectStateHolder() from CMDB
#######################################################
sid                           = Framework.getDestinationAttribute('database_sid')
port                          = Framework.getDestinationAttribute('database_port')
host_id                       = Framework.getDestinationAttribute('hostId')
oracle_id                     = Framework.getDestinationAttribute('oracle_id')
ip                            = Framework.getDestinationAttribute('database_ip')
credential_id                 = Framework.getDestinationAttribute('oracle_credential_id')
view_name                     = Framework.getDestinationAttribute('view_name')
request_type_name             = Framework.getDestinationAttribute('request_type_name')
### Imports
######################################################
import sys
import traceback
from ext.MamUtils import MamUtils
from ext.TargetFile import TargetFile
from java.lang import StringBuffer
from java.util import Properties
from java.net import InetAddress
from appilog.common.system.defines import AppilogTypes
from appilog.collectors.services.dynamic.agents import AgentConstants
from appilog.collectors.util import ProtocolDictionaryManager
from appilog.collectors.util import NetworkXmlUtil
from appilog.collectors.util import HostKeyUtil
from appilog.common.utils import Protocol
mam_utils = MamUtils('BusinessCR.py')
if mam_utils.isInfoEnabled():
    mam_utils.info('########## Start BusinessCR')
#######################################################
### Define needed variables
### Framework.getDestinationAttribut from pattern settings
### ObjectStateHolder() from CMDB
#######################################################
sid = Framework.getDestinationAttribute('database_sid')
port = Framework.getDestinationAttribute('database_port')
host_id = Framework.getDestinationAttribute('hostId')
oracle_id = Framework.getDestinationAttribute('oracle_id')
ip = Framework.getDestinationAttribute('database_ip')
credential_id = Framework.getDestinationAttribute('oracle_credential_id')
view_name = Framework.getDestinationAttribute('view_name')
request_type_name = Framework.getDestinationAttribute('request_type_name')
import sys
import traceback
from ext.MamUtils import MamUtils
from ext.TargetFile import TargetFile
from java.lang import StringBuffer
from java.util import Properties
from java.net import InetAddress
from appilog.common.system.defines import AppilogTypes
from appilog.collectors.services.dynamic.agents import AgentConstants
from appilog.collectors.util import ProtocolDictionaryManager
from appilog.collectors.util import NetworkXmlUtil
from appilog.collectors.util import HostKeyUtil
from appilog.common.utils import Protocol

mam_utils = MamUtils('BusinessProgram.py')

# 1 ##############################	
if mam_utils.isInfoEnabled():
	mam_utils.info('----- Start Program')
# 2 ##############################
########################################### Oracle Data
sid				= Framework.getDestinationAttribute('database_sid')
port				= Framework.getDestinationAttribute('database_port')
ip				= Framework.getDestinationAttribute('database_ip')
hostId				= Framework.getDestinationAttribute('hostId')
oracle_id				= Framework.getDestinationAttribute('id')
credential_id				= Framework.getDestinationAttribute('oracle_credential_id')
########################################### ITG Data
TABLE_USER 			= Framework.getDestinationAttribute('table_user')
VIEW_NAME   			= Framework.getDestinationAttribute('view_name')
TABLE_NAME 			= Framework.getDestinationAttribute('table_name')
import sys
import traceback
from ext.MamUtils import MamUtils
from ext.TargetFile import TargetFile
from java.lang import StringBuffer
from java.util import Properties
from java.net import InetAddress
from appilog.common.system.defines import AppilogTypes
from appilog.collectors.services.dynamic.agents import AgentConstants
from appilog.collectors.util import ProtocolDictionaryManager
from appilog.collectors.util import NetworkXmlUtil
from appilog.collectors.util import HostKeyUtil
from appilog.common.utils import Protocol

mam_utils = MamUtils('BusinessTransaction.py')

# 1 ##############################	
if mam_utils.isInfoEnabled():
	mam_utils.info('----- Start Transaction->BusinessService')
# 2 ##############################
########################################### Oracle Data
sid				= Framework.getDestinationAttribute('database_sid')
port				= Framework.getDestinationAttribute('database_port')
ip				= Framework.getDestinationAttribute('database_ip')
hostId				= Framework.getDestinationAttribute('hostId')
oracle_id				= Framework.getDestinationAttribute('id')
credential_id				= Framework.getDestinationAttribute('oracle_credential_id')
SITE_ID				= Framework.getDestinationAttribute('site_id')
########################################### ITG Data
TABLE_USER 			= Framework.getDestinationAttribute('table_user')
VIEW_NAME   			= Framework.getDestinationAttribute('view_name')