diff --git a/management-server/internal/notification/server.go b/management-server/internal/notification/server.go index 8cbeed994..02768fe04 100644 --- a/management-server/internal/notification/server.go +++ b/management-server/internal/notification/server.go @@ -52,10 +52,10 @@ func (s *notificationService) CreateApplication(ctx context.Context, application UUID: application.Uuid, Name: application.Name, Owner: application.Owner, - Policy: application.Policy, + // Policy: application.Policy, Attributes: application.Attributes, //Keys: application.Keys, - Organization: application.Organization, + // Organization: application.Organization, TimeStamp: application.TimeStamp, IsRemoveEvent: false, } @@ -71,10 +71,10 @@ func (s *notificationService) UpdateApplication(ctx context.Context, application UUID: application.Uuid, Name: application.Name, Owner: application.Owner, - Policy: application.Policy, + // Policy: application.Policy, Attributes: application.Attributes, //Keys: application.Keys, - Organization: application.Organization, + // Organization: application.Organization, TimeStamp: application.TimeStamp, IsRemoveEvent: false, } @@ -88,7 +88,7 @@ func (s *notificationService) DeleteApplication(ctx context.Context, application var event = internal_types.ApplicationEvent{ Label: config.ReadConfigs().ManagementServer.NodeLabels[0], UUID: application.Uuid, - Organization: application.Organization, + // Organization: application.Organization, IsRemoveEvent: true, } synchronizer.AddApplicationEventsToChannel(event) @@ -101,11 +101,11 @@ func (s *notificationService) CreateSubscription(ctx context.Context, subscripti var event = internal_types.SubscriptionEvent{ Label: config.ReadConfigs().ManagementServer.NodeLabels[0], UUID: subscription.Uuid, - ApplicationRef: subscription.ApplicationRef, - APIRef: subscription.ApiRef, - PolicyID: subscription.PolicyId, + // ApplicationRef: subscription.ApplicationRef, + // APIRef: subscription.ApiRef, + // PolicyID: subscription.PolicyId, SubStatus: subscription.SubStatus, - Subscriber: subscription.Subscriber, + // Subscriber: subscription.Subscriber, Organization: subscription.Organization, TimeStamp: subscription.TimeStamp, IsRemoveEvent: false, @@ -120,11 +120,11 @@ func (s *notificationService) UpdateSubscription(ctx context.Context, subscripti var event = internal_types.SubscriptionEvent{ Label: config.ReadConfigs().ManagementServer.NodeLabels[0], UUID: subscription.Uuid, - ApplicationRef: subscription.ApplicationRef, - APIRef: subscription.ApiRef, - PolicyID: subscription.PolicyId, + // ApplicationRef: subscription.ApplicationRef, + // APIRef: subscription.ApiRef, + // PolicyID: subscription.PolicyId, SubStatus: subscription.SubStatus, - Subscriber: subscription.Subscriber, + // Subscriber: subscription.Subscriber, Organization: subscription.Organization, TimeStamp: subscription.TimeStamp, IsRemoveEvent: false, diff --git a/management-server/internal/types/types.go b/management-server/internal/types/types.go index 56bb452ac..5ea917e60 100644 --- a/management-server/internal/types/types.go +++ b/management-server/internal/types/types.go @@ -23,29 +23,29 @@ type ApplicationEvent struct { UUID string Name string Owner string - Policy string + // Policy string Attributes map[string]string - Keys []*ApplicationKey + // Keys []*ApplicationKey Organization string TimeStamp string IsRemoveEvent bool } // ApplicationKey is a data holder for an application key -type ApplicationKey struct { - Key string - KeyManager string -} +// type ApplicationKey struct { +// Key string +// KeyManager string +// } // SubscriptionEvent is a data holder for a subscription event type SubscriptionEvent struct { Label string UUID string - ApplicationRef string - APIRef string - PolicyID string + // ApplicationRef string + // APIRef string + // PolicyID string SubStatus string - Subscriber string + // Subscriber string Organization string TimeStamp string IsRemoveEvent bool diff --git a/management-server/internal/xds/server.go b/management-server/internal/xds/server.go index 1d2cf6e76..d9ba7fc4d 100644 --- a/management-server/internal/xds/server.go +++ b/management-server/internal/xds/server.go @@ -99,20 +99,20 @@ func FeedData() { // AddSingleApplication will update the Application specified by the UUID to the xds cache func AddSingleApplication(label string, application internal_types.ApplicationEvent) { - appKeys := make([]*internal_application.Application_Key, len(application.Keys)) - for i, key := range application.Keys { - appKeys[i] = &internal_application.Application_Key{ - Key: key.Key, - KeyManager: key.KeyManager, - } - } + // appKeys := make([]*internal_application.Application_Key, len(application.Keys)) + // for i, key := range application.Keys { + // appKeys[i] = &internal_application.Application_Key{ + // Key: key.Key, + // KeyManager: key.KeyManager, + // } + // } convertedApplication := &internal_application.Application{ Uuid: application.UUID, Name: application.Name, - Policy: application.Policy, + // Policy: application.Policy, Owner: application.Owner, - Organization: application.Organization, - Keys: appKeys, + // Organization: application.Organization, + // Keys: appKeys, Attributes: application.Attributes, } logger.LoggerXds.Debugf("Converted Application: %v", convertedApplication) @@ -327,12 +327,12 @@ func InitAPKMgtServer() { func AddSingleSubscription(label string, subscription internal_types.SubscriptionEvent) { convertedSubscription := &internal_application.Subscription{ Uuid: subscription.UUID, - ApplicationRef: subscription.ApplicationRef, - ApiRef: subscription.APIRef, + // ApplicationRef: subscription.ApplicationRef, + // ApiRef: subscription.APIRef, SubStatus: subscription.SubStatus, - PolicyId: subscription.PolicyID, + // PolicyId: subscription.PolicyID, Organization: subscription.Organization, - Subscriber: subscription.Subscriber, + // Subscriber: subscription.Subscriber, TimeStamp: subscription.TimeStamp, } logger.LoggerXds.Debugf("Converted Subscription: %v", convertedSubscription)