示例#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)
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)
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)
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, getProps, InventoryUtils.STEP_REQUIRES_CONNECTION,
        InventoryUtils.STEP_REQUIRES_LOCK)
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)
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)
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)
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)
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)