diff options
author | Lukasz Rajewski <lukasz.rajewski@orange.com> | 2021-09-28 21:42:24 +0200 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@orange.com> | 2021-09-28 21:43:02 +0200 |
commit | dc62323aa7f6782d69c7ac6509eb270e86ef31bd (patch) | |
tree | 2f764f7816c44d9a62a0fe72b473ce5627ed89a9 /src/k8splugin/api/confighandler.go | |
parent | 5aa8c4de9fd620ef42ac5bf73b62f76d80e713a0 (diff) |
Fix for config resources delete with instance delete
Issue-ID: MULTICLOUD-1332
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com>
Change-Id: I08a3d623d6f12777d88a168af0cb804c63104887
Diffstat (limited to 'src/k8splugin/api/confighandler.go')
-rw-r--r-- | src/k8splugin/api/confighandler.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/k8splugin/api/confighandler.go b/src/k8splugin/api/confighandler.go index c2236378..b0a8f851 100644 --- a/src/k8splugin/api/confighandler.go +++ b/src/k8splugin/api/confighandler.go @@ -176,6 +176,7 @@ func (h rbConfigHandler) updateHandler(w http.ResponseWriter, r *http.Request) { func (h rbConfigHandler) rollbackHandler(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) instanceID := vars["instID"] + cfgName := vars["cfgname"] if r.Body == nil { http.Error(w, "Empty body", http.StatusBadRequest) @@ -188,7 +189,7 @@ func (h rbConfigHandler) rollbackHandler(w http.ResponseWriter, r *http.Request) http.Error(w, err.Error(), http.StatusUnprocessableEntity) return } - err = h.client.Rollback(instanceID, p) + err = h.client.Rollback(instanceID, cfgName, p) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return @@ -200,6 +201,7 @@ func (h rbConfigHandler) rollbackHandler(w http.ResponseWriter, r *http.Request) func (h rbConfigHandler) tagitHandler(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) instanceID := vars["instID"] + cfgName := vars["cfgname"] if r.Body == nil { http.Error(w, "Empty body", http.StatusBadRequest) @@ -213,7 +215,7 @@ func (h rbConfigHandler) tagitHandler(w http.ResponseWriter, r *http.Request) { return } - err = h.client.Tagit(instanceID, p) + err = h.client.Tagit(instanceID, cfgName, p) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return |