本文整理汇总了Python中config.configmanager.ConfigManager.get_firmware_property方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigManager.get_firmware_property方法的具体用法?Python ConfigManager.get_firmware_property怎么用?Python ConfigManager.get_firmware_property使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类config.configmanager.ConfigManager
的用法示例。
在下文中一共展示了ConfigManager.get_firmware_property方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from config.configmanager import ConfigManager [as 别名]
# 或者: from config.configmanager.ConfigManager import get_firmware_property [as 别名]
def run(self):
"""
Instantiate a NetworkCtrl and copy the firmware via SSH to the Router(/tmp/<firmware_name>.bin).
"""
logging.info("%sSysupdate Firmware for Router(" + str(self.router.id) + ") ...", LoggerSetup.get_log_deep(1))
firmware_handler = FirmwareHandler(str(ConfigManager.get_firmware_property('URL')))
firmware = firmware_handler.get_firmware(self.router.model,
str(ConfigManager.get_firmware_property('Release_Model')),
bool(ConfigManager.get_firmware_property('Download_All')))
self.router.firmware = firmware
示例2: test_firmware_property
# 需要导入模块: from config.configmanager import ConfigManager [as 别名]
# 或者: from config.configmanager.ConfigManager import get_firmware_property [as 别名]
def test_firmware_property(self):
"""
Tests the firmware config with property
:return: Tests results
"""
data = ConfigManager.get_firmware_property("Firmware_Version")
self.assertEqual(data, "0.7.3", "Firmware: Wrong property")