Web interface for debbuging controller

This commit is contained in:
Julien Duponchelle committed 2016-03-15 11:32:10 +01:00
1 parent 7a095478fe
commit c0e452133d
8 files changed
+151 -8

No files matched your search

+14
View File
@@ -93,6 +93,13 @@ class Project:
except KeyError:
raise aiohttp.web.HTTPNotFound(text="VM ID {} doesn't exist".format(vm_id))
@property
def vms(self):
"""
:returns: Dictionnary of the VMS
"""
return self._vms
@asyncio.coroutine
def addLink(self):
"""
@@ -111,6 +118,13 @@ class Project:
except KeyError:
raise aiohttp.web.HTTPNotFound(text="Link ID {} doesn't exist".format(link_id))
@property
def links(self):
"""
:returns: Dictionnary of the Links
"""
return self._links
@asyncio.coroutine
def close(self):
for hypervisor in self._hypervisors:
+12
View File
@@ -52,6 +52,10 @@ class VM:
def id(self):
return self._id
@property
def name(self):
return self._name
@property
def vm_type(self):
return self._vm_type
@@ -76,6 +80,14 @@ class VM:
def hypervisor(self):
return self._hypervisor
@property
def host(self):
"""
:returns: Domain or ip for console connection
"""
return self._hypervisor.host
@asyncio.coroutine
def create(self):
data = copy.copy(self._properties)