This commit is contained in:
pvizeli 2017-03-31 14:46:03 +02:00
parent 0236611676
commit c9b561a021
2 changed files with 3 additions and 2 deletions

View File

@ -24,12 +24,12 @@ class APIHost(object):
@api_process_hostcontroll
def reboot(self, request):
"""Reboot host."""
return self.host_controll.reboot():
return self.host_controll.reboot()
@api_process_hostcontroll
def shutdown(self, request):
"""Poweroff host."""
return self.host_controll.shutdown():
return self.host_controll.shutdown()
@api_process_hostcontroll
def network_info(self, request):

View File

@ -11,6 +11,7 @@ _LOGGER = logging.getLogger(__name__)
def api_process_hostcontroll(method):
"""Wrap HostControll calls to rest api."""
async def wrap_hostcontroll(api, *args, **kwargs):
"""Return host information."""
if not api.host_controll.active: