예제 #1
0
def StepMain(Framework):
    # if we have shell credentials and we are able to connect with them then connect otherwise we should connect with agent

    ip = Framework.getDestinationAttribute('ip_address')
    domain = Framework.getDestinationAttribute('ip_domain')
    codepage = Framework.getCodePage()

    allShellProtocols = []
    allShellCredentials = []
    allShellIps = []
    allShellCodePages = []

    protocols = netutils.getAvailableProtocols(Framework, ClientsConsts.DDM_AGENT_PROTOCOL_NAME, ip, domain)

    for protocol in protocols:

        allShellProtocols.append(ClientsConsts.DDM_AGENT_PROTOCOL_NAME)
        allShellCredentials.append(protocol)
        allShellIps.append(ip)
        allShellCodePages.append(codepage)

    logger.debug('Will going to attempt to connect in this order: ', allShellCredentials)
    Framework.setProperty(InventoryUtils.STATE_PROPERTY_CONNECTION_PROTOCOLS, allShellProtocols)
    Framework.setProperty(InventoryUtils.STATE_PROPERTY_CONNECTION_CREDENIALS, allShellCredentials)
    Framework.setProperty(InventoryUtils.STATE_PROPERTY_CONNECTION_IPS, allShellIps)
    Framework.setProperty(InventoryUtils.STATE_PROPERTY_CONNECTION_CODEPAGES, allShellCodePages)

    InventoryUtils.executeStep(Framework, connectToRemoteNode, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #2
0
def StepMain(Framework):
    InventoryUtils.executeStep(
        Framework,
        checkUpgradeRequired,
        InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION,
        InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK,
    )
예제 #3
0
def StepMain(Framework):
    skipStepReason = Framework.getProperty(
        InventoryUtils.STEP_SKIP_ALL_STEPS_PROPERTY)
    if skipStepReason is not None:
        logger.debug('Skipped by request to skip all steps, reason:',
                     skipStepReason)
        Framework.setStepExecutionStatus(WorkflowStepStatus.SUCCESS)
        return
    skipStepReason = Framework.getProperty(
        InventoryUtils.generateSkipStep(
            Framework.getState().getCurrentStepName()))
    if skipStepReason is not None:
        logger.debug('Step skipped, reason:', skipStepReason)
        Framework.setStepExecutionStatus(WorkflowStepStatus.SUCCESS)
        return

    if not Framework.getProperty(FIRST_TRY_CHECK_ERROR_CODE):
        # we don't want immediately check whether agent installation successful or not,
        # since for sure it is not. go to parking to let others to install
        logger.debug(
            'UD agent install command just run, will check result code after parking'
        )
        Framework.setProperty(FIRST_TRY_CHECK_ERROR_CODE,
                              FIRST_TRY_CHECK_ERROR_CODE)
        Framework.setStepExecutionStatus(WorkflowStepStatus.FAILURE)
        return
    else:
        logger.debug(
            'Going to check whether agent installation successful or not')
    InventoryUtils.executeStep(Framework, CheckInstallErrorCode,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #4
0
def StepMain(Framework):
    Framework.setProperty(InventoryUtils.STATE_PROPERTY_PLATFORM_CONFIGFILE,
        CollectorsConstants.AGENTSSBYPLATFORM_FILE_NAME)

    Framework.setProperty(InventoryUtils.STATE_PROPERTY_IS_MIGRATE, String('true'))
    Framework.setProperty(InventoryUtils.STATE_PROPERTY_IS_MIGRATE_JOB, String('true'))

    InventoryUtils.executeStep(Framework, initMigrate, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION,
        InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #5
0
def StepMain(Framework):
    Framework.setProperty(
        InventoryUtils.STATE_PROPERTY_PLATFORM_CONFIGFILE, CollectorsConstants.SCANNERSBYPLATFORM_FILE_NAME
    )
    InventoryUtils.executeStep(
        Framework,
        connectToRemoteNode,
        InventoryUtils.STEP_REQUIRES_CONNECTION,
        InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK,
    )
예제 #6
0
def StepMain(Framework):
    Framework.setProperty(InventoryUtils.STATE_PROPERTY_PLATFORM_CONFIGFILE,
                          CollectorsConstants.AGENTSSBYPLATFORM_FILE_NAME)

    Framework.setProperty(InventoryUtils.STATE_PROPERTY_IS_MIGRATE,
                          String('true'))
    Framework.setProperty(InventoryUtils.STATE_PROPERTY_IS_MIGRATE_JOB,
                          String('true'))

    InventoryUtils.executeStep(Framework, initMigrate,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #7
0
def StepMain(Framework):
    skipStepReason = Framework.getProperty(InventoryUtils.STEP_SKIP_ALL_STEPS_PROPERTY)
    if skipStepReason is not None:
        logger.debug('Skipped by request to skip all steps, reason:', skipStepReason)
        Framework.setStepExecutionStatus(WorkflowStepStatus.SUCCESS)
        return
    skipStepReason = Framework.getProperty(InventoryUtils.generateSkipStep(Framework.getState().getCurrentStepName()))
    if skipStepReason is not None:
        logger.debug('Step skipped, reason:', skipStepReason)
        Framework.setStepExecutionStatus(WorkflowStepStatus.SUCCESS)
        return

    if not Framework.getProperty(FIRST_TRY_CHECK_ERROR_CODE):
        # we don't want immediately check whether agent installation successful or not,
        # since for sure it is not. go to parking to let others to install
        logger.debug('UD agent install command just run, will check result code after parking')
        Framework.setProperty(FIRST_TRY_CHECK_ERROR_CODE, FIRST_TRY_CHECK_ERROR_CODE)
        Framework.setStepExecutionStatus(WorkflowStepStatus.FAILURE)
        return
    else:
        logger.debug('Going to check whether agent installation successful or not')
    InventoryUtils.executeStep(Framework, CheckInstallErrorCode,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #8
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, getProps, InventoryUtils.STEP_REQUIRES_CONNECTION,
        InventoryUtils.STEP_REQUIRES_LOCK)
예제 #9
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, ensureUninstall,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #10
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, removeLocalScanLog, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #11
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, releaseScannerLock,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #12
0
def StepMain(Framework):
    AgentUtils.prepareFrameworkForShellOrAgentConnect(Framework)

    InventoryUtils.executeStep(Framework, connectToRemoteNode, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #13
0
def StepMain(Framework):
	InventoryUtils.executeStep(Framework, checkScanFileExistance, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK)
예제 #14
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, RemoveAgentData,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #15
0
def StepMain(Framework):
	InventoryUtils.executeStep(Framework, UDUniqueIDCheck, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK)
예제 #16
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, UDUniqueIDCheck,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_REQUIRES_LOCK)
예제 #17
0
def StepMain(Framework):
    Framework.setProperty(InventoryUtils.STATE_PROPERTY_PLATFORM_CONFIGFILE,
                          CollectorsConstants.SCANNERSBYPLATFORM_FILE_NAME)
    InventoryUtils.executeStep(Framework, processManuallyEnrichedScanFile,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #18
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, reportDeleteConnectedShell, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
def StepMain(Framework):
	Framework.setProperty(InventoryUtils.STATE_PROPERTY_PLATFORM_CONFIGFILE, CollectorsConstants.SCANNERSBYPLATFORM_FILE_NAME)
	InventoryUtils.executeStep(Framework, processManuallyEnrichedScanFile, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #20
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, checkNonNativeAgentInstalled,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #21
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, reportDeleteConnectedShell,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #22
0
def StepMain(Framework):
	InventoryUtils.executeStep(Framework, ensureUninstall, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #23
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, CheckAgentInstalledBeforeInstallation,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #24
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, checkAgentInstalled, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #25
0
def StepMain(Framework):
	InventoryUtils.executeStep(Framework, checkEnrichedFileExisted, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #26
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, checkUpgradeStatus,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #27
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, restoreSWUtilizationConfiguration,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #28
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, checkOSVersion,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #29
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, downloadScanFile, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK)
예제 #30
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, removeScanData,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_REQUIRES_LOCK,
                               InventoryUtils.STEP_DONOT_DISCONNECT_ON_FAILURE)
예제 #31
0
def StepMain(Framework):
	InventoryUtils.executeStep(Framework, acquireScannerLock, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #32
0
def StepMain(Framework):
    InventoryUtils.executeStep(
        Framework, downloadScanFile, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK
    )
예제 #33
0
def StepMain(Framework):
    AgentUtils.prepareFrameworkForShellOrAgentConnect(Framework)

    InventoryUtils.executeStep(Framework, connectToRemoteNode,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #34
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, checkScanFileExistance,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_REQUIRES_LOCK)
예제 #35
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, RemoveAgentData, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #36
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, InstallAgentBasicResources,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_REQUIRES_LOCK)
예제 #37
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, removeLocalScanLog,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #38
0
def StepMain(Framework):
	InventoryUtils.executeStep(Framework, upgradeScanner, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK)
예제 #39
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, checkAgentUnInstalledRoutine,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #40
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, installAgent, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK)
예제 #41
0
def StepMain(Framework):
    Framework.setProperty(InventoryUtils.STATE_PROPERTY_PLATFORM_CONFIGFILE,
                          CollectorsConstants.AGENTSSBYPLATFORM_FILE_NAME)
    InventoryUtils.executeStep(Framework, connectToRemoteNode,
                               InventoryUtils.STEP_REQUIRES_CONNECTION,
                               InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #42
0
def StepMain(Framework):
    Framework.setProperty(InventoryUtils.STATE_PROPERTY_PLATFORM_CONFIGFILE, CollectorsConstants.AGENTSSBYPLATFORM_FILE_NAME)
    InventoryUtils.executeStep(Framework, initUpgrade, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #43
0
def StepMain(Framework):
	InventoryUtils.executeStep(Framework, removeScanData, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK, InventoryUtils.STEP_DONOT_DISCONNECT_ON_FAILURE)
def StepMain(Framework):
	InventoryUtils.executeStep(Framework, restoreSWUtilizationConfiguration, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
예제 #45
0
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, checkOSVersion, InventoryUtils.STEP_REQUIRES_CONNECTION,
        InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)