def test_flash_firmware(self): print("Test Router_Flash_Firmware") router = self._create_router() print("Download/Import firmware-image from UpdateServer/PI ...") # Download firmare-image from UpdateServer sysupdate = Sysupdate(router) sysupdate.start() sysupdate.join() # NVAssisten nv_assist = NVAssistent("eth0") nv_assist.create_namespace_vlan(router) # Set netns for the current process netns.setns(router.namespace_name) # The IP where the Router can download the firmware image (should be the frameworks IP) web_server_ip = nv_assist.get_ip_address(router.namespace_name, router.vlan_iface_name)[0] try: # Copy firmware-image to the Router (/tmp/image) print("Copy firmware-image to Router ...") sysupgrade = Sysupgrade(router, n=True, web_server_ip=web_server_ip, debug=True) sysupgrade.start() sysupgrade.join() except Exception: raise finally: nv_assist.close()