From dc62323aa7f6782d69c7ac6509eb270e86ef31bd Mon Sep 17 00:00:00 2001 From: Lukasz Rajewski Date: Tue, 28 Sep 2021 21:42:24 +0200 Subject: Fix for config resources delete with instance delete Issue-ID: MULTICLOUD-1332 Signed-off-by: Lukasz Rajewski Change-Id: I08a3d623d6f12777d88a168af0cb804c63104887 --- src/k8splugin/api/confighandler.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/k8splugin/api/confighandler.go') 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 -- cgit 1.2.3-korg