diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2019-02-27 11:52:21 -0500 |
---|---|---|
committer | Parker Berberian <pberberian@iol.unh.edu> | 2019-02-27 11:52:21 -0500 |
commit | c04dcca919cc89d04daa73d570a42134829a91d8 (patch) | |
tree | b9f64047a03f0efbfa56bafec334afedf137cfb9 /src/api/views.py | |
parent | e858a658aa9594949ec3b357253b34c7489d623d (diff) |
Update IPMI handling
provides a way for the lab to report IPMI info to the
dashboard. Necessary to allow the dashboard
to fully generate a PDF for OPNFV deploy
Change-Id: Ieef7a93e28b155ee90f3ffd3cfeedace332a6641
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/api/views.py')
-rw-r--r-- | src/api/views.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/api/views.py b/src/api/views.py index c72c85c..90f87d9 100644 --- a/src/api/views.py +++ b/src/api/views.py @@ -62,6 +62,17 @@ def lab_status(request, lab_name=""): return JsonResponse(lab_manager.get_status(), safe=False) +def update_host_bmc(request, lab_name="", host_id=""): + lab_token = request.META.get('HTTP_AUTH_TOKEN') + lab_manager = LabManagerTracker.get(lab_name, lab_token) + if request.method == "POST": + # update / create RemoteInfo for host + return JsonResponse( + lab_manager.update_host_remote_info(request.POST, host_id), + safe=False + ) + + def lab_profile(request, lab_name=""): lab_token = request.META.get('HTTP_AUTH_TOKEN') lab_manager = LabManagerTracker.get(lab_name, lab_token) |