Merge branch '2.0' into 2.1

This commit is contained in:
Julien Duponchelle committed 2017-03-07 11:16:05 +01:00
commit 6017ebbd97
335 files changed
+1000 -5777

No files matched your search

+1 -1
View File
@@ -533,7 +533,7 @@ class BaseNode:
server_config = self._manager.config.get_section_config("Server")
server_host = server_config.get("host")
if not self._ubridge_hypervisor:
if not self.ubridge:
self._ubridge_hypervisor = Hypervisor(self._project, self.ubridge_path, self.working_dir, server_host)
log.info("Starting new uBridge hypervisor {}:{}".format(self._ubridge_hypervisor.host, self._ubridge_hypervisor.port))
yield from self._ubridge_hypervisor.start()
+3 -1
View File
@@ -81,7 +81,9 @@ class Cloud(BaseNode):
"project_id": self.project.id,
"ports_mapping": self._ports_mapping,
"interfaces": host_interfaces,
"status": self.status}
"status": self.status,
"node_directory": self.working_dir
}
@property
def ports_mapping(self):
+2 -3
View File
@@ -935,6 +935,7 @@ class QemuVM(BaseNode):
except OSError as e:
raise QemuError("Could not start QEMU console {}\n".format(e))
@asyncio.coroutine
def _termination_callback(self, returncode):
"""
Called when the process has stopped.
@@ -944,9 +945,7 @@ class QemuVM(BaseNode):
if self.started:
log.info("QEMU process has stopped, return code: %d", returncode)
self.status = "stopped"
self._hw_virtualization = False
self._process = None
yield from self.stop()
# A return code of 1 seem fine on Windows
if returncode != 0 and (returncode != 1 or not sys.platform.startswith("win")):
self.project.emit("log.error", {"message": "QEMU process has stopped, return code: {}\n{}".format(returncode, self.read_stdout())})
+1
View File
@@ -275,6 +275,7 @@ class Controller:
@settings.setter
def settings(self, val):
self._settings = val
self.save()
self.notification.emit("settings.updated", val)
@asyncio.coroutine
+1 -1
View File
@@ -293,7 +293,7 @@ class Project:
name = base_name.format(number, id=number, name="Node")
except KeyError as e:
raise aiohttp.web.HTTPConflict(text="{" + e.args[0] + "} is not a valid replacement string in the node name")
except ValueError as e:
except (ValueError, IndexError) as e:
raise aiohttp.web.HTTPConflict(text="{} is not a valid replacement string in the node name".format(base_name))
if name not in self._allocated_node_names:
self._allocated_node_names.add(name)
+5 -1
View File
@@ -142,7 +142,11 @@ def load_topology(path):
if topo["revision"] < 8:
topo = _convert_2_0_0(topo, path)
_check_topology_schema(topo)
try:
_check_topology_schema(topo)
except aiohttp.web.HTTPConflict as e:
log.error("Can't load the topology %s", path)
raise e
if changed:
with open(path, "w+", encoding="utf-8") as f:
+1 -1
View File
@@ -54,7 +54,7 @@ class CrashReport:
Report crash to a third party service
"""
DSN = "sync+https://83564b27a6f6475488a3eb74c78f1760:ed5ac7c6d3f7428d960a84da98450b69@sentry.io/38482"
DSN = "sync+https://5b834577b69a4b77b112f020412237b5:b648d289253740daad5c08a939ceffd7@sentry.io/38482"
if hasattr(sys, "frozen"):
cacert = get_resource("cacert.pem")
if cacert is not None and os.path.isfile(cacert):
+5 -1
View File
@@ -75,7 +75,7 @@ CLOUD_CREATE_SCHEMA = {
{"$ref": "#/definitions/HostInterfaces"}
]},
]
},
}
},
"additionalProperties": False,
"required": ["name"]
@@ -123,6 +123,10 @@ CLOUD_OBJECT_SCHEMA = {
]},
]
},
"node_directory": {
"description": "Path to the VM working directory",
"type": "string"
},
"status": {
"description": "Node status",
"enum": ["started", "stopped", "suspended"]
+1 -1
View File
@@ -487,7 +487,7 @@ VM_OBJECT_SCHEMA = {
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"node_directory": {
"decription": "Path to the vm working directory",
"description": "Path to the vm working directory",
"type": "string"
},
"project_id": {
+1 -1
View File
@@ -503,7 +503,7 @@ QEMU_OBJECT_SCHEMA = {
"enum": ["c", "d", "n", "cn", "cd"]
},
"node_directory": {
"decription": "Path to the VM working directory",
"description": "Path to the VM working directory",
"type": "string"
},
"ram": {
+1 -1
View File
@@ -124,7 +124,7 @@ VBOX_OBJECT_SCHEMA = {
"enum": ["started", "stopped", "suspended"]
},
"node_directory": {
"decription": "Path to the VM working directory",
"description": "Path to the VM working directory",
"type": ["string", "null"]
},
"headless": {
+1 -1
View File
@@ -103,7 +103,7 @@ VMWARE_OBJECT_SCHEMA = {
"enum": ["started", "stopped", "suspended"]
},
"node_directory": {
"decription": "Path to the node working directory",
"description": "Path to the node working directory",
"type": ["string", "null"]
},
"project_id": {
+1 -1
View File
@@ -97,7 +97,7 @@ VPCS_OBJECT_SCHEMA = {
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"node_directory": {
"decription": "Path to the VM working directory",
"description": "Path to the VM working directory",
"type": "string"
},
"status": {