本文整理汇总了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)
示例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,
)
示例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)
示例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,
)
示例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)
示例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)
示例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
)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)