1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 17:28:08 +00:00

Fix issue with "usage" variable for Dynamips VMs. Fixes #1495

This commit is contained in:
grossmj 2019-01-12 12:13:22 +07:00
parent b68c0cf176
commit f0ffb07165
4 changed files with 18 additions and 10 deletions

View File

@ -492,6 +492,10 @@ class Dynamips(BaseManager):
if sparse_memory_support is False: if sparse_memory_support is False:
await vm.set_sparsemem(False) await vm.set_sparsemem(False)
usage = settings.get("usage")
if usage and usage != vm.usage:
vm.usage = usage
# update the configs if needed # update the configs if needed
await self.set_vm_configs(vm, settings) await self.set_vm_configs(vm, settings)

View File

@ -188,7 +188,6 @@ class Router(BaseNode):
else: else:
router_info["wic" + str(wic_slot_number)] = None router_info["wic" + str(wic_slot_number)] = None
return router_info return router_info
def _memory_changed(self, path): def _memory_changed(self, path):

View File

@ -30,6 +30,11 @@ DYNAMIPS_TEMPLATE_PROPERTIES = {
"type": "string", "type": "string",
"minLength": 1 "minLength": 1
}, },
"usage": {
"description": "How to use the Dynamips VM",
"type": "string",
"default": ""
},
"mmap": { "mmap": {
"description": "MMAP feature", "description": "MMAP feature",
"type": "boolean", "type": "boolean",