当前位置: 首页>>代码示例>>Python>>正文


Python InventoryUtils.executeStep方法代码示例

本文整理汇总了Python中InventoryUtils.executeStep方法的典型用法代码示例。如果您正苦于以下问题:Python InventoryUtils.executeStep方法的具体用法?Python InventoryUtils.executeStep怎么用?Python InventoryUtils.executeStep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在InventoryUtils的用法示例。


在下文中一共展示了InventoryUtils.executeStep方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
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)
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:30,代码来源:DDMiConnect.py

示例2: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
def StepMain(Framework):
    InventoryUtils.executeStep(
        Framework,
        checkUpgradeRequired,
        InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION,
        InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK,
    )
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:9,代码来源:CheckUpgradeRequired.py

示例3: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
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)
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:11,代码来源:InitMigrate.py

示例4: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
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,
    )
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:12,代码来源:ScannerConnect.py

示例5: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
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)
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:26,代码来源:CheckInstallErrorCode.py

示例6: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, removeLocalScanLog, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:4,代码来源:RemoveLocalScanLog.py

示例7: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
def StepMain(Framework):
    InventoryUtils.executeStep(
        Framework, downloadScanFile, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK
    )
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:6,代码来源:DownloadScanFile.py

示例8: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
def StepMain(Framework):
    AgentUtils.prepareFrameworkForShellOrAgentConnect(Framework)

    InventoryUtils.executeStep(Framework, connectToRemoteNode, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:6,代码来源:ShellOrAgentConnect.py

示例9: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
def StepMain(Framework):
	InventoryUtils.executeStep(Framework, checkScanFileExistance, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK)
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:4,代码来源:CheckScanFileExistence.py

示例10: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, checkAgentInstalled, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:4,代码来源:CheckAgentInstalled.py

示例11: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
def StepMain(Framework):
	InventoryUtils.executeStep(Framework, removeScanData, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_REQUIRES_LOCK, InventoryUtils.STEP_DONOT_DISCONNECT_ON_FAILURE)
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:4,代码来源:RemoveScanData.py

示例12: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, getProps, InventoryUtils.STEP_REQUIRES_CONNECTION,
        InventoryUtils.STEP_REQUIRES_LOCK)
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:5,代码来源:GetDDMIConfiguration.py

示例13: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
def StepMain(Framework):
	InventoryUtils.executeStep(Framework, acquireScannerLock, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:4,代码来源:LockScannerNode.py

示例14: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
def StepMain(Framework):
    InventoryUtils.executeStep(Framework, RemoveAgentData, InventoryUtils.STEP_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:4,代码来源:RemoveAgentData.py

示例15: StepMain

# 需要导入模块: import InventoryUtils [as 别名]
# 或者: from InventoryUtils import executeStep [as 别名]
def StepMain(Framework):
	InventoryUtils.executeStep(Framework, checkEnrichedFileExisted, InventoryUtils.STEP_DOESNOT_REQUIRES_CONNECTION, InventoryUtils.STEP_DOESNOT_REQUIRES_LOCK)
开发者ID:ddonnelly19,项目名称:dd-git,代码行数:4,代码来源:WaitEnricherProcess.py


注:本文中的InventoryUtils.executeStep方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。