Subscription manager v0.10.0

Contains v0.8.0-v0.10.0
Handle RICsubscriptionDeleteResponse message
Communicating RICsubscriptionDeleteResponse to routing manager
Updated transaction handling
Tracking Mbuf in transaction table

Change-Id: I0d4964b7bd717941a0e50ede3e9a878590079141
Signed-off-by: kalnagy <kalman.nagy@nokia.com>
diff --git a/pkg/control/client.go b/pkg/control/client.go
index 598c7ef..1c07ad4 100644
--- a/pkg/control/client.go
+++ b/pkg/control/client.go
@@ -32,6 +32,7 @@
 type RtmgrClient struct {
 	rtClient         *rtmgrclient.RoutingManager
 	xappHandleParams *rtmgrhandle.ProvideXappSubscriptionHandleParams
+	xappDeleteParams *rtmgrhandle.DeleteXappSubscriptionHandleParams
 }
 
 func (rc *RtmgrClient) SubscriptionRequestUpdate() error {
@@ -54,6 +55,15 @@
 			xapp.Logger.Info("Succesfully updated routing manager about the subscription: %d", subID)
 			return nil
 		}
+	case DELETE:
+		_, _, deleteErr := rc.rtClient.Handle.DeleteXappSubscriptionHandle(rc.xappDeleteParams.WithXappSubscriptionData(&xappSubReq))
+		if deleteErr != nil && !(strings.Contains(deleteErr.Error(), "status 200"))  {
+			xapp.Logger.Error("Deleting subscription id = %d  in routing manager, failed with error: %v", subID, deleteErr)
+			return deleteErr
+		} else {
+			xapp.Logger.Info("Succesfully deleted subscription: %d in routing manager.", subID)
+			return nil
+		}
 	default:
 		return nil
 	}