mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Disallow to rename a running node. Fixes https://github.com/GNS3/gns3-gui/issues/2499
This commit is contained in:
1 parent
831ee5f468
commit
12732aaf83
2 files changed
+4
-4
No files matched your search
@@ -401,8 +401,8 @@ class Node:
|
||||
if prop == "properties":
|
||||
compute_properties = kwargs[prop]
|
||||
else:
|
||||
if prop == "name" and self.node_type == "dynamips" and self.status == "started":
|
||||
raise aiohttp.web.HTTPConflict(text="Sorry, it is not possible rename of a Dynamips node that is already powered on")
|
||||
if prop == "name" and self.status == "started" and self._node_type not in ("cloud", "nat", "ethernet_switch", "ethernet_hub", "frame_relay_switch", "atm_switch"):
|
||||
raise aiohttp.web.HTTPConflict(text="Sorry, it is not possible to rename a node that is already powered on")
|
||||
setattr(self, prop, kwargs[prop])
|
||||
|
||||
if compute_properties and "custom_adapters" in compute_properties:
|
||||
|
||||
Reference in new issue
Block a user