本文整理匯總了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")