Add UninstallApp call to grpc 08/108708/2
authorManjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>
Tue, 2 Jun 2020 21:05:42 +0000 (21:05 +0000)
committerManjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>
Tue, 2 Jun 2020 21:52:26 +0000 (21:52 +0000)
Issue-ID: MULTICLOUD-1005
Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>
Change-Id: I90c8ff0d548690ea19d325612d1bcd3e5049dc36

src/rsync/go.mod
src/rsync/pkg/grpc/installappserver/installappserver.go

index 6dcbf47..aca0323 100644 (file)
@@ -5,7 +5,10 @@ go 1.13
 require (
        github.com/golang/protobuf v1.3.4
        github.com/onap/multicloud-k8s/src/orchestrator v0.0.0-20200527175204-ef27eb4d63f1
+       golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 // indirect
+       google.golang.org/appengine v1.4.0 // indirect
        google.golang.org/grpc v1.27.1
+       honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc // indirect
 )
 
 replace (
index 8a293cd..28b4a58 100644 (file)
@@ -38,6 +38,17 @@ func (cs *installappServer) InstallApp(ctx context.Context, req *installapp.Inst
        return &installapp.InstallAppResponse{AppContextInstalled: true}, nil
 }
 
+func (cs *installappServer) UninstallApp(ctx context.Context, req *installapp.UninstallAppRequest) (*installapp.UninstallAppResponse, error) {
+       uninstallAppReq, _ := json.Marshal(req)
+       log.Println("GRPC Server received uninstallAppRequest: ", string(uninstallAppReq))
+
+       // Try terminating the comp app here
+       //
+       //
+
+       return &installapp.UninstallAppResponse{AppContextUninstalled: true}, nil
+}
+
 // NewInstallAppServer exported
 func NewInstallAppServer() *installappServer {
        s := &installappServer{}