From 7278f4ab445b579a0bc3ba7d90f707180f1ed7c3 Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Sat, 3 Dec 2022 18:31:50 +0000 Subject: [PATCH] Expose rest implementation for xApp uninstall Added the missing file to expose the REST implementation for xApp uninstall. Signed-off-by: subhash kumar singh Change-Id: I8a1ddad9a55b46ed4fbc4cf17e99d24c3e3490f0 --- pkg/restful/restful.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/restful/restful.go b/pkg/restful/restful.go index b17c7ad..1b5e8a7 100644 --- a/pkg/restful/restful.go +++ b/pkg/restful/restful.go @@ -112,6 +112,11 @@ func (r *Restful) setupHandler() { return resp }) + api.DeployDeleteDeployHandler = deploy.DeleteDeployHandlerFunc(func(param deploy.DeleteDeployParams) middleware.Responder { + ricdms.Logger.Debug("==> undeploy xApp") + resp := r.rh.UninstallChart(*param.Body.XAppname, *param.Body.Version, param.Body.Namespace) + return resp + }) api.ApplicationZipProducer = runtime.ProducerFunc(func(w io.Writer, data interface{}) error { if zp, ok := data.(io.ReadCloser); ok { defer zp.Close() -- 2.16.6