mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-17 06:48:18 +00:00
Working dedicated appliance management API. Ref https://github.com/GNS3/gns3-server/issues/1427
This commit is contained in:
@ -465,14 +465,14 @@ class Project:
|
||||
Create a node from an appliance
|
||||
"""
|
||||
try:
|
||||
template = self.controller.appliances[appliance_id].settings
|
||||
template = copy.deepcopy(self.controller.appliances[appliance_id].settings)
|
||||
except KeyError:
|
||||
msg = "Appliance {} doesn't exist".format(appliance_id)
|
||||
log.error(msg)
|
||||
raise aiohttp.web.HTTPNotFound(text=msg)
|
||||
template["x"] = x
|
||||
template["y"] = y
|
||||
node_type = template.pop("node_type")
|
||||
node_type = template.pop("appliance_type")
|
||||
compute = self.controller.get_compute(template.pop("compute_id", compute_id))
|
||||
name = template.pop("name")
|
||||
default_name_format = template.pop("default_name_format", "{name}-{0}")
|
||||
|
Reference in New Issue
Block a user