Expose rest implementation for xApp uninstall 33/9933/1
authorsubhash kumar singh <subh.singh@samsung.com>
Sat, 3 Dec 2022 18:31:50 +0000 (18:31 +0000)
committersubhash kumar singh <subh.singh@samsung.com>
Sat, 3 Dec 2022 18:31:50 +0000 (18:31 +0000)
Added the missing file to expose the REST implementation for
xApp uninstall.

Signed-off-by: subhash kumar singh <subh.singh@samsung.com>
Change-Id: I8a1ddad9a55b46ed4fbc4cf17e99d24c3e3490f0

pkg/restful/restful.go

index b17c7ad..1b5e8a7 100644 (file)
@@ -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()