summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/controllers/host.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/pybind/mgr/dashboard/controllers/host.py')
-rw-r--r--src/pybind/mgr/dashboard/controllers/host.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/controllers/host.py b/src/pybind/mgr/dashboard/controllers/host.py
new file mode 100644
index 00000000..e8518a14
--- /dev/null
+++ b/src/pybind/mgr/dashboard/controllers/host.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import
+
+from . import ApiController, RESTController
+from .. import mgr
+from ..security import Scope
+
+
+@ApiController('/host', Scope.HOSTS)
+class Host(RESTController):
+ def list(self):
+ return mgr.list_servers()