예제 #1
0
 def __init__(self, name):
     jee.NamedJmxObject.__init__(self, name)
     self.queueLength = entity.WeakNumeric(long)
     self.threadPriority = entity.WeakNumeric(int)
     self.threadCount = entity.WeakNumeric(long)
     self.threadsIncrease = entity.WeakNumeric(long)
     self.threadsMaximum = entity.WeakNumeric(long)
     self.parentObjectName = None
예제 #2
0
파일: jdbc.py 프로젝트: deezeesms/dd-git
    def __init__(self, name, url=None, description=None, driverClass=None):
        entity.HasOsh.__init__(self)
        entity.HasName.__init__(self)
        self.setName(name)

        self.url = url
        self.description = description
        self.driverClass = driverClass
        self.jndiName = None
        self.initialCapacity = entity.WeakNumeric(int)
        self.maxCapacity = entity.WeakNumeric(int)
        self.capacityIncrement = entity.WeakNumeric(int)
        self.testOnRelease = None
        self.__server = None
        self.databaseName = None
예제 #3
0
def DiscoveryMain(Framework):
    Framework = jee_connection.EnhancedFramework(Framework)
    port = entity.WeakNumeric(int)
    port.set(Framework.getDestinationAttribute('port'))
    version = Framework.getDestinationAttribute('version')

    resultVector = ObjectStateHolderVector()
    isAppResourcesDiscoveryEnabled = Boolean.valueOf(
        Framework.getParameter('discoverAppResources'))
    isJMSResourcesDiscoveryEnabled = Boolean.valueOf(
        Framework.getParameter('discoverJMSResources'))
    discoverDeployedOnlyApplications = Boolean.valueOf(
        Framework.getParameter("discoverDeployedOnlyApplications"))
    protocolType = (Framework.getDestinationAttribute('protocol')
                    or ClientsConsts.HTTP_PROTOCOL_NAME)

    properties = Properties()
    properties.put(CollectorsConstants.PROTOCOL_ATTRIBUTE_PORT,
                   str(port.value()))
    properties.put(AgentConstants.VERSION_PROPERTY, version)
    properties.put(AgentConstants.PROP_WEBLOGIC_PROTOCOL, protocolType)

    platform = jee.Platform.WEBLOGIC

    try:
        client = Framework.createClient(properties)
    except (Exception, JException), exc:
        logger.warnException("Failed to establish connection")
        jee_connection.reportError(Framework, str(exc), platform.getName())
예제 #4
0
def DiscoveryMain(Framework):
    Framework = jee_connection.EnhancedFramework(Framework)
    isAppResourcesDiscoveryEnabled = _asBoolean(Framework.getParameter('discoverAppResources'))
    isJmsResourcesDiscoveryEnabled = _asBoolean(Framework.getParameter('discoverJMSResources'))

    platform = jee.Platform.JBOSS
    try:
        r'''In addition to the credentials we have to specify port number and
        version of the platform.
        Credentials may be defined without such information that is very important
        for establishing connections
        '''
        port = entity.WeakNumeric(int)
        port.set(Framework.getDestinationAttribute('port'))
        version = Framework.getDestinationAttribute('version')

        properties = Properties()
        properties.put(CollectorsConstants.PROTOCOL_ATTRIBUTE_PORT, str(port.value()))
        properties.put(AgentConstants.VERSION_PROPERTY, version)

        client = Framework.createClient(properties)

        jmxProvider = jmx.Provider(client)
    except (Exception, JException), exc:
        logger.warnException("Failed to establish connection")
        jee_connection.reportError(Framework, str(exc), platform.getName())
예제 #5
0
 def __init__(self, name, description=None):
     '''@types: str, str
     @raise ValueError: Name is empty
     @raise ValueError: Destination type is empty
     '''
     jee.NamedJmxObject.__init__(self, name)
     jee.HasJndiName.__init__(self)
     jee.Resource.__init__(self)
     entity.HasOsh.__init__(self)
     self.messagesCurrentCount = entity.WeakNumeric(long)
     self.messagesPendingCount = entity.WeakNumeric(long)
     self.messagesReceivedCount = entity.WeakNumeric(long)
     self.consumersCurrentCount = entity.WeakNumeric(long)
     self.__durableSubscribers = []
     # jms.MqServer
     self.server = None
     self.__description = description
예제 #6
0
파일: sap.py 프로젝트: deezeesms/dd-git
 def __init__(self,
              release,
              patchNumber=None,
              patchLevel=None,
              description=None,
              kernelPatchLevel=None):
     r'@types: str, number, number, str'
     assert release
     self.release = release
     if not str(patchNumber).isdigit():
         patchNumber = None
     self.patchNumber = entity.WeakNumeric(int, patchNumber)
     if not str(patchLevel).isdigit():
         patchLevel = None
     self.patchLevel = entity.WeakNumeric(int, patchLevel)
     # correctly - its a version details
     self.description = description
     self.kernelPatchLevel = kernelPatchLevel
예제 #7
0
 def __init__(self,
              id_,
              sizeInMb=None,
              snapshotId=None,
              state=None,
              availabilityZoneName=None):
     r'@types: str, long, str, str, str'
     aws.HasId.__init__(self, id_)
     entity.HasOsh.__init__(self)
     self.sizeInMb = entity.WeakNumeric(long)
     if sizeInMb is not None:
         self.sizeInMb.set(sizeInMb)
     # EbsSnapshot ID from which this volume was created
     self.__snapshotId = snapshotId
     self.__state = state
     self.__availabilityZoneName = availabilityZoneName
예제 #8
0
파일: ec2.py 프로젝트: deezeesms/dd-git
 def __init__(self, id_, imageId, type=None, publicAddress=None,
              privateAddress=None,
              launchIndex=None,
              keyPairName=None,
              availabilityZoneName=None):
     r'@types: str, str, ec2.Address, ec2.Address, Number, str, str'
     Instance.__init__(self, id_, imageId)
     entity.HasOsh.__init__(self)
     self.publicAddress = publicAddress
     self.privateAddress = privateAddress
     self.type = type
     self.launchIndex = entity.WeakNumeric(int)
     if launchIndex is not None:
         self.launchIndex.set(launchIndex)
     self.__keyPairName = keyPairName
     self.__mappedDevices = []
     self.availabilityZoneName = availabilityZoneName
예제 #9
0
 def __init__(self,
              system,
              gwAddress,
              instancesCount=None,
              serviceName=None,
              comment=None):
     r''' DOM for the one section in the TREXRfcServer.ini file
     and represents RFC connection from RFC Instance
     @param system: has at least one instance
     @types: sap.System, str, int, str, str'''
     assert system and system.getInstances() and gwAddress
     self.system = system
     self.gwAddress = gwAddress
     self.instancesCound = entity.WeakNumeric(int)
     self.instancesCound.set(instancesCount)
     self.serviceName = serviceName
     self.comment = comment
예제 #10
0
 def __init__(self, name, description=None):
     '''@types: str, str
     @raise ValueError: Name is empty
     '''
     jee.NamedJmxObject.__init__(self, name)
     entity.HasOsh.__init__(self)
     self.messagesCurrentCount = entity.WeakNumeric(long)
     self.messagesHighCount = entity.WeakNumeric(long)
     self.messagesPendingCount = entity.WeakNumeric(long)
     self.messagesReceivedCount = entity.WeakNumeric(long)
     self.sessionPoolsCurrentCount = entity.WeakNumeric(long)
     self.sessionPoolsTotalCount = entity.WeakNumeric(long)
     self.__description = description
     self.__destinations = []
예제 #11
0
 def __init__(self, name, hostname=None):
     '''@types: str, str
     @raise ValueError: Name is empty
     @raise ValueError: Hostname is empty
     '''
     jee.GenericServer.__init__(self, name, hostname)
     entity.HasPort.__init__(self)
     jee.HasResources.__init__(self)
     jee.HasObjectName.__init__(self)
     self.messagesCurrentCount = entity.WeakNumeric(long)
     self.messagesHighCount = entity.WeakNumeric(long)
     self.messagesPendingCount = entity.WeakNumeric(long)
     self.messagesReceivedCount = entity.WeakNumeric(long)
     self.sessionPoolsCurrentCount = entity.WeakNumeric(long)
     self.sessionPoolsTotalCount = entity.WeakNumeric(long)
     # jms.Store
     self.store = None
예제 #12
0
파일: sap_jee.py 프로젝트: deezeesms/dd-git
 def __init__(self,
              serverId,
              name,
              objectName=None,
              port=None,
              applicationHomeDirPath=None,
              version=None,
              jvm=None):
     '''
     @types: str, str, str, int, str, str, jee.Jvm
     @raise ValueError: Incorrect value of Server ID specified
     '''
     if not (serverId and str(serverId).isdigit()):
         raise ValueError("Incorrect value of Server ID specified")
     jee.HasObjectName.__init__(self)
     self.id = serverId
     self.name = name
     objectName and self.setObjectName(objectName)
     self.port = entity.WeakNumeric(int)
     self.port.set(port)
     self.applicationHomeDirPath = applicationHomeDirPath
     self.version = version
     self.jvm = jvm
예제 #13
0
 def __init__(self, protocolObj, port = None):
     '@types: ProtocolObj, number'
     self.protocolObj = protocolObj
     self.portNumber = entity.WeakNumeric(int)
     self.portNumber.set(port)
     _HasProperties.__init__(self)
예제 #14
0
 def __init__(self, name):
     r'@types: str'
     jee.NamedJmxObject.__init__(self, name)
     self.data = None
     self.state = entity.WeakNumeric(int)
     self.endTimeAsLong = entity.WeakNumeric(long)