mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-23 23:38:21 +00:00
Show a warning when starting ASA8
This commit is contained in:
parent
e9c2a76f43
commit
5617ddc4cc
@ -694,6 +694,8 @@ class QemuVM(BaseVM):
|
||||
log.info('QEMU VM "{name}" [{id}] has set the QEMU initrd path to {initrd}'.format(name=self._name,
|
||||
id=self._id,
|
||||
initrd=initrd))
|
||||
if "asa" in initrd:
|
||||
self.project.emit("log.warning", {"message": "Warning ASA 8 is not officialy supported by GNS3 and Cisco, we recommend to use ASAv. Depending of your hardware this could not work or you could be limited to one instance."})
|
||||
self._initrd = initrd
|
||||
|
||||
@property
|
||||
|
@ -460,6 +460,30 @@ def test_hdd_disk_image(vm, tmpdir):
|
||||
assert vm.hdd_disk_image == force_unix_path(str(tmpdir / "QEMU" / "test"))
|
||||
|
||||
|
||||
def test_initrd(vm, tmpdir):
|
||||
|
||||
vm.manager.config.set("Server", "images_path", str(tmpdir))
|
||||
|
||||
with patch("gns3server.modules.project.Project.emit") as mock:
|
||||
vm.initrd = str(tmpdir / "test")
|
||||
assert vm.initrd == force_unix_path(str(tmpdir / "test"))
|
||||
vm.initrd = "test"
|
||||
assert vm.initrd == force_unix_path(str(tmpdir / "QEMU" / "test"))
|
||||
assert not mock.called
|
||||
|
||||
|
||||
def test_initrd_asa(vm, tmpdir):
|
||||
|
||||
vm.manager.config.set("Server", "images_path", str(tmpdir))
|
||||
|
||||
with patch("gns3server.modules.project.Project.emit") as mock:
|
||||
vm.initrd = str(tmpdir / "asa842-initrd.gz")
|
||||
assert vm.initrd == force_unix_path(str(tmpdir / "asa842-initrd.gz"))
|
||||
vm.initrd = "asa842-initrd.gz"
|
||||
assert vm.initrd == force_unix_path(str(tmpdir / "QEMU" / "asa842-initrd.gz"))
|
||||
assert mock.called
|
||||
|
||||
|
||||
def test_options(linux_platform, vm):
|
||||
vm.kvm = False
|
||||
vm.options = "-usb"
|
||||
|
Loading…
Reference in New Issue
Block a user