summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/infrastructure/resource_management/racks/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstack_dashboard/dashboards/infrastructure/resource_management/racks/views.py')
-rw-r--r--openstack_dashboard/dashboards/infrastructure/resource_management/racks/views.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/openstack_dashboard/dashboards/infrastructure/resource_management/racks/views.py b/openstack_dashboard/dashboards/infrastructure/resource_management/racks/views.py
index b3bf1872..8b66bc11 100644
--- a/openstack_dashboard/dashboards/infrastructure/resource_management/racks/views.py
+++ b/openstack_dashboard/dashboards/infrastructure/resource_management/racks/views.py
@@ -241,3 +241,13 @@ def node_health(request, rack_id=None):
res = {'data': data}
return HttpResponse(simplejson.dumps(res),
mimetype="application/json")
+
+
+def check_state(request, rack_id=None):
+ rack = api.tuskar.Rack.get(request, rack_id)
+
+ res = {'state': rack.state}
+
+ return HttpResponse(
+ simplejson.dumps(res),
+ mimetype="application/json")