mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-26 00:38:10 +00:00
Merge pull request #408 from GNS3/asa8_warning
Show a warning when starting ASA8
This commit is contained in:
commit
cd9cb3eb6a
@ -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,
|
log.info('QEMU VM "{name}" [{id}] has set the QEMU initrd path to {initrd}'.format(name=self._name,
|
||||||
id=self._id,
|
id=self._id,
|
||||||
initrd=initrd))
|
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
|
self._initrd = initrd
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -460,6 +460,30 @@ def test_hdd_disk_image(vm, tmpdir):
|
|||||||
assert vm.hdd_disk_image == force_unix_path(str(tmpdir / "QEMU" / "test"))
|
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):
|
def test_options(linux_platform, vm):
|
||||||
vm.kvm = False
|
vm.kvm = False
|
||||||
vm.options = "-usb"
|
vm.options = "-usb"
|
||||||
|
Loading…
Reference in New Issue
Block a user