Esempio n. 1
0
def _discoverScs(client, system, systemOsh, clusterOsh):
    r'@types: BaseSapJmxClient, System, osh, osh -> oshv'
    try:
        clusterName = system.getName()
        hostname, msgEndpoint, enqEndpoint = _getScsEndpoints(client, clusterName)
        msgEndpoints = sap_jee_discoverer._resolvedEndpointAddress(msgEndpoint)
        enqEndpoints = sap_jee_discoverer._resolvedEndpointAddress(enqEndpoint)
        return sap_jee_discoverer.reportScsBasedOnMsgPort(system, hostname,
                                    msgEndpoints, systemOsh, clusterOsh, enqEndpoints)
    except Exception:
        logger.warnException("Failed to discover SCS instance")
    return ObjectStateHolderVector()
def reportScsBasedOnMsgPort(sapSystem, scsInstance, systemOsh, clusterOsh):
    r'''
    @type sapSystem: sap.System
    @type scsInstance: SapJEEMonitoringXmlParser.ScsInstance
    @rtype: ObjectStateHolderVector
    '''

    hostname = scsInstance.host.name
    msgEndpoint, enqEndpoint = _createEndpointsOfScs(scsInstance)
    msgEndpoints = sap_jee_discoverer._resolvedEndpointAddress(msgEndpoint)
    enqEndpoints = sap_jee_discoverer._resolvedEndpointAddress(enqEndpoint)
    return sap_jee_discoverer.reportScsBasedOnMsgPort(sapSystem, hostname,
                                    msgEndpoints, systemOsh, clusterOsh,
                                    enqEndpoints, True)