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, )
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): 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): Framework.setProperty( InventoryUtils.STATE_PROPERTY_PLATFORM_CONFIGFILE, CollectorsConstants.SCANNERSBYPLATFORM_FILE_NAME ) InventoryUtils.executeStep( Framework, connectToRemoteNode, InventoryUtils.STEP_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)
def StepMain(Framework): InventoryUtils.executeStep(Framework, removeLocalScanLog, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
def StepMain(Framework): InventoryUtils.executeStep(Framework, releaseScannerLock, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
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)
def StepMain(Framework): InventoryUtils.executeStep(Framework, RemoveAgentData, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
def StepMain(Framework): InventoryUtils.executeStep(Framework, UDUniqueIDCheck, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_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)
def StepMain(Framework): InventoryUtils.executeStep(Framework, reportDeleteConnectedShell, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
def StepMain(Framework): InventoryUtils.executeStep(Framework, checkNonNativeAgentInstalled, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
def StepMain(Framework): InventoryUtils.executeStep(Framework, CheckAgentInstalledBeforeInstallation, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
def StepMain(Framework): InventoryUtils.executeStep(Framework, checkAgentInstalled, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
def StepMain(Framework): InventoryUtils.executeStep(Framework, checkEnrichedFileExisted, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
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)
def StepMain(Framework): InventoryUtils.executeStep(Framework, checkOSVersion, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
def StepMain(Framework): InventoryUtils.executeStep(Framework, downloadScanFile, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK)
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, acquireScannerLock, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
def StepMain(Framework): InventoryUtils.executeStep( Framework, downloadScanFile, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK )
def StepMain(Framework): InventoryUtils.executeStep(Framework, InstallAgentBasicResources, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK)
def StepMain(Framework): InventoryUtils.executeStep(Framework, upgradeScanner, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK)
def StepMain(Framework): InventoryUtils.executeStep(Framework, checkAgentUnInstalledRoutine, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
def StepMain(Framework): InventoryUtils.executeStep(Framework, installAgent, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK)
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)
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)