mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-26 08:48:11 +00:00
Do not stop saving IOS router or IOU configs when there is an exception while a project is committed.
This commit is contained in:
parent
815b7d226c
commit
c7ea8517a1
@ -213,7 +213,11 @@ class Dynamips(BaseManager):
|
|||||||
# save the configs when the project is committed
|
# save the configs when the project is committed
|
||||||
for vm in self._vms.copy().values():
|
for vm in self._vms.copy().values():
|
||||||
if vm.project.id == project.id:
|
if vm.project.id == project.id:
|
||||||
|
try:
|
||||||
yield from vm.save_configs()
|
yield from vm.save_configs()
|
||||||
|
except DynamipsError as e:
|
||||||
|
log.warning(e)
|
||||||
|
continue
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def dynamips_path(self):
|
def dynamips_path(self):
|
||||||
|
@ -26,6 +26,9 @@ from ..base_manager import BaseManager
|
|||||||
from .iou_error import IOUError
|
from .iou_error import IOUError
|
||||||
from .iou_vm import IOUVM
|
from .iou_vm import IOUVM
|
||||||
|
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class IOU(BaseManager):
|
class IOU(BaseManager):
|
||||||
|
|
||||||
@ -79,7 +82,11 @@ class IOU(BaseManager):
|
|||||||
# save the configs when the project is committed
|
# save the configs when the project is committed
|
||||||
for vm in self._vms.copy().values():
|
for vm in self._vms.copy().values():
|
||||||
if vm.project.id == project.id:
|
if vm.project.id == project.id:
|
||||||
|
try:
|
||||||
vm.save_configs()
|
vm.save_configs()
|
||||||
|
except IOUError as e:
|
||||||
|
log.warning(e)
|
||||||
|
continue
|
||||||
|
|
||||||
def get_application_id(self, vm_id):
|
def get_application_id(self, vm_id):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user