本文整理匯總了Python中common.OpTestIPMI.OpTestIPMI.set_system方法的典型用法代碼示例。如果您正苦於以下問題:Python OpTestIPMI.set_system方法的具體用法?Python OpTestIPMI.set_system怎麽用?Python OpTestIPMI.set_system使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類common.OpTestIPMI.OpTestIPMI
的用法示例。
在下文中一共展示了OpTestIPMI.set_system方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: objs
# 需要導入模塊: from common.OpTestIPMI import OpTestIPMI [as 別名]
# 或者: from common.OpTestIPMI.OpTestIPMI import set_system [as 別名]
def objs(self):
host = OpTestHost(self.args.host_ip,
self.args.host_user,
self.args.host_password,
self.args.bmc_ip,
self.output,
scratch_disk=self.args.host_scratch_disk,
proxy=self.args.proxy,
logfile=self.logfile,
check_ssh_keys=self.args.check_ssh_keys,
known_hosts_file=self.args.known_hosts_file)
if self.args.bmc_type in ['AMI', 'SMC']:
web = OpTestWeb(self.args.bmc_ip,
self.args.bmc_usernameipmi,
self.args.bmc_passwordipmi)
bmc = None
if self.args.bmc_type in ['AMI']:
ipmi = OpTestIPMI(self.args.bmc_ip,
self.args.bmc_usernameipmi,
self.args.bmc_passwordipmi,
host=host,
logfile=self.logfile,
)
bmc = OpTestBMC(ip=self.args.bmc_ip,
username=self.args.bmc_username,
password=self.args.bmc_password,
logfile=self.logfile,
ipmi=ipmi,
web=web,
check_ssh_keys=self.args.check_ssh_keys,
known_hosts_file=self.args.known_hosts_file
)
elif self.args.bmc_type in ['SMC']:
ipmi = OpTestSMCIPMI(self.args.bmc_ip,
self.args.bmc_usernameipmi,
self.args.bmc_passwordipmi,
logfile=self.logfile,
host=host,
)
bmc = OpTestSMC(ip=self.args.bmc_ip,
username=self.args.bmc_username,
password=self.args.bmc_password,
ipmi=ipmi,
web=web,
check_ssh_keys=self.args.check_ssh_keys,
known_hosts_file=self.args.known_hosts_file
)
self.op_system = OpTestSystem(
state=self.startState,
bmc=bmc,
host=host,
)
ipmi.set_system(self.op_system)
elif self.args.bmc_type in ['FSP']:
ipmi = OpTestIPMI(self.args.bmc_ip,
self.args.bmc_usernameipmi,
self.args.bmc_passwordipmi,
host=host,
logfile=self.logfile)
bmc = OpTestFSP(self.args.bmc_ip,
self.args.bmc_username,
self.args.bmc_password,
ipmi=ipmi,
)
self.op_system = OpTestFSPSystem(
state=self.startState,
bmc=bmc,
host=host,
)
ipmi.set_system(self.op_system)
elif self.args.bmc_type in ['OpenBMC']:
ipmi = OpTestIPMI(self.args.bmc_ip,
self.args.bmc_usernameipmi,
self.args.bmc_passwordipmi,
host=host,
logfile=self.logfile)
rest_api = HostManagement(self.args.bmc_ip,
self.args.bmc_username,
self.args.bmc_password)
bmc = OpTestOpenBMC(self.args.bmc_ip,
self.args.bmc_username,
self.args.bmc_password,
logfile=self.logfile,
ipmi=ipmi, rest_api=rest_api,
check_ssh_keys=self.args.check_ssh_keys,
known_hosts_file=self.args.known_hosts_file)
self.op_system = OpTestOpenBMCSystem(
host=host,
bmc=bmc,
state=self.startState,
)
bmc.set_system(self.op_system)
elif self.args.bmc_type in ['qemu']:
print repr(self.args)
bmc = OpTestQemu(self.args.qemu_binary,
self.args.flash_skiboot,
self.args.flash_kernel,
self.args.flash_initramfs,
ubuntu_cdrom=self.args.ubuntu_cdrom,
#.........這裏部分代碼省略.........
示例2: objs
# 需要導入模塊: from common.OpTestIPMI import OpTestIPMI [as 別名]
# 或者: from common.OpTestIPMI.OpTestIPMI import set_system [as 別名]
def objs(self):
if self.args.list_suites or self.args.list_tests:
return
# check to see if bmc_ip even pings to validate configuration parms
try:
self.util.PingFunc(self.args.bmc_ip, totalSleepTime=BMC_CONST.PING_RETRY_FOR_STABILITY)
except Exception as e:
# we are trying to catch sooner rather than later
# if we have reservations that need cleaned up
# otherwise we would have to try/except for cleanup
# in lots of places
# testcases.HelloWorld in CI fails if we throw this
# raise only if we have reservations to cleanup
if self.args.hostlocker is not None \
or self.args.aes is not None \
or self.args.aes_search_args is not None:
self.util.cleanup()
raise ParameterCheck(message="OpTestSystem PingFunc fails to "
"ping '{}', check your configuration and setup, see "
"Exception details: {}".format(self.args.bmc_ip, e))
try:
host = common.OpTestHost.OpTestHost(self.args.host_ip,
self.args.host_user,
self.args.host_password,
self.args.bmc_ip,
self.output,
scratch_disk=self.args.host_scratch_disk,
proxy=self.args.proxy,
check_ssh_keys=self.args.check_ssh_keys,
known_hosts_file=self.args.known_hosts_file,
conf=self)
if self.args.bmc_type in ['AMI', 'SMC']:
web = OpTestWeb(self.args.bmc_ip,
self.args.bmc_usernameipmi,
self.args.bmc_passwordipmi)
bmc = None
if self.args.bmc_type in ['AMI']:
ipmi = OpTestIPMI(self.args.bmc_ip,
self.args.bmc_usernameipmi,
self.args.bmc_passwordipmi,
host=host,
logfile=self.logfile,
)
bmc = OpTestBMC(ip=self.args.bmc_ip,
username=self.args.bmc_username,
password=self.args.bmc_password,
logfile=self.logfile,
ipmi=ipmi,
web=web,
check_ssh_keys=self.args.check_ssh_keys,
known_hosts_file=self.args.known_hosts_file
)
elif self.args.bmc_type in ['SMC']:
ipmi = OpTestSMCIPMI(self.args.bmc_ip,
self.args.bmc_usernameipmi,
self.args.bmc_passwordipmi,
logfile=self.logfile,
host=host,
)
bmc = OpTestSMC(ip=self.args.bmc_ip,
username=self.args.bmc_username,
password=self.args.bmc_password,
ipmi=ipmi,
web=web,
check_ssh_keys=self.args.check_ssh_keys,
known_hosts_file=self.args.known_hosts_file
)
self.op_system = common.OpTestSystem.OpTestSystem(
state=self.startState,
bmc=bmc,
host=host,
conf=self,
)
ipmi.set_system(self.op_system)
bmc.set_system(self.op_system)
elif self.args.bmc_type in ['FSP']:
ipmi = OpTestIPMI(self.args.bmc_ip,
None, # FSP does not use UID
self.args.bmc_passwordipmi,
host=host,
logfile=self.logfile)
bmc = OpTestFSP(self.args.bmc_ip,
self.args.bmc_username,
self.args.bmc_password,
ipmi=ipmi,
)
self.op_system = common.OpTestSystem.OpTestFSPSystem(
state=self.startState,
bmc=bmc,
host=host,
conf=self,
)
ipmi.set_system(self.op_system)
elif self.args.bmc_type in ['OpenBMC']:
ipmi = OpTestIPMI(self.args.bmc_ip,
self.args.bmc_usernameipmi,
self.args.bmc_passwordipmi,
#.........這裏部分代碼省略.........