示例#1
0
                Framework.deleteObject(agentOsh)
                Framework.flushObjects()

                Framework.clearGlobalState(ip)
            if not OSHVResult.size():
                logger.warn(
                    'Discovery failed, though shell object will be created')
                hostOsh = modeling.createHostOSH(ip, filter_client_ip=True)
                if hostOsh:
                    languageName = None
                    langBund = Framework.getEnvironmentInformation().getBundle(
                        'langNetwork', languageName)
                    shellOsh = HostConnectionByShell.createShellObj(
                        client,
                        client,
                        ip,
                        langBund,
                        languageName,
                        codepage,
                        connectedShellCredId=connectedOSCredentialID)
                    shellOsh.setContainer(hostOsh)

                    OSHVResult.add(shellOsh)
                else:
                    logger.warn(
                        'Failed to create node and shell since IP is of a Client range type, not enough data for reconciliation.'
                    )

    return client, shell, warningsList, errorsList, hostOsh


def doDiscovery(Framework, shell, client, ip, codepage,
示例#2
0
                agentOsh.setAttribute('data_name', ClientsConsts.DDM_AGENT_PROTOCOL_NAME)

                #agentOsh.setAttribute('application_port', shell.getPort())
                agentOsh.setContainer(modeling.createHostOSH(ip))
                Framework.deleteObject(agentOsh)
                Framework.flushObjects()

                Framework.clearGlobalState(ip)
            if not OSHVResult.size():
                logger.warn('Discovery failed, though shell object will be created')
                hostOsh = modeling.createHostOSH(ip, filter_client_ip=True)
                if hostOsh:
                    languageName = None
                    langBund = Framework.getEnvironmentInformation().getBundle('langNetwork', languageName)
                    shellOsh = HostConnectionByShell.createShellObj(client, client, ip, langBund, languageName,
                                                                    codepage,
                                                                    connectedShellCredId=connectedOSCredentialID)
                    shellOsh.setContainer(hostOsh)

                    OSHVResult.add(shellOsh)
                else:
                    logger.warn(
                        'Failed to create node and shell since IP is of a Client range type, not enough data for reconciliation.')

    return client, shell, warningsList, errorsList, hostOsh


def doDiscovery(Framework, shell, client, ip, codepage, connectedOSCredentialID,
                credentialId, warningsList, errorsList):
    clientType = client.getClientType()
    if clientType == shellutils.PowerShell.PROTOCOL_TYPE: