diff options
author | 2017-04-16 14:17:52 +0000 | |
---|---|---|
committer | 2017-04-19 21:37:15 +0000 | |
commit | e3c3eb5012b02d87a8d7143be3c195e86c298461 (patch) | |
tree | 349ac19ea8f8682fc48df58a54f084c237061980 /dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen | |
parent | 1650c3b0dda805110cac90dcaab8288d6b607b43 (diff) |
[DCAE-15] Changes related to version 1.1
See Jira for details
Change-Id: I29280abce45f53e80adf675f48cf1e0fff9e2c0a
Signed-off-by: Carsten Lund <lund@research.att.com>
Diffstat (limited to 'dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen')
22 files changed, 2135 insertions, 1810 deletions
diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterManager.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterManager.yaml index 2bfc668..552a80c 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterManager.yaml +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterManager.yaml @@ -1,597 +1,516 @@ operations: - test: {} - suspend: {} - resume: {} - publicKey: {} - configurationChanged: {} - updateStreams: {} - logs: {} - metrics: {} - properties: {} - uploadInfo: {} - getValues: {} - getValuesAll: {} - getMessages: {} - getRequestLogger: {} - evaluate: {} - update: {} - createNamespace: {} - deleteNamespace: {} - deployApp: {} - loadArtifact: {} - deleteArtifact: {} - startFlow: {} - startWorker: {} - startService: {} - startApp: {} - stopApp: {} - deleteApp: {} - loadPreferencesApp: {} - loadPreferencesFlow: {} - loadPreferencesNameSpace: {} - setPreferencesApp: {} - setPreferencesFlow: {} - setPreferencesWorker: {} - setPreferencesService: {} - setPreferencesNameSpace: {} - setFlowRunTimeArgs: {} - setFlowletInstances: {} - stopFlow: {} - stopWorker: {} - stopService: {} - truncateDataSet: {} - deleteDataset: {} - createStream: {} - deleteStream: {} - getStreamEvents: {} - getStreamStats: {} - sendEventToStream: {} - trucateStream: {} - setStreamProperties: {} - restartApp: {} - createApp: {} - createAppWithConfig: {} - setDatasetProperties: {} - setStreamTTL: {} - REMOTE_test: - decription: Remote call test - REMOTE_suspend: - decription: Remote call suspend - REMOTE_resume: - decription: Remote call resume - REMOTE_publicKey: - decription: Remote call publicKey - REMOTE_configurationChanged: - decription: Remote call configurationChanged - REMOTE_updateStreams: - decription: Remote call updateStreams - REMOTE_logs: - decription: Remote call logs - REMOTE_metrics: - decription: Remote call metrics - REMOTE_properties: - decription: Remote call properties - REMOTE_uploadInfo: - decription: Remote call uploadInfo - REMOTE_getValues: - decription: Remote call getValues - REMOTE_getValuesAll: - decription: Remote call getValuesAll - REMOTE_getMessages: - decription: Remote call getMessages - REMOTE_getRequestLogger: - decription: Remote call getRequestLogger - REMOTE_evaluate: - decription: Remote call evaluate - REMOTE_update: - decription: Remote call update - REMOTE_createNamespace: - decription: Remote call createNamespace - REMOTE_deleteNamespace: - decription: Remote call deleteNamespace - REMOTE_deployApp: - decription: Remote call deployApp - REMOTE_loadArtifact: - decription: Remote call loadArtifact - REMOTE_deleteArtifact: - decription: Remote call deleteArtifact - REMOTE_startFlow: - decription: Remote call startFlow - REMOTE_startWorker: - decription: Remote call startWorker - REMOTE_startService: - decription: Remote call startService - REMOTE_startApp: - decription: Remote call startApp - REMOTE_stopApp: - decription: Remote call stopApp - REMOTE_deleteApp: - decription: Remote call deleteApp - REMOTE_loadPreferencesApp: - decription: Remote call loadPreferencesApp - REMOTE_loadPreferencesFlow: - decription: Remote call loadPreferencesFlow - REMOTE_loadPreferencesNameSpace: - decription: Remote call loadPreferencesNameSpace - REMOTE_setPreferencesApp: - decription: Remote call setPreferencesApp - REMOTE_setPreferencesFlow: - decription: Remote call setPreferencesFlow - REMOTE_setPreferencesWorker: - decription: Remote call setPreferencesWorker - REMOTE_setPreferencesService: - decription: Remote call setPreferencesService - REMOTE_setPreferencesNameSpace: - decription: Remote call setPreferencesNameSpace - REMOTE_setFlowRunTimeArgs: - decription: Remote call setFlowRunTimeArgs - REMOTE_setFlowletInstances: - decription: Remote call setFlowletInstances - REMOTE_stopFlow: - decription: Remote call stopFlow - REMOTE_stopWorker: - decription: Remote call stopWorker - REMOTE_stopService: - decription: Remote call stopService - REMOTE_truncateDataSet: - decription: Remote call truncateDataSet - REMOTE_deleteDataset: - decription: Remote call deleteDataset - REMOTE_createStream: - decription: Remote call createStream - REMOTE_deleteStream: - decription: Remote call deleteStream - REMOTE_getStreamEvents: - decription: Remote call getStreamEvents - REMOTE_getStreamStats: - decription: Remote call getStreamStats - REMOTE_sendEventToStream: - decription: Remote call sendEventToStream - REMOTE_trucateStream: - decription: Remote call trucateStream - REMOTE_setStreamProperties: - decription: Remote call setStreamProperties - REMOTE_restartApp: - decription: Remote call restartApp - REMOTE_createApp: - decription: Remote call createApp - REMOTE_createAppWithConfig: - decription: Remote call createAppWithConfig - REMOTE_setDatasetProperties: - decription: Remote call setDatasetProperties - REMOTE_setStreamTTL: - decription: Remote call setStreamTTL + CdapClusterManager@test: {} + CdapClusterManager@suspend: {} + CdapClusterManager@resume: {} + CdapClusterManager@publicKey: {} + CdapClusterManager@configurationChanged: {} + CdapClusterManager@updateStreams: {} + CdapClusterManager@logs: {} + CdapClusterManager@metrics: {} + CdapClusterManager@properties: {} + CdapClusterManager@uploadInfo: {} + CdapClusterManager@getValues: {} + CdapClusterManager@getValuesAll: {} + CdapClusterManager@getMessages: {} + CdapClusterManager@getRequestLogger: {} + CdapClusterManager@evaluate: {} + CdapClusterManager@update: {} + CdapClusterManager@createNamespace: {} + CdapClusterManager@deleteNamespace: {} + CdapClusterManager@deployApp: {} + CdapClusterManager@loadArtifact: {} + CdapClusterManager@loadArtifactWithConfig: {} + CdapClusterManager@deleteArtifact: {} + CdapClusterManager@startFlow: {} + CdapClusterManager@startWorker: {} + CdapClusterManager@startService: {} + CdapClusterManager@startApp: {} + CdapClusterManager@stopApp: {} + CdapClusterManager@deleteApp: {} + CdapClusterManager@loadPreferencesApp: {} + CdapClusterManager@loadPreferencesFlow: {} + CdapClusterManager@loadPreferencesNameSpace: {} + CdapClusterManager@setPreferencesApp: {} + CdapClusterManager@setPreferencesFlow: {} + CdapClusterManager@setPreferencesWorker: {} + CdapClusterManager@setPreferencesService: {} + CdapClusterManager@setPreferencesNameSpace: {} + CdapClusterManager@setFlowRunTimeArgs: {} + CdapClusterManager@setFlowletInstances: {} + CdapClusterManager@stopFlow: {} + CdapClusterManager@stopWorker: {} + CdapClusterManager@stopService: {} + CdapClusterManager@truncateDataSet: {} + CdapClusterManager@deleteDataset: {} + CdapClusterManager@createStream: {} + CdapClusterManager@deleteStream: {} + CdapClusterManager@getStreamEvents: {} + CdapClusterManager@getStreamStats: {} + CdapClusterManager@sendEventToStream: {} + CdapClusterManager@trucateStream: {} + CdapClusterManager@setStreamProperties: {} + CdapClusterManager@restartApp: {} + CdapClusterManager@createApp: {} + CdapClusterManager@createAppWithConfig: {} + CdapClusterManager@setDatasetProperties: {} + CdapClusterManager@setStreamTTL: {} + CdapClusterManager@suspendSchedule: {} + CdapClusterManager@resumeSchedule: {} messages: dummy: {} - test: - errorCode: test-FAILED-5001W + REQUEST-FAILED-test: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - suspend: - errorCode: suspend-FAILED-5001W + REQUEST-FAILED-suspend: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - resume: - errorCode: resume-FAILED-5001W + REQUEST-FAILED-resume: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - publicKey: - errorCode: publicKey-FAILED-5001W + REQUEST-FAILED-publicKey: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - configurationChanged: - errorCode: configurationChanged-FAILED-5001W + REQUEST-FAILED-configurationChanged: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - updateStreams: - errorCode: updateStreams-FAILED-5001W + REQUEST-FAILED-updateStreams: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - logs: - errorCode: logs-FAILED-5001W + REQUEST-FAILED-logs: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - metrics: - errorCode: metrics-FAILED-5001W + REQUEST-FAILED-metrics: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - properties: - errorCode: properties-FAILED-5001W + REQUEST-FAILED-properties: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - uploadInfo: - errorCode: uploadInfo-FAILED-5001W + REQUEST-FAILED-uploadInfo: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - getValues: - errorCode: getValues-FAILED-5001W + REQUEST-FAILED-getValues: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - getValuesAll: - errorCode: getValuesAll-FAILED-5001W + REQUEST-FAILED-getValuesAll: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - getMessages: - errorCode: getMessages-FAILED-5001W + REQUEST-FAILED-getMessages: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - getRequestLogger: - errorCode: getRequestLogger-FAILED-5001W + REQUEST-FAILED-getRequestLogger: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - evaluate: - errorCode: evaluate-FAILED-5001W + REQUEST-FAILED-evaluate: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - update: - errorCode: update-FAILED-5001W + REQUEST-FAILED-update: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - createNamespace: - errorCode: createNamespace-FAILED-5001W + REQUEST-FAILED-createNamespace: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - deleteNamespace: - errorCode: deleteNamespace-FAILED-5001W + REQUEST-FAILED-deleteNamespace: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - deployApp: - errorCode: deployApp-FAILED-5001W + REQUEST-FAILED-deployApp: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - loadArtifact: - errorCode: loadArtifact-FAILED-5001W + REQUEST-FAILED-loadArtifact: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - deleteArtifact: - errorCode: deleteArtifact-FAILED-5001W + REQUEST-FAILED-loadArtifactWithConfig: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - startFlow: - errorCode: startFlow-FAILED-5001W + REQUEST-FAILED-deleteArtifact: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - startWorker: - errorCode: startWorker-FAILED-5001W + REQUEST-FAILED-startFlow: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - startService: - errorCode: startService-FAILED-5001W + REQUEST-FAILED-startWorker: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - startApp: - errorCode: startApp-FAILED-5001W + REQUEST-FAILED-startService: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - stopApp: - errorCode: stopApp-FAILED-5001W + REQUEST-FAILED-startApp: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - deleteApp: - errorCode: deleteApp-FAILED-5001W + REQUEST-FAILED-stopApp: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - loadPreferencesApp: - errorCode: loadPreferencesApp-FAILED-5001W + REQUEST-FAILED-deleteApp: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - loadPreferencesFlow: - errorCode: loadPreferencesFlow-FAILED-5001W + REQUEST-FAILED-loadPreferencesApp: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - loadPreferencesNameSpace: - errorCode: loadPreferencesNameSpace-FAILED-5001W + REQUEST-FAILED-loadPreferencesFlow: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - setPreferencesApp: - errorCode: setPreferencesApp-FAILED-5001W + REQUEST-FAILED-loadPreferencesNameSpace: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - setPreferencesFlow: - errorCode: setPreferencesFlow-FAILED-5001W + REQUEST-FAILED-setPreferencesApp: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - setPreferencesWorker: - errorCode: setPreferencesWorker-FAILED-5001W + REQUEST-FAILED-setPreferencesFlow: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - setPreferencesService: - errorCode: setPreferencesService-FAILED-5001W + REQUEST-FAILED-setPreferencesWorker: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - setPreferencesNameSpace: - errorCode: setPreferencesNameSpace-FAILED-5001W + REQUEST-FAILED-setPreferencesService: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - setFlowRunTimeArgs: - errorCode: setFlowRunTimeArgs-FAILED-5001W + REQUEST-FAILED-setPreferencesNameSpace: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - setFlowletInstances: - errorCode: setFlowletInstances-FAILED-5001W + REQUEST-FAILED-setFlowRunTimeArgs: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - stopFlow: - errorCode: stopFlow-FAILED-5001W + REQUEST-FAILED-setFlowletInstances: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - stopWorker: - errorCode: stopWorker-FAILED-5001W + REQUEST-FAILED-stopFlow: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - stopService: - errorCode: stopService-FAILED-5001W + REQUEST-FAILED-stopWorker: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - truncateDataSet: - errorCode: truncateDataSet-FAILED-5001W + REQUEST-FAILED-stopService: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - deleteDataset: - errorCode: deleteDataset-FAILED-5001W + REQUEST-FAILED-truncateDataSet: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - createStream: - errorCode: createStream-FAILED-5001W + REQUEST-FAILED-deleteDataset: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - deleteStream: - errorCode: deleteStream-FAILED-5001W + REQUEST-FAILED-createStream: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - getStreamEvents: - errorCode: getStreamEvents-FAILED-5001W + REQUEST-FAILED-deleteStream: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - getStreamStats: - errorCode: getStreamStats-FAILED-5001W + REQUEST-FAILED-getStreamEvents: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - sendEventToStream: - errorCode: sendEventToStream-FAILED-5001W + REQUEST-FAILED-getStreamStats: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - trucateStream: - errorCode: trucateStream-FAILED-5001W + REQUEST-FAILED-sendEventToStream: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - setStreamProperties: - errorCode: setStreamProperties-FAILED-5001W + REQUEST-FAILED-trucateStream: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - restartApp: - errorCode: restartApp-FAILED-5001W + REQUEST-FAILED-setStreamProperties: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - createApp: - errorCode: createApp-FAILED-5001W + REQUEST-FAILED-restartApp: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - createAppWithConfig: - errorCode: createAppWithConfig-FAILED-5001W + REQUEST-FAILED-createApp: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - setDatasetProperties: - errorCode: setDatasetProperties-FAILED-5001W + REQUEST-FAILED-createAppWithConfig: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - setStreamTTL: - errorCode: setStreamTTL-FAILED-5001W + REQUEST-FAILED-setDatasetProperties: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - REMOTE_test: - errorCode: REMOTE-test-FAILED-5001W + REQUEST-FAILED-setStreamTTL: + errorCode: 4001W + messageFormat: '{0}' + description: Operation Failed with Exception + REQUEST-FAILED-suspendSchedule: + errorCode: 4001W + messageFormat: '{0}' + description: Operation Failed with Exception + REQUEST-FAILED-resumeSchedule: + errorCode: 4001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE-CALL-FAILED-test: + errorCode: 4001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE-CALL-FAILED-suspend: + errorCode: 4001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE-CALL-FAILED-resume: + errorCode: 4001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE-CALL-FAILED-publicKey: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_suspend: - errorCode: REMOTE-suspend-FAILED-5001W + REMOTE-CALL-FAILED-configurationChanged: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_resume: - errorCode: REMOTE-resume-FAILED-5001W + REMOTE-CALL-FAILED-updateStreams: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_publicKey: - errorCode: REMOTE-publicKey-FAILED-5001W + REMOTE-CALL-FAILED-logs: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_configurationChanged: - errorCode: REMOTE-configurationChanged-FAILED-5001W + REMOTE-CALL-FAILED-metrics: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_updateStreams: - errorCode: REMOTE-updateStreams-FAILED-5001W + REMOTE-CALL-FAILED-properties: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_logs: - errorCode: REMOTE-logs-FAILED-5001W + REMOTE-CALL-FAILED-uploadInfo: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_metrics: - errorCode: REMOTE-metrics-FAILED-5001W + REMOTE-CALL-FAILED-getValues: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_properties: - errorCode: REMOTE-properties-FAILED-5001W + REMOTE-CALL-FAILED-getValuesAll: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_uploadInfo: - errorCode: REMOTE-uploadInfo-FAILED-5001W + REMOTE-CALL-FAILED-getMessages: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_getValues: - errorCode: REMOTE-getValues-FAILED-5001W + REMOTE-CALL-FAILED-getRequestLogger: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_getValuesAll: - errorCode: REMOTE-getValuesAll-FAILED-5001W + REMOTE-CALL-FAILED-evaluate: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_getMessages: - errorCode: REMOTE-getMessages-FAILED-5001W + REMOTE-CALL-FAILED-update: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_getRequestLogger: - errorCode: REMOTE-getRequestLogger-FAILED-5001W + REMOTE-CALL-FAILED-createNamespace: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_evaluate: - errorCode: REMOTE-evaluate-FAILED-5001W + REMOTE-CALL-FAILED-deleteNamespace: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_update: - errorCode: REMOTE-update-FAILED-5001W + REMOTE-CALL-FAILED-deployApp: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_createNamespace: - errorCode: REMOTE-createNamespace-FAILED-5001W + REMOTE-CALL-FAILED-loadArtifact: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_deleteNamespace: - errorCode: REMOTE-deleteNamespace-FAILED-5001W + REMOTE-CALL-FAILED-loadArtifactWithConfig: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_deployApp: - errorCode: REMOTE-deployApp-FAILED-5001W + REMOTE-CALL-FAILED-deleteArtifact: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_loadArtifact: - errorCode: REMOTE-loadArtifact-FAILED-5001W + REMOTE-CALL-FAILED-startFlow: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_deleteArtifact: - errorCode: REMOTE-deleteArtifact-FAILED-5001W + REMOTE-CALL-FAILED-startWorker: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_startFlow: - errorCode: REMOTE-startFlow-FAILED-5001W + REMOTE-CALL-FAILED-startService: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_startWorker: - errorCode: REMOTE-startWorker-FAILED-5001W + REMOTE-CALL-FAILED-startApp: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_startService: - errorCode: REMOTE-startService-FAILED-5001W + REMOTE-CALL-FAILED-stopApp: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_startApp: - errorCode: REMOTE-startApp-FAILED-5001W + REMOTE-CALL-FAILED-deleteApp: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_stopApp: - errorCode: REMOTE-stopApp-FAILED-5001W + REMOTE-CALL-FAILED-loadPreferencesApp: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_deleteApp: - errorCode: REMOTE-deleteApp-FAILED-5001W + REMOTE-CALL-FAILED-loadPreferencesFlow: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_loadPreferencesApp: - errorCode: REMOTE-loadPreferencesApp-FAILED-5001W + REMOTE-CALL-FAILED-loadPreferencesNameSpace: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_loadPreferencesFlow: - errorCode: REMOTE-loadPreferencesFlow-FAILED-5001W + REMOTE-CALL-FAILED-setPreferencesApp: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_loadPreferencesNameSpace: - errorCode: REMOTE-loadPreferencesNameSpace-FAILED-5001W + REMOTE-CALL-FAILED-setPreferencesFlow: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_setPreferencesApp: - errorCode: REMOTE-setPreferencesApp-FAILED-5001W + REMOTE-CALL-FAILED-setPreferencesWorker: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_setPreferencesFlow: - errorCode: REMOTE-setPreferencesFlow-FAILED-5001W + REMOTE-CALL-FAILED-setPreferencesService: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_setPreferencesWorker: - errorCode: REMOTE-setPreferencesWorker-FAILED-5001W + REMOTE-CALL-FAILED-setPreferencesNameSpace: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_setPreferencesService: - errorCode: REMOTE-setPreferencesService-FAILED-5001W + REMOTE-CALL-FAILED-setFlowRunTimeArgs: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_setPreferencesNameSpace: - errorCode: REMOTE-setPreferencesNameSpace-FAILED-5001W + REMOTE-CALL-FAILED-setFlowletInstances: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_setFlowRunTimeArgs: - errorCode: REMOTE-setFlowRunTimeArgs-FAILED-5001W + REMOTE-CALL-FAILED-stopFlow: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_setFlowletInstances: - errorCode: REMOTE-setFlowletInstances-FAILED-5001W + REMOTE-CALL-FAILED-stopWorker: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_stopFlow: - errorCode: REMOTE-stopFlow-FAILED-5001W + REMOTE-CALL-FAILED-stopService: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_stopWorker: - errorCode: REMOTE-stopWorker-FAILED-5001W + REMOTE-CALL-FAILED-truncateDataSet: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_stopService: - errorCode: REMOTE-stopService-FAILED-5001W + REMOTE-CALL-FAILED-deleteDataset: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_truncateDataSet: - errorCode: REMOTE-truncateDataSet-FAILED-5001W + REMOTE-CALL-FAILED-createStream: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_deleteDataset: - errorCode: REMOTE-deleteDataset-FAILED-5001W + REMOTE-CALL-FAILED-deleteStream: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_createStream: - errorCode: REMOTE-createStream-FAILED-5001W + REMOTE-CALL-FAILED-getStreamEvents: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_deleteStream: - errorCode: REMOTE-deleteStream-FAILED-5001W + REMOTE-CALL-FAILED-getStreamStats: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_getStreamEvents: - errorCode: REMOTE-getStreamEvents-FAILED-5001W + REMOTE-CALL-FAILED-sendEventToStream: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_getStreamStats: - errorCode: REMOTE-getStreamStats-FAILED-5001W + REMOTE-CALL-FAILED-trucateStream: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_sendEventToStream: - errorCode: REMOTE-sendEventToStream-FAILED-5001W + REMOTE-CALL-FAILED-setStreamProperties: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_trucateStream: - errorCode: REMOTE-trucateStream-FAILED-5001W + REMOTE-CALL-FAILED-restartApp: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_setStreamProperties: - errorCode: REMOTE-setStreamProperties-FAILED-5001W + REMOTE-CALL-FAILED-createApp: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_restartApp: - errorCode: REMOTE-restartApp-FAILED-5001W + REMOTE-CALL-FAILED-createAppWithConfig: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_createApp: - errorCode: REMOTE-createApp-FAILED-5001W + REMOTE-CALL-FAILED-setDatasetProperties: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_createAppWithConfig: - errorCode: REMOTE-createAppWithConfig-FAILED-5001W + REMOTE-CALL-FAILED-setStreamTTL: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_setDatasetProperties: - errorCode: REMOTE-setDatasetProperties-FAILED-5001W + REMOTE-CALL-FAILED-suspendSchedule: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_setStreamTTL: - errorCode: REMOTE-setStreamTTL-FAILED-5001W + REMOTE-CALL-FAILED-resumeSchedule: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterService.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterService.yaml index 6ac8c34..5481cbf 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterService.yaml +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/CdapClusterService.yaml @@ -1,135 +1,111 @@ operations: - deploy: {} - undeploy: {} - test: {} - suspend: {} - resume: {} - pushManagerConfiguration: {} - pollManagerConfiguration: {} - managerConfiguration: {} - managerOperation: {} - updateConfigurationFromPolicy: {} - runHealthTests: {} - updateDeploymentStatus: {} - REMOTE_deploy: - decription: Remote call deploy - REMOTE_undeploy: - decription: Remote call undeploy - REMOTE_test: - decription: Remote call test - REMOTE_suspend: - decription: Remote call suspend - REMOTE_resume: - decription: Remote call resume - REMOTE_pushManagerConfiguration: - decription: Remote call pushManagerConfiguration - REMOTE_pollManagerConfiguration: - decription: Remote call pollManagerConfiguration - REMOTE_managerConfiguration: - decription: Remote call managerConfiguration - REMOTE_managerOperation: - decription: Remote call managerOperation - REMOTE_updateConfigurationFromPolicy: - decription: Remote call updateConfigurationFromPolicy - REMOTE_runHealthTests: - decription: Remote call runHealthTests - REMOTE_updateDeploymentStatus: - decription: Remote call updateDeploymentStatus + CdapClusterService@deploy: {} + CdapClusterService@undeploy: {} + CdapClusterService@test: {} + CdapClusterService@suspend: {} + CdapClusterService@resume: {} + CdapClusterService@pushManagerConfiguration: {} + CdapClusterService@pollManagerConfiguration: {} + CdapClusterService@managerConfiguration: {} + CdapClusterService@managerOperation: {} + CdapClusterService@updateConfigurationFromPolicy: {} + CdapClusterService@runHealthTests: {} + CdapClusterService@updateDeploymentStatus: {} messages: dummy: {} - deploy: - errorCode: deploy-FAILED-5001W + REQUEST-FAILED-deploy: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - undeploy: - errorCode: undeploy-FAILED-5001W + REQUEST-FAILED-undeploy: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - test: - errorCode: test-FAILED-5001W + REQUEST-FAILED-test: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - suspend: - errorCode: suspend-FAILED-5001W + REQUEST-FAILED-suspend: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - resume: - errorCode: resume-FAILED-5001W + REQUEST-FAILED-resume: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - pushManagerConfiguration: - errorCode: pushManagerConfiguration-FAILED-5001W + REQUEST-FAILED-pushManagerConfiguration: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - pollManagerConfiguration: - errorCode: pollManagerConfiguration-FAILED-5001W + REQUEST-FAILED-pollManagerConfiguration: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - managerConfiguration: - errorCode: managerConfiguration-FAILED-5001W + REQUEST-FAILED-managerConfiguration: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - managerOperation: - errorCode: managerOperation-FAILED-5001W + REQUEST-FAILED-managerOperation: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - updateConfigurationFromPolicy: - errorCode: updateConfigurationFromPolicy-FAILED-5001W + REQUEST-FAILED-updateConfigurationFromPolicy: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - runHealthTests: - errorCode: runHealthTests-FAILED-5001W + REQUEST-FAILED-runHealthTests: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - updateDeploymentStatus: - errorCode: updateDeploymentStatus-FAILED-5001W + REQUEST-FAILED-updateDeploymentStatus: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - REMOTE_deploy: - errorCode: REMOTE-deploy-FAILED-5001W + REMOTE-CALL-FAILED-deploy: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_undeploy: - errorCode: REMOTE-undeploy-FAILED-5001W + REMOTE-CALL-FAILED-undeploy: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_test: - errorCode: REMOTE-test-FAILED-5001W + REMOTE-CALL-FAILED-test: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_suspend: - errorCode: REMOTE-suspend-FAILED-5001W + REMOTE-CALL-FAILED-suspend: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_resume: - errorCode: REMOTE-resume-FAILED-5001W + REMOTE-CALL-FAILED-resume: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_pushManagerConfiguration: - errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W + REMOTE-CALL-FAILED-pushManagerConfiguration: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_pollManagerConfiguration: - errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W + REMOTE-CALL-FAILED-pollManagerConfiguration: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_managerConfiguration: - errorCode: REMOTE-managerConfiguration-FAILED-5001W + REMOTE-CALL-FAILED-managerConfiguration: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_managerOperation: - errorCode: REMOTE-managerOperation-FAILED-5001W + REMOTE-CALL-FAILED-managerOperation: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_updateConfigurationFromPolicy: - errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W + REMOTE-CALL-FAILED-updateConfigurationFromPolicy: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_runHealthTests: - errorCode: REMOTE-runHealthTests-FAILED-5001W + REMOTE-CALL-FAILED-runHealthTests: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_updateDeploymentStatus: - errorCode: REMOTE-updateDeploymentStatus-FAILED-5001W + REMOTE-CALL-FAILED-updateDeploymentStatus: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/GuiClientApi.yaml index bf3d69d..1489339 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/GuiClientApi.yaml +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/GuiClientApi.yaml @@ -1,69 +1,57 @@ operations: - getTree: {} - getObject: {} - getTimeSerie: {} - getTable: {} - getHtml: {} - getGraph: {} - REMOTE_getTree: - decription: Remote call getTree - REMOTE_getObject: - decription: Remote call getObject - REMOTE_getTimeSerie: - decription: Remote call getTimeSerie - REMOTE_getTable: - decription: Remote call getTable - REMOTE_getHtml: - decription: Remote call getHtml - REMOTE_getGraph: - decription: Remote call getGraph + GuiClientApi@getTree: {} + GuiClientApi@getObject: {} + GuiClientApi@getTimeSerie: {} + GuiClientApi@getTable: {} + GuiClientApi@getHtml: {} + GuiClientApi@getGraph: {} messages: dummy: {} - getTree: - errorCode: getTree-FAILED-5001W + REQUEST-FAILED-getTree: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - getObject: - errorCode: getObject-FAILED-5001W + REQUEST-FAILED-getObject: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - getTimeSerie: - errorCode: getTimeSerie-FAILED-5001W + REQUEST-FAILED-getTimeSerie: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - getTable: - errorCode: getTable-FAILED-5001W + REQUEST-FAILED-getTable: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - getHtml: - errorCode: getHtml-FAILED-5001W + REQUEST-FAILED-getHtml: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - getGraph: - errorCode: getGraph-FAILED-5001W + REQUEST-FAILED-getGraph: + errorCode: 4001W messageFormat: '{0}' description: Operation Failed with Exception - REMOTE_getTree: - errorCode: REMOTE-getTree-FAILED-5001W + REMOTE-CALL-FAILED-getTree: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_getObject: - errorCode: REMOTE-getObject-FAILED-5001W + REMOTE-CALL-FAILED-getObject: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_getTimeSerie: - errorCode: REMOTE-getTimeSerie-FAILED-5001W + REMOTE-CALL-FAILED-getTimeSerie: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_getTable: - errorCode: REMOTE-getTable-FAILED-5001W + REMOTE-CALL-FAILED-getTable: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_getHtml: - errorCode: REMOTE-getHtml-FAILED-5001W + REMOTE-CALL-FAILED-getHtml: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception - REMOTE_getGraph: - errorCode: REMOTE-getGraph-FAILED-5001W + REMOTE-CALL-FAILED-getGraph: + errorCode: 4001W messageFormat: '{0}' description: Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManager.java index 4415331..9258c81 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManager.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManager.java @@ -25,24 +25,34 @@ package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager; + + import java.io.InputStream; import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISwaggerHandler; import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ISiriusProvider; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.SwaggerUtils; import org.openecomp.ncomp.sirius.function.FunctionUtils; import org.openecomp.ncomp.component.ApiRequestStatus; import org.apache.log4j.Logger; -import org.openecomp.logger.EcompLogger; +import org.openecomp.ncomp.sirius.manager.logging.NcompLogger; +import org.openecomp.logger.StatusCodeEnum; +import org.openecomp.logger.EcompException; import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; import org.json.JSONObject; import java.util.Date; import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging.CdapClusterManagerOperationEnum; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging.CdapClusterManagerMessageEnum; @@ -69,9 +79,9 @@ import org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClust -public class DcaeCdapClusterManager extends CdapClusterManagerImpl { +public class DcaeCdapClusterManager extends CdapClusterManagerImpl implements ISiriusProvider { public static final Logger logger = Logger.getLogger(DcaeCdapClusterManager.class); - static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + static final NcompLogger ecomplogger = NcompLogger.getNcompLogger(); public DcaeCdapClusterManagerProvider controller; ISiriusServer server; @@ -86,8 +96,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.test); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_test,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_test,"self:" + ManagementServer.object2ref(this)); try { res = controller.test(); } @@ -96,7 +106,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_test, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_test,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_test, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -111,8 +124,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.suspend); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_suspend,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_suspend,"self:" + ManagementServer.object2ref(this)); try { controller.suspend(); } @@ -121,7 +134,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_suspend, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_suspend,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_suspend, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -136,8 +152,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.resume); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_resume,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_resume,"self:" + ManagementServer.object2ref(this)); try { controller.resume(); } @@ -146,7 +162,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_resume, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_resume,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_resume, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -161,8 +180,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.START, duration_); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.publicKey); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_publicKey,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_publicKey,"self:" + ManagementServer.object2ref(this)); try { res = controller.publicKey(); } @@ -171,7 +190,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.ERROR, duration_); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_publicKey, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_publicKey,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_publicKey, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -186,8 +208,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.START, duration_); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.configurationChanged); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_configurationChanged,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_configurationChanged,"self:" + ManagementServer.object2ref(this)); try { controller.configurationChanged(); } @@ -196,7 +218,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.ERROR, duration_); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_configurationChanged, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_configurationChanged,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_configurationChanged, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -211,8 +236,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.START, duration_,inputStreams,outputStreams); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.updateStreams); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_updateStreams,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_updateStreams,"self:" + ManagementServer.object2ref(this)); try { controller.updateStreams(inputStreams,outputStreams); } @@ -221,7 +246,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.ERROR, duration_,inputStreams,outputStreams); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_updateStreams, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_updateStreams,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_updateStreams, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -236,8 +264,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "logs", ApiRequestStatus.START, duration_,cx,logs); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.logs); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_logs,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_logs,"self:" + ManagementServer.object2ref(this)); try { controller.logs(cx,logs); } @@ -246,7 +274,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "logs", ApiRequestStatus.ERROR, duration_,cx,logs); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_logs, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_logs,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_logs, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -261,8 +292,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.START, duration_,cx,metrics); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.metrics); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_metrics,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_metrics,"self:" + ManagementServer.object2ref(this)); try { controller.metrics(cx,metrics); } @@ -271,7 +302,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.ERROR, duration_,cx,metrics); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_metrics, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_metrics,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_metrics, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -286,8 +320,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "properties", ApiRequestStatus.START, duration_,cx,l); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.properties); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_properties,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_properties,"self:" + ManagementServer.object2ref(this)); try { controller.properties(cx,l); } @@ -296,7 +330,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "properties", ApiRequestStatus.ERROR, duration_,cx,l); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_properties, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_properties,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_properties, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -311,8 +348,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.START, duration_,cx,info); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.uploadInfo); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_uploadInfo,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_uploadInfo,"self:" + ManagementServer.object2ref(this)); try { controller.uploadInfo(cx,info); } @@ -321,7 +358,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.ERROR, duration_,cx,info); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_uploadInfo, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_uploadInfo,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_uploadInfo, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -336,8 +376,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.START, duration_,cx,path,start,end,option,relativeInterval); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.getValues); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_getValues,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_getValues,"self:" + ManagementServer.object2ref(this)); try { res = controller.getValues(cx,path,start,end,option,relativeInterval); } @@ -346,7 +386,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.ERROR, duration_,cx,path,start,end,option,relativeInterval); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_getValues, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_getValues,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_getValues, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -361,8 +404,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.START, duration_,cx,path,metrics,start,end,option,relativeInterval); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.getValuesAll); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_getValuesAll,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_getValuesAll,"self:" + ManagementServer.object2ref(this)); try { res = controller.getValuesAll(cx,path,metrics,start,end,option,relativeInterval); } @@ -371,7 +414,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.ERROR, duration_,cx,path,metrics,start,end,option,relativeInterval); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_getValuesAll, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_getValuesAll,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_getValuesAll, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -386,8 +432,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.START, duration_,cx,path,start,end); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.getMessages); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_getMessages,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_getMessages,"self:" + ManagementServer.object2ref(this)); try { res = controller.getMessages(cx,path,start,end); } @@ -396,7 +442,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.ERROR, duration_,cx,path,start,end); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_getMessages, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_getMessages,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_getMessages, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -411,8 +460,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.START, duration_,userName,action,resourcePath,context); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.getRequestLogger); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_getRequestLogger,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_getRequestLogger,"self:" + ManagementServer.object2ref(this)); try { res = controller.getRequestLogger(userName,action,resourcePath,context); } @@ -421,7 +470,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.ERROR, duration_,userName,action,resourcePath,context); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_getRequestLogger, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_getRequestLogger,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_getRequestLogger, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -436,8 +488,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.START, duration_,path,function); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.evaluate); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_evaluate,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_evaluate,"self:" + ManagementServer.object2ref(this)); try { res = controller.evaluate(path,function); } @@ -446,7 +498,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.ERROR, duration_,path,function); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_evaluate, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_evaluate,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_evaluate, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -461,8 +516,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "update", ApiRequestStatus.START, duration_,path,function); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.update); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_update,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_update,"self:" + ManagementServer.object2ref(this)); try { controller.update(path,function); } @@ -471,7 +526,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "update", ApiRequestStatus.ERROR, duration_,path,function); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_update, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_update,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_update, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -486,8 +544,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "createNamespace", ApiRequestStatus.START, duration_,namespace); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.createNamespace); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_createNamespace,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_createNamespace,"self:" + ManagementServer.object2ref(this)); try { res = controller.createNamespace(namespace); } @@ -496,7 +554,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "createNamespace", ApiRequestStatus.ERROR, duration_,namespace); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_createNamespace, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_createNamespace,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_createNamespace, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -511,8 +572,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "deleteNamespace", ApiRequestStatus.START, duration_,namespace); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.deleteNamespace); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_deleteNamespace,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_deleteNamespace,"self:" + ManagementServer.object2ref(this)); try { res = controller.deleteNamespace(namespace); } @@ -521,7 +582,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "deleteNamespace", ApiRequestStatus.ERROR, duration_,namespace); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteNamespace, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteNamespace,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteNamespace, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -536,8 +600,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "deployApp", ApiRequestStatus.START, duration_,namespace,jarfile); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.deployApp); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_deployApp,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_deployApp,"self:" + ManagementServer.object2ref(this)); try { res = controller.deployApp(namespace,jarfile); } @@ -546,7 +610,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "deployApp", ApiRequestStatus.ERROR, duration_,namespace,jarfile); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_deployApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_deployApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_deployApp, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -561,8 +628,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "loadArtifact", ApiRequestStatus.START, duration_,namespace,artifactName,jarfile,version); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.loadArtifact); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_loadArtifact,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_loadArtifact,"self:" + ManagementServer.object2ref(this)); try { res = controller.loadArtifact(namespace,artifactName,jarfile,version); } @@ -571,7 +638,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "loadArtifact", ApiRequestStatus.ERROR, duration_,namespace,artifactName,jarfile,version); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_loadArtifact, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_loadArtifact,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_loadArtifact, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -580,14 +650,42 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { return res; } + public java.lang.String loadArtifactWithConfig(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version, java.lang.String config) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "loadArtifactWithConfig", ApiRequestStatus.START, duration_,namespace,artifactName,jarfile,version,config); + Date now_ = new Date(); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_loadArtifactWithConfig,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_loadArtifactWithConfig,"self:" + ManagementServer.object2ref(this)); + try { + res = controller.loadArtifactWithConfig(namespace,artifactName,jarfile,version,config); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadArtifactWithConfig", ApiRequestStatus.ERROR, duration_,namespace,artifactName,jarfile,version,config); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_loadArtifactWithConfig, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_loadArtifactWithConfig,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_loadArtifactWithConfig, e.getMessage()); + throw e1; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadArtifactWithConfig", ApiRequestStatus.OKAY, duration_,namespace,artifactName,jarfile,version,config); + return res; + } + public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { java.lang.String res = null; long duration_ = 0; if (server != null) server.getServer().recordApi(null, this, "deleteArtifact", ApiRequestStatus.START, duration_,namespace,artifactName,artifactVersion); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.deleteArtifact); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_deleteArtifact,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_deleteArtifact,"self:" + ManagementServer.object2ref(this)); try { res = controller.deleteArtifact(namespace,artifactName,artifactVersion); } @@ -596,7 +694,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "deleteArtifact", ApiRequestStatus.ERROR, duration_,namespace,artifactName,artifactVersion); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteArtifact, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteArtifact,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteArtifact, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -611,8 +712,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "startFlow", ApiRequestStatus.START, duration_,namespace,appName,flowId,extraArgs); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.startFlow); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_startFlow,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_startFlow,"self:" + ManagementServer.object2ref(this)); try { res = controller.startFlow(namespace,appName,flowId,extraArgs); } @@ -621,7 +722,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "startFlow", ApiRequestStatus.ERROR, duration_,namespace,appName,flowId,extraArgs); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_startFlow, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_startFlow,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_startFlow, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -636,8 +740,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "startWorker", ApiRequestStatus.START, duration_,namespace,appName,workerId,extraArgs); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.startWorker); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_startWorker,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_startWorker,"self:" + ManagementServer.object2ref(this)); try { res = controller.startWorker(namespace,appName,workerId,extraArgs); } @@ -646,7 +750,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "startWorker", ApiRequestStatus.ERROR, duration_,namespace,appName,workerId,extraArgs); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_startWorker, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_startWorker,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_startWorker, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -661,8 +768,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "startService", ApiRequestStatus.START, duration_,namespace,appName,serviceId,extraArgs); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.startService); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_startService,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_startService,"self:" + ManagementServer.object2ref(this)); try { res = controller.startService(namespace,appName,serviceId,extraArgs); } @@ -671,7 +778,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "startService", ApiRequestStatus.ERROR, duration_,namespace,appName,serviceId,extraArgs); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_startService, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_startService,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_startService, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -686,8 +796,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "startApp", ApiRequestStatus.START, duration_,namespace,appName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.startApp); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_startApp,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_startApp,"self:" + ManagementServer.object2ref(this)); try { res = controller.startApp(namespace,appName); } @@ -696,7 +806,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "startApp", ApiRequestStatus.ERROR, duration_,namespace,appName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_startApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_startApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_startApp, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -711,8 +824,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.START, duration_,namespace,appName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.stopApp); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_stopApp,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_stopApp,"self:" + ManagementServer.object2ref(this)); try { res = controller.stopApp(namespace,appName); } @@ -721,7 +834,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.ERROR, duration_,namespace,appName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_stopApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_stopApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_stopApp, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -736,8 +852,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "deleteApp", ApiRequestStatus.START, duration_,namespace,appName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.deleteApp); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_deleteApp,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_deleteApp,"self:" + ManagementServer.object2ref(this)); try { res = controller.deleteApp(namespace,appName); } @@ -746,7 +862,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "deleteApp", ApiRequestStatus.ERROR, duration_,namespace,appName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteApp, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -761,8 +880,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "loadPreferencesApp", ApiRequestStatus.START, duration_,namespace,prefsFile,appId); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.loadPreferencesApp); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_loadPreferencesApp,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_loadPreferencesApp,"self:" + ManagementServer.object2ref(this)); try { res = controller.loadPreferencesApp(namespace,prefsFile,appId); } @@ -771,7 +890,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "loadPreferencesApp", ApiRequestStatus.ERROR, duration_,namespace,prefsFile,appId); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_loadPreferencesApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_loadPreferencesApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_loadPreferencesApp, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -786,8 +908,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "loadPreferencesFlow", ApiRequestStatus.START, duration_,namespace,prefsFile,appId,flowId); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.loadPreferencesFlow); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_loadPreferencesFlow,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_loadPreferencesFlow,"self:" + ManagementServer.object2ref(this)); try { res = controller.loadPreferencesFlow(namespace,prefsFile,appId,flowId); } @@ -796,7 +918,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "loadPreferencesFlow", ApiRequestStatus.ERROR, duration_,namespace,prefsFile,appId,flowId); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_loadPreferencesFlow, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_loadPreferencesFlow,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_loadPreferencesFlow, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -811,8 +936,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "loadPreferencesNameSpace", ApiRequestStatus.START, duration_,namespace,prefsFile); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.loadPreferencesNameSpace); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_loadPreferencesNameSpace,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_loadPreferencesNameSpace,"self:" + ManagementServer.object2ref(this)); try { res = controller.loadPreferencesNameSpace(namespace,prefsFile); } @@ -821,7 +946,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "loadPreferencesNameSpace", ApiRequestStatus.ERROR, duration_,namespace,prefsFile); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_loadPreferencesNameSpace, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_loadPreferencesNameSpace,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_loadPreferencesNameSpace, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -836,8 +964,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setPreferencesApp", ApiRequestStatus.START, duration_,namespace,prefsString,appId); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.setPreferencesApp); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesApp,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesApp,"self:" + ManagementServer.object2ref(this)); try { res = controller.setPreferencesApp(namespace,prefsString,appId); } @@ -846,7 +974,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setPreferencesApp", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesApp, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -861,8 +992,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setPreferencesFlow", ApiRequestStatus.START, duration_,namespace,prefsString,appId,flowId); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.setPreferencesFlow); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesFlow,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesFlow,"self:" + ManagementServer.object2ref(this)); try { res = controller.setPreferencesFlow(namespace,prefsString,appId,flowId); } @@ -871,7 +1002,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setPreferencesFlow", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId,flowId); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesFlow, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesFlow,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesFlow, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -886,8 +1020,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setPreferencesWorker", ApiRequestStatus.START, duration_,namespace,prefsString,appId,workerId); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.setPreferencesWorker); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesWorker,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesWorker,"self:" + ManagementServer.object2ref(this)); try { res = controller.setPreferencesWorker(namespace,prefsString,appId,workerId); } @@ -896,7 +1030,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setPreferencesWorker", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId,workerId); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesWorker, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesWorker,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesWorker, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -911,8 +1048,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setPreferencesService", ApiRequestStatus.START, duration_,namespace,prefsString,appId,serviceId); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.setPreferencesService); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesService,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesService,"self:" + ManagementServer.object2ref(this)); try { res = controller.setPreferencesService(namespace,prefsString,appId,serviceId); } @@ -921,7 +1058,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setPreferencesService", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId,serviceId); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesService, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesService,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesService, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -936,8 +1076,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setPreferencesNameSpace", ApiRequestStatus.START, duration_,namespace,prefsString); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.setPreferencesNameSpace); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesNameSpace,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesNameSpace,"self:" + ManagementServer.object2ref(this)); try { res = controller.setPreferencesNameSpace(namespace,prefsString); } @@ -946,7 +1086,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setPreferencesNameSpace", ApiRequestStatus.ERROR, duration_,namespace,prefsString); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesNameSpace, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesNameSpace,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_setPreferencesNameSpace, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -961,8 +1104,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setFlowRunTimeArgs", ApiRequestStatus.START, duration_,namespace,appId,flowId,args); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.setFlowRunTimeArgs); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_setFlowRunTimeArgs,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setFlowRunTimeArgs,"self:" + ManagementServer.object2ref(this)); try { res = controller.setFlowRunTimeArgs(namespace,appId,flowId,args); } @@ -971,7 +1114,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setFlowRunTimeArgs", ApiRequestStatus.ERROR, duration_,namespace,appId,flowId,args); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_setFlowRunTimeArgs, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_setFlowRunTimeArgs,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_setFlowRunTimeArgs, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -986,8 +1132,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setFlowletInstances", ApiRequestStatus.START, duration_,namespace,appId,flowId,flowletId,nInstances); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.setFlowletInstances); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_setFlowletInstances,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setFlowletInstances,"self:" + ManagementServer.object2ref(this)); try { res = controller.setFlowletInstances(namespace,appId,flowId,flowletId,nInstances); } @@ -996,7 +1142,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setFlowletInstances", ApiRequestStatus.ERROR, duration_,namespace,appId,flowId,flowletId,nInstances); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_setFlowletInstances, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_setFlowletInstances,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_setFlowletInstances, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1011,8 +1160,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "stopFlow", ApiRequestStatus.START, duration_,namespace,appId,flowId); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.stopFlow); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_stopFlow,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_stopFlow,"self:" + ManagementServer.object2ref(this)); try { res = controller.stopFlow(namespace,appId,flowId); } @@ -1021,7 +1170,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "stopFlow", ApiRequestStatus.ERROR, duration_,namespace,appId,flowId); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_stopFlow, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_stopFlow,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_stopFlow, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1036,8 +1188,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "stopWorker", ApiRequestStatus.START, duration_,namespace,appId,workerId); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.stopWorker); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_stopWorker,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_stopWorker,"self:" + ManagementServer.object2ref(this)); try { res = controller.stopWorker(namespace,appId,workerId); } @@ -1046,7 +1198,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "stopWorker", ApiRequestStatus.ERROR, duration_,namespace,appId,workerId); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_stopWorker, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_stopWorker,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_stopWorker, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1061,8 +1216,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "stopService", ApiRequestStatus.START, duration_,namespace,appId,serviceId); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.stopService); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_stopService,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_stopService,"self:" + ManagementServer.object2ref(this)); try { res = controller.stopService(namespace,appId,serviceId); } @@ -1071,7 +1226,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "stopService", ApiRequestStatus.ERROR, duration_,namespace,appId,serviceId); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_stopService, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_stopService,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_stopService, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1086,8 +1244,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "truncateDataSet", ApiRequestStatus.START, duration_,namespace,datasetName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.truncateDataSet); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_truncateDataSet,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_truncateDataSet,"self:" + ManagementServer.object2ref(this)); try { res = controller.truncateDataSet(namespace,datasetName); } @@ -1096,7 +1254,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "truncateDataSet", ApiRequestStatus.ERROR, duration_,namespace,datasetName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_truncateDataSet, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_truncateDataSet,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_truncateDataSet, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1111,8 +1272,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "deleteDataset", ApiRequestStatus.START, duration_,namespace,datasetName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.deleteDataset); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_deleteDataset,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_deleteDataset,"self:" + ManagementServer.object2ref(this)); try { res = controller.deleteDataset(namespace,datasetName); } @@ -1121,7 +1282,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "deleteDataset", ApiRequestStatus.ERROR, duration_,namespace,datasetName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteDataset, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteDataset,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteDataset, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1136,8 +1300,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "createStream", ApiRequestStatus.START, duration_,namespace,newStreamId); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.createStream); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_createStream,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_createStream,"self:" + ManagementServer.object2ref(this)); try { res = controller.createStream(namespace,newStreamId); } @@ -1146,7 +1310,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "createStream", ApiRequestStatus.ERROR, duration_,namespace,newStreamId); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_createStream, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_createStream,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_createStream, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1161,8 +1328,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "deleteStream", ApiRequestStatus.START, duration_,namespace,streamId); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.deleteStream); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_deleteStream,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_deleteStream,"self:" + ManagementServer.object2ref(this)); try { res = controller.deleteStream(namespace,streamId); } @@ -1171,7 +1338,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "deleteStream", ApiRequestStatus.ERROR, duration_,namespace,streamId); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteStream, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteStream,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_deleteStream, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1186,8 +1356,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "getStreamEvents", ApiRequestStatus.START, duration_,namespace,streamId,startTime,endTime,limit); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.getStreamEvents); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_getStreamEvents,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_getStreamEvents,"self:" + ManagementServer.object2ref(this)); try { res = controller.getStreamEvents(namespace,streamId,startTime,endTime,limit); } @@ -1196,7 +1366,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "getStreamEvents", ApiRequestStatus.ERROR, duration_,namespace,streamId,startTime,endTime,limit); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_getStreamEvents, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_getStreamEvents,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_getStreamEvents, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1211,8 +1384,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "getStreamStats", ApiRequestStatus.START, duration_,namespace,streamId,startTime,endTime,limit); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.getStreamStats); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_getStreamStats,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_getStreamStats,"self:" + ManagementServer.object2ref(this)); try { res = controller.getStreamStats(namespace,streamId,startTime,endTime,limit); } @@ -1221,7 +1394,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "getStreamStats", ApiRequestStatus.ERROR, duration_,namespace,streamId,startTime,endTime,limit); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_getStreamStats, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_getStreamStats,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_getStreamStats, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1236,8 +1412,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "sendEventToStream", ApiRequestStatus.START, duration_,namespace,streamId,event); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.sendEventToStream); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_sendEventToStream,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_sendEventToStream,"self:" + ManagementServer.object2ref(this)); try { res = controller.sendEventToStream(namespace,streamId,event); } @@ -1246,7 +1422,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "sendEventToStream", ApiRequestStatus.ERROR, duration_,namespace,streamId,event); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_sendEventToStream, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_sendEventToStream,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_sendEventToStream, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1261,8 +1440,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "trucateStream", ApiRequestStatus.START, duration_,namespace,streamId); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.trucateStream); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_trucateStream,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_trucateStream,"self:" + ManagementServer.object2ref(this)); try { res = controller.trucateStream(namespace,streamId); } @@ -1271,7 +1450,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "trucateStream", ApiRequestStatus.ERROR, duration_,namespace,streamId); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_trucateStream, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_trucateStream,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_trucateStream, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1286,8 +1468,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setStreamProperties", ApiRequestStatus.START, duration_,namespace,streamId,propsFile); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.setStreamProperties); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_setStreamProperties,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setStreamProperties,"self:" + ManagementServer.object2ref(this)); try { res = controller.setStreamProperties(namespace,streamId,propsFile); } @@ -1296,7 +1478,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setStreamProperties", ApiRequestStatus.ERROR, duration_,namespace,streamId,propsFile); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_setStreamProperties, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_setStreamProperties,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_setStreamProperties, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1311,8 +1496,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "restartApp", ApiRequestStatus.START, duration_,namespace,appId,progTypes); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.restartApp); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_restartApp,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_restartApp,"self:" + ManagementServer.object2ref(this)); try { res = controller.restartApp(namespace,appId,progTypes); } @@ -1321,7 +1506,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "restartApp", ApiRequestStatus.ERROR, duration_,namespace,appId,progTypes); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_restartApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_restartApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_restartApp, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1336,8 +1524,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "createApp", ApiRequestStatus.START, duration_,namespace,appId,artifactName,artifactVersion,scope); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.createApp); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_createApp,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_createApp,"self:" + ManagementServer.object2ref(this)); try { res = controller.createApp(namespace,appId,artifactName,artifactVersion,scope); } @@ -1346,7 +1534,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "createApp", ApiRequestStatus.ERROR, duration_,namespace,appId,artifactName,artifactVersion,scope); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_createApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_createApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_createApp, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1361,8 +1552,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "createAppWithConfig", ApiRequestStatus.START, duration_,namespace,appId,artifactName,artifactVersion,scope,appConfig); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.createAppWithConfig); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_createAppWithConfig,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_createAppWithConfig,"self:" + ManagementServer.object2ref(this)); try { res = controller.createAppWithConfig(namespace,appId,artifactName,artifactVersion,scope,appConfig); } @@ -1371,7 +1562,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "createAppWithConfig", ApiRequestStatus.ERROR, duration_,namespace,appId,artifactName,artifactVersion,scope,appConfig); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_createAppWithConfig, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_createAppWithConfig,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_createAppWithConfig, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1386,8 +1580,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setDatasetProperties", ApiRequestStatus.START, duration_,namespace,datasetName,datasetProperties); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.setDatasetProperties); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_setDatasetProperties,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setDatasetProperties,"self:" + ManagementServer.object2ref(this)); try { res = controller.setDatasetProperties(namespace,datasetName,datasetProperties); } @@ -1396,7 +1590,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setDatasetProperties", ApiRequestStatus.ERROR, duration_,namespace,datasetName,datasetProperties); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_setDatasetProperties, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_setDatasetProperties,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_setDatasetProperties, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1411,8 +1608,8 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setStreamTTL", ApiRequestStatus.START, duration_,namespace,streamName,ttlSeconds); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.setStreamTTL); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_setStreamTTL,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setStreamTTL,"self:" + ManagementServer.object2ref(this)); try { res = controller.setStreamTTL(namespace,streamName,ttlSeconds); } @@ -1421,7 +1618,10 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { if (server != null) server.getServer().recordApi(null, this, "setStreamTTL", ApiRequestStatus.ERROR, duration_,namespace,streamName,ttlSeconds); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_setStreamTTL, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_setStreamTTL,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_setStreamTTL, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -1430,6 +1630,64 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { return res; } + public java.lang.String suspendSchedule(java.lang.String namespace, java.lang.String appId, java.lang.String scheduleId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "suspendSchedule", ApiRequestStatus.START, duration_,namespace,appId,scheduleId); + Date now_ = new Date(); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_suspendSchedule,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_suspendSchedule,"self:" + ManagementServer.object2ref(this)); + try { + res = controller.suspendSchedule(namespace,appId,scheduleId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspendSchedule", ApiRequestStatus.ERROR, duration_,namespace,appId,scheduleId); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_suspendSchedule, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_suspendSchedule,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_suspendSchedule, e.getMessage()); + throw e1; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "suspendSchedule", ApiRequestStatus.OKAY, duration_,namespace,appId,scheduleId); + return res; + } + + public java.lang.String resumeSchedule(java.lang.String namespace, java.lang.String appId, java.lang.String scheduleId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "resumeSchedule", ApiRequestStatus.START, duration_,namespace,appId,scheduleId); + Date now_ = new Date(); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterManagerOperationEnum.CdapClusterManager_resumeSchedule,server,this); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_resumeSchedule,"self:" + ManagementServer.object2ref(this)); + try { + res = controller.resumeSchedule(namespace,appId,scheduleId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resumeSchedule", ApiRequestStatus.ERROR, duration_,namespace,appId,scheduleId); + System.err.println("ERROR: " + e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REQUEST_FAILED_resumeSchedule, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REQUEST_FAILED_resumeSchedule,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterManagerMessageEnum.REQUEST_FAILED_resumeSchedule, e.getMessage()); + throw e1; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "resumeSchedule", ApiRequestStatus.OKAY, duration_,namespace,appId,scheduleId); + return res; + } + + + @@ -1438,7 +1696,7 @@ public class DcaeCdapClusterManager extends CdapClusterManagerImpl { public static void ecoreSetup() { DcaeCdapClusterManagerProvider.ecoreSetup(); } - public DcaeCdapClusterManagerProvider getSomfProvider() { + public DcaeCdapClusterManagerProvider getSiriusProvider() { return controller; } } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerClient.java index dc1cfcf..fb346f4 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerClient.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerClient.java @@ -30,6 +30,8 @@ import org.openecomp.ncomp.sirius.manager.GenericHttpClient; import org.apache.log4j.Logger; import org.openecomp.logger.EcompLogger; +import org.openecomp.logger.StatusCodeEnum; +import org.openecomp.logger.EcompException; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; @@ -54,33 +56,37 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { DcaeCdapClusterManager.ecoreSetup(); client = new GenericHttpClient(file,name); client.add("/resources", this); + client.setVersion("ONAP-R2"); } public DcaeCdapClusterManagerClient(String file, String name1, String name2) { HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); client = client1.all; // requests should be forwarded to all. client.add("/resources", this); + client.setVersion("ONAP-R2"); } public DcaeCdapClusterManagerClient(AbstractClient c) { client = c; client.add("/resources", this); + client.setVersion("ONAP-R2"); } @Override public org.openecomp.dcae.controller.core.service.HealthTestResponse test() { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_test); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_test,client.getRemote()); org.openecomp.dcae.controller.core.service.HealthTestResponse res; try { res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_test, e.toString()); - throw new RuntimeException("remote call failed: test", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_test, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_test,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_test,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -88,16 +94,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public void suspend() { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_suspend); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_suspend,client.getRemote()); try { client.operationPath("/resources", c, "suspend", null); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_suspend, e.toString()); - throw new RuntimeException("remote call failed: suspend", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_suspend, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_suspend,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_suspend,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -105,16 +112,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public void resume() { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_resume); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_resume,client.getRemote()); try { client.operationPath("/resources", c, "resume", null); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_resume, e.toString()); - throw new RuntimeException("remote call failed: resume", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_resume, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_resume,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_resume,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -122,16 +130,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String publicKey() { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_publicKey); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_publicKey,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_publicKey, e.toString()); - throw new RuntimeException("remote call failed: publicKey", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_publicKey, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_publicKey,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_publicKey,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -139,16 +148,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public void configurationChanged() { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_configurationChanged); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_configurationChanged,client.getRemote()); try { client.operationPath("/resources", c, "configurationChanged", null); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_configurationChanged, e.toString()); - throw new RuntimeException("remote call failed: configurationChanged", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_configurationChanged, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_configurationChanged,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_configurationChanged,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -156,16 +166,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public void updateStreams(EList<org.openecomp.dcae.controller.core.stream.DcaeStream> inputStreams, EList<org.openecomp.dcae.controller.core.stream.DcaeStream> outputStreams) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_updateStreams); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_updateStreams,client.getRemote()); try { client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_updateStreams, e.toString()); - throw new RuntimeException("remote call failed: updateStreams", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_updateStreams, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_updateStreams,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_updateStreams,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -173,16 +184,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public void logs(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.logs.LogMessage> logs) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_logs); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_logs,client.getRemote()); try { client.operationPath("/resources", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_logs, e.toString()); - throw new RuntimeException("remote call failed: logs", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_logs, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_logs,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_logs,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -190,16 +202,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public void metrics(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.metrics.Metric> metrics) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_metrics); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_metrics,client.getRemote()); try { client.operationPath("/resources", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_metrics, e.toString()); - throw new RuntimeException("remote call failed: metrics", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_metrics, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_metrics,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_metrics,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -207,16 +220,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public void properties(org.json.JSONObject cx, EList<org.openecomp.ncomp.sirius.manager.properties.AbstractProperty> l) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_properties); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_properties,client.getRemote()); try { client.operationPath("/resources", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_properties, e.toString()); - throw new RuntimeException("remote call failed: properties", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_properties, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_properties,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_properties,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -224,16 +238,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public void uploadInfo(org.json.JSONObject cx, EList<org.openecomp.ncomp.sirius.manager.server.ManagementInfo> info) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_uploadInfo); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_uploadInfo,client.getRemote()); try { client.operationPath("/resources", c, "uploadInfo", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,info); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_uploadInfo, e.toString()); - throw new RuntimeException("remote call failed: uploadInfo", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_uploadInfo, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_uploadInfo,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_uploadInfo,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -241,16 +256,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public EList<org.openecomp.ncomp.core.metrics.DoubleMetric> getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getValues); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_getValues,client.getRemote()); EList<org.openecomp.ncomp.core.metrics.DoubleMetric> res; try { res = (EList<org.openecomp.ncomp.core.metrics.DoubleMetric>) client.operationPath("/resources", c, "getValues", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end,option,relativeInterval); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getValues, e.toString()); - throw new RuntimeException("remote call failed: getValues", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getValues, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getValues,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getValues,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -258,16 +274,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public EList<org.openecomp.ncomp.core.metrics.DoubleMetric> getValuesAll(org.json.JSONObject cx, java.lang.String path, EList<java.lang.String> metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getValuesAll); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_getValuesAll,client.getRemote()); EList<org.openecomp.ncomp.core.metrics.DoubleMetric> res; try { res = (EList<org.openecomp.ncomp.core.metrics.DoubleMetric>) client.operationPath("/resources", c, "getValuesAll", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,metrics,start,end,option,relativeInterval); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getValuesAll, e.toString()); - throw new RuntimeException("remote call failed: getValuesAll", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getValuesAll, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getValuesAll,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getValuesAll,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -275,16 +292,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public EList<org.openecomp.ncomp.core.logs.LogMessage> getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getMessages); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_getMessages,client.getRemote()); EList<org.openecomp.ncomp.core.logs.LogMessage> res; try { res = (EList<org.openecomp.ncomp.core.logs.LogMessage>) client.operationPath("/resources", c, "getMessages", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getMessages, e.toString()); - throw new RuntimeException("remote call failed: getMessages", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getMessages, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getMessages,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getMessages,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -292,16 +310,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getRequestLogger); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_getRequestLogger,client.getRemote()); org.openecomp.ncomp.sirius.manager.server.LoggerInfo res; try { res = (org.openecomp.ncomp.sirius.manager.server.LoggerInfo) client.operationPath("/resources", c, "getRequestLogger", null, userName,action,resourcePath,context); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getRequestLogger, e.toString()); - throw new RuntimeException("remote call failed: getRequestLogger", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getRequestLogger, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getRequestLogger,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getRequestLogger,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -309,16 +328,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public EList<org.openecomp.ncomp.core.function.ValuePair> evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_evaluate); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_evaluate,client.getRemote()); EList<org.openecomp.ncomp.core.function.ValuePair> res; try { res = (EList<org.openecomp.ncomp.core.function.ValuePair>) client.operationPath("/resources", c, "evaluate", null, path,function); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_evaluate, e.toString()); - throw new RuntimeException("remote call failed: evaluate", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_evaluate, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_evaluate,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_evaluate,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -326,16 +346,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_update); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_update,client.getRemote()); try { client.operationPath("/resources", c, "update", null, path,function); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_update, e.toString()); - throw new RuntimeException("remote call failed: update", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_update, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_update,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_update,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -343,16 +364,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String createNamespace(java.lang.String namespace) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_createNamespace); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_createNamespace,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "createNamespace", null, namespace); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_createNamespace, e.toString()); - throw new RuntimeException("remote call failed: createNamespace", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_createNamespace, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_createNamespace,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_createNamespace,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -360,16 +382,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String deleteNamespace(java.lang.String namespace) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteNamespace); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_deleteNamespace,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "deleteNamespace", null, namespace); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteNamespace, e.toString()); - throw new RuntimeException("remote call failed: deleteNamespace", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteNamespace, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteNamespace,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteNamespace,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -377,16 +400,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String deployApp(java.lang.String namespace, java.lang.String jarfile) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deployApp); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_deployApp,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "deployApp", null, namespace,jarfile); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deployApp, e.toString()); - throw new RuntimeException("remote call failed: deployApp", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deployApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deployApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deployApp,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -394,16 +418,35 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String loadArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_loadArtifact); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_loadArtifact,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "loadArtifact", null, namespace,artifactName,jarfile,version); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_loadArtifact, e.toString()); - throw new RuntimeException("remote call failed: loadArtifact", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadArtifact, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadArtifact,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadArtifact,e.getMessage()); + throw e1; + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String loadArtifactWithConfig(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version, java.lang.String config) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_loadArtifactWithConfig,client.getRemote()); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "loadArtifactWithConfig", null, namespace,artifactName,jarfile,version,config); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadArtifactWithConfig, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadArtifactWithConfig,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadArtifactWithConfig,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -411,16 +454,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteArtifact); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_deleteArtifact,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "deleteArtifact", null, namespace,artifactName,artifactVersion); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteArtifact, e.toString()); - throw new RuntimeException("remote call failed: deleteArtifact", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteArtifact, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteArtifact,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteArtifact,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -428,16 +472,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String startFlow(java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_startFlow); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_startFlow,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "startFlow", null, namespace,appName,flowId,extraArgs); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_startFlow, e.toString()); - throw new RuntimeException("remote call failed: startFlow", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_startFlow, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_startFlow,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_startFlow,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -445,16 +490,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String startWorker(java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_startWorker); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_startWorker,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "startWorker", null, namespace,appName,workerId,extraArgs); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_startWorker, e.toString()); - throw new RuntimeException("remote call failed: startWorker", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_startWorker, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_startWorker,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_startWorker,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -462,16 +508,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String startService(java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_startService); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_startService,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "startService", null, namespace,appName,serviceId,extraArgs); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_startService, e.toString()); - throw new RuntimeException("remote call failed: startService", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_startService, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_startService,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_startService,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -479,16 +526,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String startApp(java.lang.String namespace, java.lang.String appName) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_startApp); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_startApp,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "startApp", null, namespace,appName); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_startApp, e.toString()); - throw new RuntimeException("remote call failed: startApp", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_startApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_startApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_startApp,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -496,16 +544,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_stopApp); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_stopApp,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "stopApp", null, namespace,appName); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_stopApp, e.toString()); - throw new RuntimeException("remote call failed: stopApp", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_stopApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_stopApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_stopApp,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -513,16 +562,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String deleteApp(java.lang.String namespace, java.lang.String appName) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteApp); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_deleteApp,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "deleteApp", null, namespace,appName); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteApp, e.toString()); - throw new RuntimeException("remote call failed: deleteApp", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteApp,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -530,16 +580,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String loadPreferencesApp(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_loadPreferencesApp); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_loadPreferencesApp,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "loadPreferencesApp", null, namespace,prefsFile,appId); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_loadPreferencesApp, e.toString()); - throw new RuntimeException("remote call failed: loadPreferencesApp", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadPreferencesApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadPreferencesApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadPreferencesApp,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -547,16 +598,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String loadPreferencesFlow(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_loadPreferencesFlow); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_loadPreferencesFlow,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "loadPreferencesFlow", null, namespace,prefsFile,appId,flowId); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_loadPreferencesFlow, e.toString()); - throw new RuntimeException("remote call failed: loadPreferencesFlow", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadPreferencesFlow, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadPreferencesFlow,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadPreferencesFlow,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -564,16 +616,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String loadPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsFile) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_loadPreferencesNameSpace); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_loadPreferencesNameSpace,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "loadPreferencesNameSpace", null, namespace,prefsFile); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_loadPreferencesNameSpace, e.toString()); - throw new RuntimeException("remote call failed: loadPreferencesNameSpace", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadPreferencesNameSpace, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadPreferencesNameSpace,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_loadPreferencesNameSpace,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -581,16 +634,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String setPreferencesApp(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesApp); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesApp,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesApp", null, namespace,prefsString,appId); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesApp, e.toString()); - throw new RuntimeException("remote call failed: setPreferencesApp", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesApp,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -598,16 +652,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String setPreferencesFlow(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesFlow); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesFlow,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesFlow", null, namespace,prefsString,appId,flowId); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesFlow, e.toString()); - throw new RuntimeException("remote call failed: setPreferencesFlow", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesFlow, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesFlow,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesFlow,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -615,16 +670,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String setPreferencesWorker(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesWorker); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesWorker,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesWorker", null, namespace,prefsString,appId,workerId); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesWorker, e.toString()); - throw new RuntimeException("remote call failed: setPreferencesWorker", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesWorker, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesWorker,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesWorker,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -632,16 +688,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String setPreferencesService(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesService); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesService,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesService", null, namespace,prefsString,appId,serviceId); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesService, e.toString()); - throw new RuntimeException("remote call failed: setPreferencesService", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesService, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesService,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesService,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -649,16 +706,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String setPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsString) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setPreferencesNameSpace); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setPreferencesNameSpace,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "setPreferencesNameSpace", null, namespace,prefsString); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setPreferencesNameSpace, e.toString()); - throw new RuntimeException("remote call failed: setPreferencesNameSpace", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesNameSpace, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesNameSpace,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setPreferencesNameSpace,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -666,16 +724,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String setFlowRunTimeArgs(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setFlowRunTimeArgs); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setFlowRunTimeArgs,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "setFlowRunTimeArgs", null, namespace,appId,flowId,args); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setFlowRunTimeArgs, e.toString()); - throw new RuntimeException("remote call failed: setFlowRunTimeArgs", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setFlowRunTimeArgs, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setFlowRunTimeArgs,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setFlowRunTimeArgs,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -683,16 +742,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String setFlowletInstances(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setFlowletInstances); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setFlowletInstances,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "setFlowletInstances", null, namespace,appId,flowId,flowletId,nInstances); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setFlowletInstances, e.toString()); - throw new RuntimeException("remote call failed: setFlowletInstances", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setFlowletInstances, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setFlowletInstances,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setFlowletInstances,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -700,16 +760,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String stopFlow(java.lang.String namespace, java.lang.String appId, java.lang.String flowId) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_stopFlow); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_stopFlow,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "stopFlow", null, namespace,appId,flowId); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_stopFlow, e.toString()); - throw new RuntimeException("remote call failed: stopFlow", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_stopFlow, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_stopFlow,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_stopFlow,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -717,16 +778,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String stopWorker(java.lang.String namespace, java.lang.String appId, java.lang.String workerId) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_stopWorker); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_stopWorker,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "stopWorker", null, namespace,appId,workerId); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_stopWorker, e.toString()); - throw new RuntimeException("remote call failed: stopWorker", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_stopWorker, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_stopWorker,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_stopWorker,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -734,16 +796,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String stopService(java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_stopService); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_stopService,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "stopService", null, namespace,appId,serviceId); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_stopService, e.toString()); - throw new RuntimeException("remote call failed: stopService", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_stopService, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_stopService,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_stopService,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -751,16 +814,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String truncateDataSet(java.lang.String namespace, java.lang.String datasetName) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_truncateDataSet); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_truncateDataSet,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "truncateDataSet", null, namespace,datasetName); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_truncateDataSet, e.toString()); - throw new RuntimeException("remote call failed: truncateDataSet", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_truncateDataSet, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_truncateDataSet,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_truncateDataSet,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -768,16 +832,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String deleteDataset(java.lang.String namespace, java.lang.String datasetName) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteDataset); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_deleteDataset,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "deleteDataset", null, namespace,datasetName); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteDataset, e.toString()); - throw new RuntimeException("remote call failed: deleteDataset", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteDataset, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteDataset,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteDataset,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -785,16 +850,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String createStream(java.lang.String namespace, java.lang.String newStreamId) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_createStream); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_createStream,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "createStream", null, namespace,newStreamId); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_createStream, e.toString()); - throw new RuntimeException("remote call failed: createStream", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_createStream, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_createStream,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_createStream,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -802,16 +868,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String deleteStream(java.lang.String namespace, java.lang.String streamId) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_deleteStream); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_deleteStream,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "deleteStream", null, namespace,streamId); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_deleteStream, e.toString()); - throw new RuntimeException("remote call failed: deleteStream", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteStream, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteStream,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_deleteStream,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -819,16 +886,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public EList<java.lang.String> getStreamEvents(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getStreamEvents); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_getStreamEvents,client.getRemote()); EList<java.lang.String> res; try { res = (EList<java.lang.String>) client.operationPath("/resources", c, "getStreamEvents", null, namespace,streamId,startTime,endTime,limit); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getStreamEvents, e.toString()); - throw new RuntimeException("remote call failed: getStreamEvents", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getStreamEvents, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getStreamEvents,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getStreamEvents,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -836,16 +904,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public EList<java.lang.String> getStreamStats(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_getStreamStats); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_getStreamStats,client.getRemote()); EList<java.lang.String> res; try { res = (EList<java.lang.String>) client.operationPath("/resources", c, "getStreamStats", null, namespace,streamId,startTime,endTime,limit); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_getStreamStats, e.toString()); - throw new RuntimeException("remote call failed: getStreamStats", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getStreamStats, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getStreamStats,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_getStreamStats,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -853,16 +922,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String sendEventToStream(java.lang.String namespace, java.lang.String streamId, java.lang.String event) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_sendEventToStream); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_sendEventToStream,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "sendEventToStream", null, namespace,streamId,event); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_sendEventToStream, e.toString()); - throw new RuntimeException("remote call failed: sendEventToStream", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_sendEventToStream, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_sendEventToStream,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_sendEventToStream,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -870,16 +940,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String trucateStream(java.lang.String namespace, java.lang.String streamId) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_trucateStream); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_trucateStream,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "trucateStream", null, namespace,streamId); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_trucateStream, e.toString()); - throw new RuntimeException("remote call failed: trucateStream", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_trucateStream, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_trucateStream,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_trucateStream,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -887,16 +958,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String setStreamProperties(java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setStreamProperties); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setStreamProperties,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "setStreamProperties", null, namespace,streamId,propsFile); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setStreamProperties, e.toString()); - throw new RuntimeException("remote call failed: setStreamProperties", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setStreamProperties, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setStreamProperties,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setStreamProperties,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -904,16 +976,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String restartApp(java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_restartApp); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_restartApp,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "restartApp", null, namespace,appId,progTypes); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_restartApp, e.toString()); - throw new RuntimeException("remote call failed: restartApp", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_restartApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_restartApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_restartApp,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -921,16 +994,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String createApp(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_createApp); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_createApp,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "createApp", null, namespace,appId,artifactName,artifactVersion,scope); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_createApp, e.toString()); - throw new RuntimeException("remote call failed: createApp", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_createApp, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_createApp,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_createApp,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -938,16 +1012,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String createAppWithConfig(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_createAppWithConfig); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_createAppWithConfig,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "createAppWithConfig", null, namespace,appId,artifactName,artifactVersion,scope,appConfig); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_createAppWithConfig, e.toString()); - throw new RuntimeException("remote call failed: createAppWithConfig", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_createAppWithConfig, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_createAppWithConfig,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_createAppWithConfig,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -955,16 +1030,17 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String setDatasetProperties(java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setDatasetProperties); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setDatasetProperties,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "setDatasetProperties", null, namespace,datasetName,datasetProperties); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setDatasetProperties, e.toString()); - throw new RuntimeException("remote call failed: setDatasetProperties", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setDatasetProperties, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setDatasetProperties,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setDatasetProperties,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -972,16 +1048,53 @@ public class DcaeCdapClusterManagerClient extends CdapClusterManagerImpl { @Override public java.lang.String setStreamTTL(java.lang.String namespace, java.lang.String streamName, int ttlSeconds) { - EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterManagerOperationEnum.REMOTE_setStreamTTL); + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_setStreamTTL,client.getRemote()); java.lang.String res; try { res = (java.lang.String) client.operationPath("/resources", c, "setStreamTTL", null, namespace,streamName,ttlSeconds); } catch (Exception e) { - ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_setStreamTTL, e.toString()); - throw new RuntimeException("remote call failed: setStreamTTL", e); + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setStreamTTL, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setStreamTTL,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_setStreamTTL,e.getMessage()); + throw e1; + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String suspendSchedule(java.lang.String namespace, java.lang.String appId, java.lang.String scheduleId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_suspendSchedule,client.getRemote()); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "suspendSchedule", null, namespace,appId,scheduleId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_suspendSchedule, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_suspendSchedule,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_suspendSchedule,e.getMessage()); + throw e1; + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public java.lang.String resumeSchedule(java.lang.String namespace, java.lang.String appId, java.lang.String scheduleId) { + EClass c = ManagerPackage.eINSTANCE.getCdapClusterManager(); + ecomplogger.recordMetricEventStart(CdapClusterManagerOperationEnum.CdapClusterManager_resumeSchedule,client.getRemote()); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath("/resources", c, "resumeSchedule", null, namespace,appId,scheduleId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_resumeSchedule, e.toString()); + EcompException e1 = EcompException.create(CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_resumeSchedule,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterManagerMessageEnum.REMOTE_CALL_FAILED_resumeSchedule,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerConsole.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerConsole.java index 08062a0..6f89203 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerConsole.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerConsole.java @@ -278,6 +278,17 @@ public class DcaeCdapClusterManagerConsole extends Console { return res; } + public java.lang.String loadArtifactWithConfig(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version, java.lang.String config) { + java.lang.String res = null; + try { + res = controller.loadArtifactWithConfig(namespace,artifactName,jarfile,version,config); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { java.lang.String res = null; try { @@ -652,4 +663,26 @@ public class DcaeCdapClusterManagerConsole extends Console { return res; } + public java.lang.String suspendSchedule(java.lang.String namespace, java.lang.String appId, java.lang.String scheduleId) { + java.lang.String res = null; + try { + res = controller.suspendSchedule(namespace,appId,scheduleId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String resumeSchedule(java.lang.String namespace, java.lang.String appId, java.lang.String scheduleId) { + java.lang.String res = null; + try { + res = controller.resumeSchedule(namespace,appId,scheduleId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProviderTemplate.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProviderTemplate.java index f683359..2825ae5 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProviderTemplate.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProviderTemplate.java @@ -88,6 +88,12 @@ public class DcaeCdapClusterManagerProviderTemplate extends DcaeVirtualMachineMa throw new UnsupportedOperationException(); } + public java.lang.String loadArtifactWithConfig(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version, java.lang.String config) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { java.lang.String res = null; // TODO IMPLEMENT @@ -292,6 +298,18 @@ public class DcaeCdapClusterManagerProviderTemplate extends DcaeVirtualMachineMa throw new UnsupportedOperationException(); } + public java.lang.String suspendSchedule(java.lang.String namespace, java.lang.String appId, java.lang.String scheduleId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String resumeSchedule(java.lang.String namespace, java.lang.String appId, java.lang.String scheduleId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerServer.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerServer.java index 93dac4b..6934d36 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerServer.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerServer.java @@ -26,17 +26,16 @@ package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager; import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; import java.io.IOException; +import java.io.InputStream; import java.util.Properties; import java.util.TimeZone; import org.apache.log4j.Logger; import org.eclipse.emf.ecore.EFactory; - -import org.openecomp.entity.EcompComponent; -import org.openecomp.entity.EcompSubComponent; -import org.openecomp.entity.EcompSubComponentInstance; +import org.json.JSONObject; import org.openecomp.ncomp.sirius.manager.Jetty8Server; import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.IRequestHandler; import org.openecomp.ncomp.sirius.manager.ISiriusServer; import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; @@ -48,7 +47,7 @@ import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.Dc -public class DcaeCdapClusterManagerServer implements ISiriusServer { +public class DcaeCdapClusterManagerServer implements ISiriusServer, IRequestHandler { public static final Logger logger = Logger.getLogger(DcaeCdapClusterManagerServer.class); String serverPath; ManagementServer server; @@ -69,6 +68,7 @@ public class DcaeCdapClusterManagerServer implements ISiriusServer { props = getPropertiesFromClasspath(filename); serverPath = (String) props.get("server.dir"); server = new ManagementServer(f, "CdapClusterManager", serverPath, filename); + ManagementServer.setBuildVersion("ONAP-R2"); server.addFactory(f); server.addFactory(new org.openecomp.ncomp.servers.cdap.CdapCdapFactory(this)); @@ -84,6 +84,7 @@ public class DcaeCdapClusterManagerServer implements ISiriusServer { controller = (DcaeCdapClusterManager) server.find("/").o; webServer = new Jetty8Server("manager.properties"); webServer.add("/resources",server); + webServer.add("/api",this); @@ -112,4 +113,17 @@ public class DcaeCdapClusterManagerServer implements ISiriusServer { public ManagementServer getServer() { return server; } + public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context, + String clientVersion) { + switch ((String) context.get("path")) { + case "/api/versions": + return server.supportedVersions(); + } + logger.warn("Unknown request action=" + action + " path=" + resourcePath + " context=" + context.toString(2)); + throw new RuntimeException("Unknown request"); + } + public Object handleBinary(String userName, String action, String resourcePath, InputStream in) { + return null; + } + } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApi.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApi.java index 8c4d9e0..5f36e4e 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApi.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApi.java @@ -25,24 +25,34 @@ package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui; + + import java.io.InputStream; import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISwaggerHandler; import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ISiriusProvider; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.SwaggerUtils; import org.openecomp.ncomp.sirius.function.FunctionUtils; import org.openecomp.ncomp.component.ApiRequestStatus; import org.apache.log4j.Logger; -import org.openecomp.logger.EcompLogger; +import org.openecomp.ncomp.sirius.manager.logging.NcompLogger; +import org.openecomp.logger.StatusCodeEnum; +import org.openecomp.logger.EcompException; import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; import org.json.JSONObject; import java.util.Date; import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.logging.GuiClientApiMessageEnum; @@ -81,9 +91,9 @@ import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; -public class DcaeGuiClientApi extends GuiClientApiImpl { +public class DcaeGuiClientApi extends GuiClientApiImpl implements ISiriusProvider { public static final Logger logger = Logger.getLogger(DcaeGuiClientApi.class); - static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + static final NcompLogger ecomplogger = NcompLogger.getNcompLogger(); public DcaeGuiClientApiProvider controller; ISiriusServer server; @@ -98,8 +108,8 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { if (server != null) server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(GuiClientApiOperationEnum.getTree); + ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getTree,server,this); + ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTree,"self:" + ManagementServer.object2ref(this)); try { res = controller.getTree(); } @@ -108,7 +118,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { if (server != null) server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(GuiClientApiMessageEnum.REQUEST_FAILED_getTree, e.toString()); + EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REQUEST_FAILED_getTree,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, GuiClientApiMessageEnum.REQUEST_FAILED_getTree, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -123,8 +136,8 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { if (server != null) server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(GuiClientApiOperationEnum.getObject); + ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getObject,server,this); + ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getObject,"self:" + ManagementServer.object2ref(this)); try { res = controller.getObject(path); } @@ -133,7 +146,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { if (server != null) server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(GuiClientApiMessageEnum.REQUEST_FAILED_getObject, e.toString()); + EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REQUEST_FAILED_getObject,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, GuiClientApiMessageEnum.REQUEST_FAILED_getObject, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -148,8 +164,8 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { if (server != null) server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie); + ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getTimeSerie,server,this); + ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTimeSerie,"self:" + ManagementServer.object2ref(this)); try { res = controller.getTimeSerie(path,start,end,duration); } @@ -158,7 +174,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { if (server != null) server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(GuiClientApiMessageEnum.REQUEST_FAILED_getTimeSerie, e.toString()); + EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REQUEST_FAILED_getTimeSerie,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, GuiClientApiMessageEnum.REQUEST_FAILED_getTimeSerie, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -173,8 +192,8 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { if (server != null) server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(GuiClientApiOperationEnum.getTable); + ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getTable,server,this); + ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTable,"self:" + ManagementServer.object2ref(this)); try { res = controller.getTable(path,start,end); } @@ -183,7 +202,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { if (server != null) server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(GuiClientApiMessageEnum.REQUEST_FAILED_getTable, e.toString()); + EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REQUEST_FAILED_getTable,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, GuiClientApiMessageEnum.REQUEST_FAILED_getTable, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -198,8 +220,8 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { if (server != null) server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml); + ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getHtml,server,this); + ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getHtml,"self:" + ManagementServer.object2ref(this)); try { res = controller.getHtml(path,start,end); } @@ -208,7 +230,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { if (server != null) server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(GuiClientApiMessageEnum.REQUEST_FAILED_getHtml, e.toString()); + EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REQUEST_FAILED_getHtml,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, GuiClientApiMessageEnum.REQUEST_FAILED_getHtml, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -223,8 +248,8 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { if (server != null) server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph); + ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getGraph,server,this); + ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getGraph,"self:" + ManagementServer.object2ref(this)); try { res = controller.getGraph(path,start,end); } @@ -233,7 +258,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { if (server != null) server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(GuiClientApiMessageEnum.REQUEST_FAILED_getGraph, e.toString()); + EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REQUEST_FAILED_getGraph,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, GuiClientApiMessageEnum.REQUEST_FAILED_getGraph, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -247,10 +275,12 @@ public class DcaeGuiClientApi extends GuiClientApiImpl { + + public static void ecoreSetup() { DcaeGuiClientApiProvider.ecoreSetup(); } - public DcaeGuiClientApiProvider getSomfProvider() { + public DcaeGuiClientApiProvider getSiriusProvider() { return controller; } } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiClient.java index b7197f8..e64b782 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiClient.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/DcaeGuiClientApiClient.java @@ -30,6 +30,8 @@ import org.openecomp.ncomp.sirius.manager.GenericHttpClient; import org.apache.log4j.Logger; import org.openecomp.logger.EcompLogger; +import org.openecomp.logger.StatusCodeEnum; +import org.openecomp.logger.EcompException; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; @@ -55,33 +57,37 @@ public class DcaeGuiClientApiClient extends GuiClientApiImpl { DcaeCdapClusterManager.ecoreSetup(); client = new GenericHttpClient(file,name); client.add("/gui", this); + client.setVersion("ONAP-R2"); } public DcaeGuiClientApiClient(String file, String name1, String name2) { HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); client = client1.all; // requests should be forwarded to all. client.add("/gui", this); + client.setVersion("ONAP-R2"); } public DcaeGuiClientApiClient(AbstractClient c) { client = c; client.add("/resources", this); + client.setVersion("ONAP-R2"); } @Override public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { - EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree); + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); + ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTree,client.getRemote()); org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res; try { res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null); } catch (Exception e) { - ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString()); - throw new RuntimeException("remote call failed: getTree", e); + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTree, e.toString()); + EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTree,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTree,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -89,16 +95,17 @@ public class DcaeGuiClientApiClient extends GuiClientApiImpl { @Override public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { - EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject); + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); + ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getObject,client.getRemote()); org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res; try { res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path); } catch (Exception e) { - ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString()); - throw new RuntimeException("remote call failed: getObject", e); + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getObject, e.toString()); + EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getObject,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getObject,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -106,16 +113,17 @@ public class DcaeGuiClientApiClient extends GuiClientApiImpl { @Override public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { - EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie); + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); + ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTimeSerie,client.getRemote()); org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res; try { res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration); } catch (Exception e) { - ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString()); - throw new RuntimeException("remote call failed: getTimeSerie", e); + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTimeSerie, e.toString()); + EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTimeSerie,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTimeSerie,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -123,16 +131,17 @@ public class DcaeGuiClientApiClient extends GuiClientApiImpl { @Override public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { - EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable); + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); + ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTable,client.getRemote()); org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res; try { res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end); } catch (Exception e) { - ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString()); - throw new RuntimeException("remote call failed: getTable", e); + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTable, e.toString()); + EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTable,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTable,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -140,16 +149,17 @@ public class DcaeGuiClientApiClient extends GuiClientApiImpl { @Override public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { - EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml); + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); + ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getHtml,client.getRemote()); org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res; try { res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end); } catch (Exception e) { - ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString()); - throw new RuntimeException("remote call failed: getHtml", e); + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getHtml, e.toString()); + EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getHtml,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getHtml,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -157,16 +167,17 @@ public class DcaeGuiClientApiClient extends GuiClientApiImpl { @Override public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { - EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph); + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); + ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getGraph,client.getRemote()); org.openecomp.ncomp.sirius.manager.graph.GuiGraph res; try { res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end); } catch (Exception e) { - ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString()); - throw new RuntimeException("remote call failed: getGraph", e); + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getGraph, e.toString()); + EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getGraph,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getGraph,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApi.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApi.properties index 8705ab8..3822d29 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApi.properties +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApi.properties @@ -1,78 +1,78 @@ dummy=\ - null|\ + dummy-null|\ null|\ null|\ null -getTree=\ - getTree-FAILED-5001W|\ +REQUEST_FAILED_getTree=\ + REQUEST-FAILED-getTree-4001W|\ {0}|\ null|\ Operation Failed with Exception -getObject=\ - getObject-FAILED-5001W|\ +REQUEST_FAILED_getObject=\ + REQUEST-FAILED-getObject-4001W|\ {0}|\ null|\ Operation Failed with Exception -getTimeSerie=\ - getTimeSerie-FAILED-5001W|\ +REQUEST_FAILED_getTimeSerie=\ + REQUEST-FAILED-getTimeSerie-4001W|\ {0}|\ null|\ Operation Failed with Exception -getTable=\ - getTable-FAILED-5001W|\ +REQUEST_FAILED_getTable=\ + REQUEST-FAILED-getTable-4001W|\ {0}|\ null|\ Operation Failed with Exception -getHtml=\ - getHtml-FAILED-5001W|\ +REQUEST_FAILED_getHtml=\ + REQUEST-FAILED-getHtml-4001W|\ {0}|\ null|\ Operation Failed with Exception -getGraph=\ - getGraph-FAILED-5001W|\ +REQUEST_FAILED_getGraph=\ + REQUEST-FAILED-getGraph-4001W|\ {0}|\ null|\ Operation Failed with Exception -REMOTE_getTree=\ - REMOTE-getTree-FAILED-5001W|\ +REMOTE_CALL_FAILED_getTree=\ + REMOTE-CALL-FAILED-getTree-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_getObject=\ - REMOTE-getObject-FAILED-5001W|\ +REMOTE_CALL_FAILED_getObject=\ + REMOTE-CALL-FAILED-getObject-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_getTimeSerie=\ - REMOTE-getTimeSerie-FAILED-5001W|\ +REMOTE_CALL_FAILED_getTimeSerie=\ + REMOTE-CALL-FAILED-getTimeSerie-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_getTable=\ - REMOTE-getTable-FAILED-5001W|\ +REMOTE_CALL_FAILED_getTable=\ + REMOTE-CALL-FAILED-getTable-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_getHtml=\ - REMOTE-getHtml-FAILED-5001W|\ +REMOTE_CALL_FAILED_getHtml=\ + REMOTE-CALL-FAILED-getHtml-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_getGraph=\ - REMOTE-getGraph-FAILED-5001W|\ +REMOTE_CALL_FAILED_getGraph=\ + REMOTE-CALL-FAILED-getGraph-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiMessageEnum.java index 29983b0..adc8b1f 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiMessageEnum.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiMessageEnum.java @@ -1,25 +1,4 @@ -/*- - * ============LICENSE_START========================================== - * OPENECOMP - DCAE - * =================================================================== - * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END============================================ - */ - - package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.logging; import com.att.eelf.i18n.EELFResourceManager; @@ -28,20 +7,20 @@ import org.openecomp.logger.EcompMessageEnum; public enum GuiClientApiMessageEnum implements EcompMessageEnum { dummy, - getTree, - getObject, - getTimeSerie, - getTable, - getHtml, - getGraph, - REMOTE_getTree, - REMOTE_getObject, - REMOTE_getTimeSerie, - REMOTE_getTable, - REMOTE_getHtml, - REMOTE_getGraph; + REQUEST_FAILED_getTree, + REQUEST_FAILED_getObject, + REQUEST_FAILED_getTimeSerie, + REQUEST_FAILED_getTable, + REQUEST_FAILED_getHtml, + REQUEST_FAILED_getGraph, + REMOTE_CALL_FAILED_getTree, + REMOTE_CALL_FAILED_getObject, + REMOTE_CALL_FAILED_getTimeSerie, + REMOTE_CALL_FAILED_getTable, + REMOTE_CALL_FAILED_getHtml, + REMOTE_CALL_FAILED_getGraph; static { - EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.logging.GuiClientApi"); + EELFResourceManager.loadMessageBundle("org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApi"); } } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiOperationEnum.java index 7ae8593..ecceec4 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiOperationEnum.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/gui/logging/GuiClientApiOperationEnum.java @@ -1,41 +1,27 @@ -/*- - * ============LICENSE_START========================================== - * OPENECOMP - DCAE - * =================================================================== - * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END============================================ - */ - - package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.gui.logging; import org.openecomp.entity.EcompOperationEnum; public enum GuiClientApiOperationEnum implements EcompOperationEnum { - getTree, - getObject, - getTimeSerie, - getTable, - getHtml, - getGraph, - REMOTE_getTree, - REMOTE_getObject, - REMOTE_getTimeSerie, - REMOTE_getTable, - REMOTE_getHtml, - REMOTE_getGraph; + GuiClientApi_getTree("GuiClientApi@getTree"), + GuiClientApi_getObject("GuiClientApi@getObject"), + GuiClientApi_getTimeSerie("GuiClientApi@getTimeSerie"), + GuiClientApi_getTable("GuiClientApi@getTable"), + GuiClientApi_getHtml("GuiClientApi@getHtml"), + GuiClientApi_getGraph("GuiClientApi@getGraph") ; + + + private String n; + + private GuiClientApiOperationEnum(String n) { + this.n = n; + } + + @Override + public String toString() { + return n; + } + } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManager.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManager.properties index 4f94eae..31194a9 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManager.properties +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManager.properties @@ -1,654 +1,690 @@ dummy=\ - null|\ + dummy-null|\ null|\ null|\ null -test=\ - test-FAILED-5001W|\ +REQUEST_FAILED_test=\ + REQUEST-FAILED-test-4001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REQUEST_FAILED_suspend=\ + REQUEST-FAILED-suspend-4001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REQUEST_FAILED_resume=\ + REQUEST-FAILED-resume-4001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REQUEST_FAILED_publicKey=\ + REQUEST-FAILED-publicKey-4001W|\ {0}|\ null|\ Operation Failed with Exception -suspend=\ - suspend-FAILED-5001W|\ +REQUEST_FAILED_configurationChanged=\ + REQUEST-FAILED-configurationChanged-4001W|\ {0}|\ null|\ Operation Failed with Exception -resume=\ - resume-FAILED-5001W|\ +REQUEST_FAILED_updateStreams=\ + REQUEST-FAILED-updateStreams-4001W|\ {0}|\ null|\ Operation Failed with Exception -publicKey=\ - publicKey-FAILED-5001W|\ +REQUEST_FAILED_logs=\ + REQUEST-FAILED-logs-4001W|\ {0}|\ null|\ Operation Failed with Exception -configurationChanged=\ - configurationChanged-FAILED-5001W|\ +REQUEST_FAILED_metrics=\ + REQUEST-FAILED-metrics-4001W|\ {0}|\ null|\ Operation Failed with Exception -updateStreams=\ - updateStreams-FAILED-5001W|\ +REQUEST_FAILED_properties=\ + REQUEST-FAILED-properties-4001W|\ {0}|\ null|\ Operation Failed with Exception -logs=\ - logs-FAILED-5001W|\ +REQUEST_FAILED_uploadInfo=\ + REQUEST-FAILED-uploadInfo-4001W|\ {0}|\ null|\ Operation Failed with Exception -metrics=\ - metrics-FAILED-5001W|\ +REQUEST_FAILED_getValues=\ + REQUEST-FAILED-getValues-4001W|\ {0}|\ null|\ Operation Failed with Exception -properties=\ - properties-FAILED-5001W|\ +REQUEST_FAILED_getValuesAll=\ + REQUEST-FAILED-getValuesAll-4001W|\ {0}|\ null|\ Operation Failed with Exception -uploadInfo=\ - uploadInfo-FAILED-5001W|\ +REQUEST_FAILED_getMessages=\ + REQUEST-FAILED-getMessages-4001W|\ {0}|\ null|\ Operation Failed with Exception -getValues=\ - getValues-FAILED-5001W|\ +REQUEST_FAILED_getRequestLogger=\ + REQUEST-FAILED-getRequestLogger-4001W|\ {0}|\ null|\ Operation Failed with Exception -getValuesAll=\ - getValuesAll-FAILED-5001W|\ +REQUEST_FAILED_evaluate=\ + REQUEST-FAILED-evaluate-4001W|\ {0}|\ null|\ Operation Failed with Exception -getMessages=\ - getMessages-FAILED-5001W|\ +REQUEST_FAILED_update=\ + REQUEST-FAILED-update-4001W|\ {0}|\ null|\ Operation Failed with Exception -getRequestLogger=\ - getRequestLogger-FAILED-5001W|\ +REQUEST_FAILED_createNamespace=\ + REQUEST-FAILED-createNamespace-4001W|\ {0}|\ null|\ Operation Failed with Exception -evaluate=\ - evaluate-FAILED-5001W|\ +REQUEST_FAILED_deleteNamespace=\ + REQUEST-FAILED-deleteNamespace-4001W|\ {0}|\ null|\ Operation Failed with Exception -update=\ - update-FAILED-5001W|\ +REQUEST_FAILED_deployApp=\ + REQUEST-FAILED-deployApp-4001W|\ {0}|\ null|\ Operation Failed with Exception -createNamespace=\ - createNamespace-FAILED-5001W|\ +REQUEST_FAILED_loadArtifact=\ + REQUEST-FAILED-loadArtifact-4001W|\ {0}|\ null|\ Operation Failed with Exception -deleteNamespace=\ - deleteNamespace-FAILED-5001W|\ +REQUEST_FAILED_loadArtifactWithConfig=\ + REQUEST-FAILED-loadArtifactWithConfig-4001W|\ {0}|\ null|\ Operation Failed with Exception -deployApp=\ - deployApp-FAILED-5001W|\ +REQUEST_FAILED_deleteArtifact=\ + REQUEST-FAILED-deleteArtifact-4001W|\ {0}|\ null|\ Operation Failed with Exception -loadArtifact=\ - loadArtifact-FAILED-5001W|\ +REQUEST_FAILED_startFlow=\ + REQUEST-FAILED-startFlow-4001W|\ {0}|\ null|\ Operation Failed with Exception -deleteArtifact=\ - deleteArtifact-FAILED-5001W|\ +REQUEST_FAILED_startWorker=\ + REQUEST-FAILED-startWorker-4001W|\ {0}|\ null|\ Operation Failed with Exception -startFlow=\ - startFlow-FAILED-5001W|\ +REQUEST_FAILED_startService=\ + REQUEST-FAILED-startService-4001W|\ {0}|\ null|\ Operation Failed with Exception -startWorker=\ - startWorker-FAILED-5001W|\ +REQUEST_FAILED_startApp=\ + REQUEST-FAILED-startApp-4001W|\ {0}|\ null|\ Operation Failed with Exception -startService=\ - startService-FAILED-5001W|\ +REQUEST_FAILED_stopApp=\ + REQUEST-FAILED-stopApp-4001W|\ {0}|\ null|\ Operation Failed with Exception -startApp=\ - startApp-FAILED-5001W|\ +REQUEST_FAILED_deleteApp=\ + REQUEST-FAILED-deleteApp-4001W|\ {0}|\ null|\ Operation Failed with Exception -stopApp=\ - stopApp-FAILED-5001W|\ +REQUEST_FAILED_loadPreferencesApp=\ + REQUEST-FAILED-loadPreferencesApp-4001W|\ {0}|\ null|\ Operation Failed with Exception -deleteApp=\ - deleteApp-FAILED-5001W|\ +REQUEST_FAILED_loadPreferencesFlow=\ + REQUEST-FAILED-loadPreferencesFlow-4001W|\ {0}|\ null|\ Operation Failed with Exception -loadPreferencesApp=\ - loadPreferencesApp-FAILED-5001W|\ +REQUEST_FAILED_loadPreferencesNameSpace=\ + REQUEST-FAILED-loadPreferencesNameSpace-4001W|\ {0}|\ null|\ Operation Failed with Exception -loadPreferencesFlow=\ - loadPreferencesFlow-FAILED-5001W|\ +REQUEST_FAILED_setPreferencesApp=\ + REQUEST-FAILED-setPreferencesApp-4001W|\ {0}|\ null|\ Operation Failed with Exception -loadPreferencesNameSpace=\ - loadPreferencesNameSpace-FAILED-5001W|\ +REQUEST_FAILED_setPreferencesFlow=\ + REQUEST-FAILED-setPreferencesFlow-4001W|\ {0}|\ null|\ Operation Failed with Exception -setPreferencesApp=\ - setPreferencesApp-FAILED-5001W|\ +REQUEST_FAILED_setPreferencesWorker=\ + REQUEST-FAILED-setPreferencesWorker-4001W|\ {0}|\ null|\ Operation Failed with Exception -setPreferencesFlow=\ - setPreferencesFlow-FAILED-5001W|\ +REQUEST_FAILED_setPreferencesService=\ + REQUEST-FAILED-setPreferencesService-4001W|\ {0}|\ null|\ Operation Failed with Exception -setPreferencesWorker=\ - setPreferencesWorker-FAILED-5001W|\ +REQUEST_FAILED_setPreferencesNameSpace=\ + REQUEST-FAILED-setPreferencesNameSpace-4001W|\ {0}|\ null|\ Operation Failed with Exception -setPreferencesService=\ - setPreferencesService-FAILED-5001W|\ +REQUEST_FAILED_setFlowRunTimeArgs=\ + REQUEST-FAILED-setFlowRunTimeArgs-4001W|\ {0}|\ null|\ Operation Failed with Exception -setPreferencesNameSpace=\ - setPreferencesNameSpace-FAILED-5001W|\ +REQUEST_FAILED_setFlowletInstances=\ + REQUEST-FAILED-setFlowletInstances-4001W|\ {0}|\ null|\ Operation Failed with Exception -setFlowRunTimeArgs=\ - setFlowRunTimeArgs-FAILED-5001W|\ +REQUEST_FAILED_stopFlow=\ + REQUEST-FAILED-stopFlow-4001W|\ {0}|\ null|\ Operation Failed with Exception -setFlowletInstances=\ - setFlowletInstances-FAILED-5001W|\ +REQUEST_FAILED_stopWorker=\ + REQUEST-FAILED-stopWorker-4001W|\ {0}|\ null|\ Operation Failed with Exception -stopFlow=\ - stopFlow-FAILED-5001W|\ +REQUEST_FAILED_stopService=\ + REQUEST-FAILED-stopService-4001W|\ {0}|\ null|\ Operation Failed with Exception -stopWorker=\ - stopWorker-FAILED-5001W|\ +REQUEST_FAILED_truncateDataSet=\ + REQUEST-FAILED-truncateDataSet-4001W|\ {0}|\ null|\ Operation Failed with Exception -stopService=\ - stopService-FAILED-5001W|\ +REQUEST_FAILED_deleteDataset=\ + REQUEST-FAILED-deleteDataset-4001W|\ {0}|\ null|\ Operation Failed with Exception -truncateDataSet=\ - truncateDataSet-FAILED-5001W|\ +REQUEST_FAILED_createStream=\ + REQUEST-FAILED-createStream-4001W|\ {0}|\ null|\ Operation Failed with Exception -deleteDataset=\ - deleteDataset-FAILED-5001W|\ +REQUEST_FAILED_deleteStream=\ + REQUEST-FAILED-deleteStream-4001W|\ {0}|\ null|\ Operation Failed with Exception -createStream=\ - createStream-FAILED-5001W|\ +REQUEST_FAILED_getStreamEvents=\ + REQUEST-FAILED-getStreamEvents-4001W|\ {0}|\ null|\ Operation Failed with Exception -deleteStream=\ - deleteStream-FAILED-5001W|\ +REQUEST_FAILED_getStreamStats=\ + REQUEST-FAILED-getStreamStats-4001W|\ {0}|\ null|\ Operation Failed with Exception -getStreamEvents=\ - getStreamEvents-FAILED-5001W|\ +REQUEST_FAILED_sendEventToStream=\ + REQUEST-FAILED-sendEventToStream-4001W|\ {0}|\ null|\ Operation Failed with Exception -getStreamStats=\ - getStreamStats-FAILED-5001W|\ +REQUEST_FAILED_trucateStream=\ + REQUEST-FAILED-trucateStream-4001W|\ {0}|\ null|\ Operation Failed with Exception -sendEventToStream=\ - sendEventToStream-FAILED-5001W|\ +REQUEST_FAILED_setStreamProperties=\ + REQUEST-FAILED-setStreamProperties-4001W|\ {0}|\ null|\ Operation Failed with Exception -trucateStream=\ - trucateStream-FAILED-5001W|\ +REQUEST_FAILED_restartApp=\ + REQUEST-FAILED-restartApp-4001W|\ {0}|\ null|\ Operation Failed with Exception -setStreamProperties=\ - setStreamProperties-FAILED-5001W|\ +REQUEST_FAILED_createApp=\ + REQUEST-FAILED-createApp-4001W|\ {0}|\ null|\ Operation Failed with Exception -restartApp=\ - restartApp-FAILED-5001W|\ +REQUEST_FAILED_createAppWithConfig=\ + REQUEST-FAILED-createAppWithConfig-4001W|\ {0}|\ null|\ Operation Failed with Exception -createApp=\ - createApp-FAILED-5001W|\ +REQUEST_FAILED_setDatasetProperties=\ + REQUEST-FAILED-setDatasetProperties-4001W|\ {0}|\ null|\ Operation Failed with Exception -createAppWithConfig=\ - createAppWithConfig-FAILED-5001W|\ +REQUEST_FAILED_setStreamTTL=\ + REQUEST-FAILED-setStreamTTL-4001W|\ {0}|\ null|\ Operation Failed with Exception -setDatasetProperties=\ - setDatasetProperties-FAILED-5001W|\ +REQUEST_FAILED_suspendSchedule=\ + REQUEST-FAILED-suspendSchedule-4001W|\ {0}|\ null|\ Operation Failed with Exception -setStreamTTL=\ - setStreamTTL-FAILED-5001W|\ +REQUEST_FAILED_resumeSchedule=\ + REQUEST-FAILED-resumeSchedule-4001W|\ {0}|\ null|\ Operation Failed with Exception -REMOTE_test=\ - REMOTE-test-FAILED-5001W|\ +REMOTE_CALL_FAILED_test=\ + REMOTE-CALL-FAILED-test-4001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_CALL_FAILED_suspend=\ + REMOTE-CALL-FAILED-suspend-4001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_CALL_FAILED_resume=\ + REMOTE-CALL-FAILED-resume-4001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_CALL_FAILED_publicKey=\ + REMOTE-CALL-FAILED-publicKey-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_suspend=\ - REMOTE-suspend-FAILED-5001W|\ +REMOTE_CALL_FAILED_configurationChanged=\ + REMOTE-CALL-FAILED-configurationChanged-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_resume=\ - REMOTE-resume-FAILED-5001W|\ +REMOTE_CALL_FAILED_updateStreams=\ + REMOTE-CALL-FAILED-updateStreams-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_publicKey=\ - REMOTE-publicKey-FAILED-5001W|\ +REMOTE_CALL_FAILED_logs=\ + REMOTE-CALL-FAILED-logs-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_configurationChanged=\ - REMOTE-configurationChanged-FAILED-5001W|\ +REMOTE_CALL_FAILED_metrics=\ + REMOTE-CALL-FAILED-metrics-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_updateStreams=\ - REMOTE-updateStreams-FAILED-5001W|\ +REMOTE_CALL_FAILED_properties=\ + REMOTE-CALL-FAILED-properties-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_logs=\ - REMOTE-logs-FAILED-5001W|\ +REMOTE_CALL_FAILED_uploadInfo=\ + REMOTE-CALL-FAILED-uploadInfo-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_metrics=\ - REMOTE-metrics-FAILED-5001W|\ +REMOTE_CALL_FAILED_getValues=\ + REMOTE-CALL-FAILED-getValues-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_properties=\ - REMOTE-properties-FAILED-5001W|\ +REMOTE_CALL_FAILED_getValuesAll=\ + REMOTE-CALL-FAILED-getValuesAll-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_uploadInfo=\ - REMOTE-uploadInfo-FAILED-5001W|\ +REMOTE_CALL_FAILED_getMessages=\ + REMOTE-CALL-FAILED-getMessages-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_getValues=\ - REMOTE-getValues-FAILED-5001W|\ +REMOTE_CALL_FAILED_getRequestLogger=\ + REMOTE-CALL-FAILED-getRequestLogger-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_getValuesAll=\ - REMOTE-getValuesAll-FAILED-5001W|\ +REMOTE_CALL_FAILED_evaluate=\ + REMOTE-CALL-FAILED-evaluate-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_getMessages=\ - REMOTE-getMessages-FAILED-5001W|\ +REMOTE_CALL_FAILED_update=\ + REMOTE-CALL-FAILED-update-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_getRequestLogger=\ - REMOTE-getRequestLogger-FAILED-5001W|\ +REMOTE_CALL_FAILED_createNamespace=\ + REMOTE-CALL-FAILED-createNamespace-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_evaluate=\ - REMOTE-evaluate-FAILED-5001W|\ +REMOTE_CALL_FAILED_deleteNamespace=\ + REMOTE-CALL-FAILED-deleteNamespace-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_update=\ - REMOTE-update-FAILED-5001W|\ +REMOTE_CALL_FAILED_deployApp=\ + REMOTE-CALL-FAILED-deployApp-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_createNamespace=\ - REMOTE-createNamespace-FAILED-5001W|\ +REMOTE_CALL_FAILED_loadArtifact=\ + REMOTE-CALL-FAILED-loadArtifact-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_deleteNamespace=\ - REMOTE-deleteNamespace-FAILED-5001W|\ +REMOTE_CALL_FAILED_loadArtifactWithConfig=\ + REMOTE-CALL-FAILED-loadArtifactWithConfig-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_deployApp=\ - REMOTE-deployApp-FAILED-5001W|\ +REMOTE_CALL_FAILED_deleteArtifact=\ + REMOTE-CALL-FAILED-deleteArtifact-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_loadArtifact=\ - REMOTE-loadArtifact-FAILED-5001W|\ +REMOTE_CALL_FAILED_startFlow=\ + REMOTE-CALL-FAILED-startFlow-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_deleteArtifact=\ - REMOTE-deleteArtifact-FAILED-5001W|\ +REMOTE_CALL_FAILED_startWorker=\ + REMOTE-CALL-FAILED-startWorker-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_startFlow=\ - REMOTE-startFlow-FAILED-5001W|\ +REMOTE_CALL_FAILED_startService=\ + REMOTE-CALL-FAILED-startService-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_startWorker=\ - REMOTE-startWorker-FAILED-5001W|\ +REMOTE_CALL_FAILED_startApp=\ + REMOTE-CALL-FAILED-startApp-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_startService=\ - REMOTE-startService-FAILED-5001W|\ +REMOTE_CALL_FAILED_stopApp=\ + REMOTE-CALL-FAILED-stopApp-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_startApp=\ - REMOTE-startApp-FAILED-5001W|\ +REMOTE_CALL_FAILED_deleteApp=\ + REMOTE-CALL-FAILED-deleteApp-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_stopApp=\ - REMOTE-stopApp-FAILED-5001W|\ +REMOTE_CALL_FAILED_loadPreferencesApp=\ + REMOTE-CALL-FAILED-loadPreferencesApp-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_deleteApp=\ - REMOTE-deleteApp-FAILED-5001W|\ +REMOTE_CALL_FAILED_loadPreferencesFlow=\ + REMOTE-CALL-FAILED-loadPreferencesFlow-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_loadPreferencesApp=\ - REMOTE-loadPreferencesApp-FAILED-5001W|\ +REMOTE_CALL_FAILED_loadPreferencesNameSpace=\ + REMOTE-CALL-FAILED-loadPreferencesNameSpace-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_loadPreferencesFlow=\ - REMOTE-loadPreferencesFlow-FAILED-5001W|\ +REMOTE_CALL_FAILED_setPreferencesApp=\ + REMOTE-CALL-FAILED-setPreferencesApp-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_loadPreferencesNameSpace=\ - REMOTE-loadPreferencesNameSpace-FAILED-5001W|\ +REMOTE_CALL_FAILED_setPreferencesFlow=\ + REMOTE-CALL-FAILED-setPreferencesFlow-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_setPreferencesApp=\ - REMOTE-setPreferencesApp-FAILED-5001W|\ +REMOTE_CALL_FAILED_setPreferencesWorker=\ + REMOTE-CALL-FAILED-setPreferencesWorker-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_setPreferencesFlow=\ - REMOTE-setPreferencesFlow-FAILED-5001W|\ +REMOTE_CALL_FAILED_setPreferencesService=\ + REMOTE-CALL-FAILED-setPreferencesService-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_setPreferencesWorker=\ - REMOTE-setPreferencesWorker-FAILED-5001W|\ +REMOTE_CALL_FAILED_setPreferencesNameSpace=\ + REMOTE-CALL-FAILED-setPreferencesNameSpace-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_setPreferencesService=\ - REMOTE-setPreferencesService-FAILED-5001W|\ +REMOTE_CALL_FAILED_setFlowRunTimeArgs=\ + REMOTE-CALL-FAILED-setFlowRunTimeArgs-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_setPreferencesNameSpace=\ - REMOTE-setPreferencesNameSpace-FAILED-5001W|\ +REMOTE_CALL_FAILED_setFlowletInstances=\ + REMOTE-CALL-FAILED-setFlowletInstances-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_setFlowRunTimeArgs=\ - REMOTE-setFlowRunTimeArgs-FAILED-5001W|\ +REMOTE_CALL_FAILED_stopFlow=\ + REMOTE-CALL-FAILED-stopFlow-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_setFlowletInstances=\ - REMOTE-setFlowletInstances-FAILED-5001W|\ +REMOTE_CALL_FAILED_stopWorker=\ + REMOTE-CALL-FAILED-stopWorker-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_stopFlow=\ - REMOTE-stopFlow-FAILED-5001W|\ +REMOTE_CALL_FAILED_stopService=\ + REMOTE-CALL-FAILED-stopService-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_stopWorker=\ - REMOTE-stopWorker-FAILED-5001W|\ +REMOTE_CALL_FAILED_truncateDataSet=\ + REMOTE-CALL-FAILED-truncateDataSet-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_stopService=\ - REMOTE-stopService-FAILED-5001W|\ +REMOTE_CALL_FAILED_deleteDataset=\ + REMOTE-CALL-FAILED-deleteDataset-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_truncateDataSet=\ - REMOTE-truncateDataSet-FAILED-5001W|\ +REMOTE_CALL_FAILED_createStream=\ + REMOTE-CALL-FAILED-createStream-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_deleteDataset=\ - REMOTE-deleteDataset-FAILED-5001W|\ +REMOTE_CALL_FAILED_deleteStream=\ + REMOTE-CALL-FAILED-deleteStream-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_createStream=\ - REMOTE-createStream-FAILED-5001W|\ +REMOTE_CALL_FAILED_getStreamEvents=\ + REMOTE-CALL-FAILED-getStreamEvents-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_deleteStream=\ - REMOTE-deleteStream-FAILED-5001W|\ +REMOTE_CALL_FAILED_getStreamStats=\ + REMOTE-CALL-FAILED-getStreamStats-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_getStreamEvents=\ - REMOTE-getStreamEvents-FAILED-5001W|\ +REMOTE_CALL_FAILED_sendEventToStream=\ + REMOTE-CALL-FAILED-sendEventToStream-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_getStreamStats=\ - REMOTE-getStreamStats-FAILED-5001W|\ +REMOTE_CALL_FAILED_trucateStream=\ + REMOTE-CALL-FAILED-trucateStream-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_sendEventToStream=\ - REMOTE-sendEventToStream-FAILED-5001W|\ +REMOTE_CALL_FAILED_setStreamProperties=\ + REMOTE-CALL-FAILED-setStreamProperties-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_trucateStream=\ - REMOTE-trucateStream-FAILED-5001W|\ +REMOTE_CALL_FAILED_restartApp=\ + REMOTE-CALL-FAILED-restartApp-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_setStreamProperties=\ - REMOTE-setStreamProperties-FAILED-5001W|\ +REMOTE_CALL_FAILED_createApp=\ + REMOTE-CALL-FAILED-createApp-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_restartApp=\ - REMOTE-restartApp-FAILED-5001W|\ +REMOTE_CALL_FAILED_createAppWithConfig=\ + REMOTE-CALL-FAILED-createAppWithConfig-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_createApp=\ - REMOTE-createApp-FAILED-5001W|\ +REMOTE_CALL_FAILED_setDatasetProperties=\ + REMOTE-CALL-FAILED-setDatasetProperties-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_createAppWithConfig=\ - REMOTE-createAppWithConfig-FAILED-5001W|\ +REMOTE_CALL_FAILED_setStreamTTL=\ + REMOTE-CALL-FAILED-setStreamTTL-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_setDatasetProperties=\ - REMOTE-setDatasetProperties-FAILED-5001W|\ +REMOTE_CALL_FAILED_suspendSchedule=\ + REMOTE-CALL-FAILED-suspendSchedule-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_setStreamTTL=\ - REMOTE-setStreamTTL-FAILED-5001W|\ +REMOTE_CALL_FAILED_resumeSchedule=\ + REMOTE-CALL-FAILED-resumeSchedule-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerMessageEnum.java index d632aa7..ade48c7 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerMessageEnum.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerMessageEnum.java @@ -1,25 +1,4 @@ -/*- - * ============LICENSE_START========================================== - * OPENECOMP - DCAE - * =================================================================== - * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END============================================ - */ - - package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging; import com.att.eelf.i18n.EELFResourceManager; @@ -28,116 +7,122 @@ import org.openecomp.logger.EcompMessageEnum; public enum CdapClusterManagerMessageEnum implements EcompMessageEnum { dummy, - test, - suspend, - resume, - publicKey, - configurationChanged, - updateStreams, - logs, - metrics, - properties, - uploadInfo, - getValues, - getValuesAll, - getMessages, - getRequestLogger, - evaluate, - update, - createNamespace, - deleteNamespace, - deployApp, - loadArtifact, - deleteArtifact, - startFlow, - startWorker, - startService, - startApp, - stopApp, - deleteApp, - loadPreferencesApp, - loadPreferencesFlow, - loadPreferencesNameSpace, - setPreferencesApp, - setPreferencesFlow, - setPreferencesWorker, - setPreferencesService, - setPreferencesNameSpace, - setFlowRunTimeArgs, - setFlowletInstances, - stopFlow, - stopWorker, - stopService, - truncateDataSet, - deleteDataset, - createStream, - deleteStream, - getStreamEvents, - getStreamStats, - sendEventToStream, - trucateStream, - setStreamProperties, - restartApp, - createApp, - createAppWithConfig, - setDatasetProperties, - setStreamTTL, - REMOTE_test, - REMOTE_suspend, - REMOTE_resume, - REMOTE_publicKey, - REMOTE_configurationChanged, - REMOTE_updateStreams, - REMOTE_logs, - REMOTE_metrics, - REMOTE_properties, - REMOTE_uploadInfo, - REMOTE_getValues, - REMOTE_getValuesAll, - REMOTE_getMessages, - REMOTE_getRequestLogger, - REMOTE_evaluate, - REMOTE_update, - REMOTE_createNamespace, - REMOTE_deleteNamespace, - REMOTE_deployApp, - REMOTE_loadArtifact, - REMOTE_deleteArtifact, - REMOTE_startFlow, - REMOTE_startWorker, - REMOTE_startService, - REMOTE_startApp, - REMOTE_stopApp, - REMOTE_deleteApp, - REMOTE_loadPreferencesApp, - REMOTE_loadPreferencesFlow, - REMOTE_loadPreferencesNameSpace, - REMOTE_setPreferencesApp, - REMOTE_setPreferencesFlow, - REMOTE_setPreferencesWorker, - REMOTE_setPreferencesService, - REMOTE_setPreferencesNameSpace, - REMOTE_setFlowRunTimeArgs, - REMOTE_setFlowletInstances, - REMOTE_stopFlow, - REMOTE_stopWorker, - REMOTE_stopService, - REMOTE_truncateDataSet, - REMOTE_deleteDataset, - REMOTE_createStream, - REMOTE_deleteStream, - REMOTE_getStreamEvents, - REMOTE_getStreamStats, - REMOTE_sendEventToStream, - REMOTE_trucateStream, - REMOTE_setStreamProperties, - REMOTE_restartApp, - REMOTE_createApp, - REMOTE_createAppWithConfig, - REMOTE_setDatasetProperties, - REMOTE_setStreamTTL; + REQUEST_FAILED_test, + REQUEST_FAILED_suspend, + REQUEST_FAILED_resume, + REQUEST_FAILED_publicKey, + REQUEST_FAILED_configurationChanged, + REQUEST_FAILED_updateStreams, + REQUEST_FAILED_logs, + REQUEST_FAILED_metrics, + REQUEST_FAILED_properties, + REQUEST_FAILED_uploadInfo, + REQUEST_FAILED_getValues, + REQUEST_FAILED_getValuesAll, + REQUEST_FAILED_getMessages, + REQUEST_FAILED_getRequestLogger, + REQUEST_FAILED_evaluate, + REQUEST_FAILED_update, + REQUEST_FAILED_createNamespace, + REQUEST_FAILED_deleteNamespace, + REQUEST_FAILED_deployApp, + REQUEST_FAILED_loadArtifact, + REQUEST_FAILED_loadArtifactWithConfig, + REQUEST_FAILED_deleteArtifact, + REQUEST_FAILED_startFlow, + REQUEST_FAILED_startWorker, + REQUEST_FAILED_startService, + REQUEST_FAILED_startApp, + REQUEST_FAILED_stopApp, + REQUEST_FAILED_deleteApp, + REQUEST_FAILED_loadPreferencesApp, + REQUEST_FAILED_loadPreferencesFlow, + REQUEST_FAILED_loadPreferencesNameSpace, + REQUEST_FAILED_setPreferencesApp, + REQUEST_FAILED_setPreferencesFlow, + REQUEST_FAILED_setPreferencesWorker, + REQUEST_FAILED_setPreferencesService, + REQUEST_FAILED_setPreferencesNameSpace, + REQUEST_FAILED_setFlowRunTimeArgs, + REQUEST_FAILED_setFlowletInstances, + REQUEST_FAILED_stopFlow, + REQUEST_FAILED_stopWorker, + REQUEST_FAILED_stopService, + REQUEST_FAILED_truncateDataSet, + REQUEST_FAILED_deleteDataset, + REQUEST_FAILED_createStream, + REQUEST_FAILED_deleteStream, + REQUEST_FAILED_getStreamEvents, + REQUEST_FAILED_getStreamStats, + REQUEST_FAILED_sendEventToStream, + REQUEST_FAILED_trucateStream, + REQUEST_FAILED_setStreamProperties, + REQUEST_FAILED_restartApp, + REQUEST_FAILED_createApp, + REQUEST_FAILED_createAppWithConfig, + REQUEST_FAILED_setDatasetProperties, + REQUEST_FAILED_setStreamTTL, + REQUEST_FAILED_suspendSchedule, + REQUEST_FAILED_resumeSchedule, + REMOTE_CALL_FAILED_test, + REMOTE_CALL_FAILED_suspend, + REMOTE_CALL_FAILED_resume, + REMOTE_CALL_FAILED_publicKey, + REMOTE_CALL_FAILED_configurationChanged, + REMOTE_CALL_FAILED_updateStreams, + REMOTE_CALL_FAILED_logs, + REMOTE_CALL_FAILED_metrics, + REMOTE_CALL_FAILED_properties, + REMOTE_CALL_FAILED_uploadInfo, + REMOTE_CALL_FAILED_getValues, + REMOTE_CALL_FAILED_getValuesAll, + REMOTE_CALL_FAILED_getMessages, + REMOTE_CALL_FAILED_getRequestLogger, + REMOTE_CALL_FAILED_evaluate, + REMOTE_CALL_FAILED_update, + REMOTE_CALL_FAILED_createNamespace, + REMOTE_CALL_FAILED_deleteNamespace, + REMOTE_CALL_FAILED_deployApp, + REMOTE_CALL_FAILED_loadArtifact, + REMOTE_CALL_FAILED_loadArtifactWithConfig, + REMOTE_CALL_FAILED_deleteArtifact, + REMOTE_CALL_FAILED_startFlow, + REMOTE_CALL_FAILED_startWorker, + REMOTE_CALL_FAILED_startService, + REMOTE_CALL_FAILED_startApp, + REMOTE_CALL_FAILED_stopApp, + REMOTE_CALL_FAILED_deleteApp, + REMOTE_CALL_FAILED_loadPreferencesApp, + REMOTE_CALL_FAILED_loadPreferencesFlow, + REMOTE_CALL_FAILED_loadPreferencesNameSpace, + REMOTE_CALL_FAILED_setPreferencesApp, + REMOTE_CALL_FAILED_setPreferencesFlow, + REMOTE_CALL_FAILED_setPreferencesWorker, + REMOTE_CALL_FAILED_setPreferencesService, + REMOTE_CALL_FAILED_setPreferencesNameSpace, + REMOTE_CALL_FAILED_setFlowRunTimeArgs, + REMOTE_CALL_FAILED_setFlowletInstances, + REMOTE_CALL_FAILED_stopFlow, + REMOTE_CALL_FAILED_stopWorker, + REMOTE_CALL_FAILED_stopService, + REMOTE_CALL_FAILED_truncateDataSet, + REMOTE_CALL_FAILED_deleteDataset, + REMOTE_CALL_FAILED_createStream, + REMOTE_CALL_FAILED_deleteStream, + REMOTE_CALL_FAILED_getStreamEvents, + REMOTE_CALL_FAILED_getStreamStats, + REMOTE_CALL_FAILED_sendEventToStream, + REMOTE_CALL_FAILED_trucateStream, + REMOTE_CALL_FAILED_setStreamProperties, + REMOTE_CALL_FAILED_restartApp, + REMOTE_CALL_FAILED_createApp, + REMOTE_CALL_FAILED_createAppWithConfig, + REMOTE_CALL_FAILED_setDatasetProperties, + REMOTE_CALL_FAILED_setStreamTTL, + REMOTE_CALL_FAILED_suspendSchedule, + REMOTE_CALL_FAILED_resumeSchedule; static { - EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging.CdapClusterManager"); + EELFResourceManager.loadMessageBundle("org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManager"); } } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerOperationEnum.java index 64bca0c..ba80c70 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerOperationEnum.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/logging/CdapClusterManagerOperationEnum.java @@ -1,137 +1,78 @@ -/*- - * ============LICENSE_START========================================== - * OPENECOMP - DCAE - * =================================================================== - * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END============================================ - */ - - package org.openecomp.dcae.controller.service.cdap.cluster.servers.manager.logging; import org.openecomp.entity.EcompOperationEnum; public enum CdapClusterManagerOperationEnum implements EcompOperationEnum { - test, - suspend, - resume, - publicKey, - configurationChanged, - updateStreams, - logs, - metrics, - properties, - uploadInfo, - getValues, - getValuesAll, - getMessages, - getRequestLogger, - evaluate, - update, - createNamespace, - deleteNamespace, - deployApp, - loadArtifact, - deleteArtifact, - startFlow, - startWorker, - startService, - startApp, - stopApp, - deleteApp, - loadPreferencesApp, - loadPreferencesFlow, - loadPreferencesNameSpace, - setPreferencesApp, - setPreferencesFlow, - setPreferencesWorker, - setPreferencesService, - setPreferencesNameSpace, - setFlowRunTimeArgs, - setFlowletInstances, - stopFlow, - stopWorker, - stopService, - truncateDataSet, - deleteDataset, - createStream, - deleteStream, - getStreamEvents, - getStreamStats, - sendEventToStream, - trucateStream, - setStreamProperties, - restartApp, - createApp, - createAppWithConfig, - setDatasetProperties, - setStreamTTL, - REMOTE_test, - REMOTE_suspend, - REMOTE_resume, - REMOTE_publicKey, - REMOTE_configurationChanged, - REMOTE_updateStreams, - REMOTE_logs, - REMOTE_metrics, - REMOTE_properties, - REMOTE_uploadInfo, - REMOTE_getValues, - REMOTE_getValuesAll, - REMOTE_getMessages, - REMOTE_getRequestLogger, - REMOTE_evaluate, - REMOTE_update, - REMOTE_createNamespace, - REMOTE_deleteNamespace, - REMOTE_deployApp, - REMOTE_loadArtifact, - REMOTE_deleteArtifact, - REMOTE_startFlow, - REMOTE_startWorker, - REMOTE_startService, - REMOTE_startApp, - REMOTE_stopApp, - REMOTE_deleteApp, - REMOTE_loadPreferencesApp, - REMOTE_loadPreferencesFlow, - REMOTE_loadPreferencesNameSpace, - REMOTE_setPreferencesApp, - REMOTE_setPreferencesFlow, - REMOTE_setPreferencesWorker, - REMOTE_setPreferencesService, - REMOTE_setPreferencesNameSpace, - REMOTE_setFlowRunTimeArgs, - REMOTE_setFlowletInstances, - REMOTE_stopFlow, - REMOTE_stopWorker, - REMOTE_stopService, - REMOTE_truncateDataSet, - REMOTE_deleteDataset, - REMOTE_createStream, - REMOTE_deleteStream, - REMOTE_getStreamEvents, - REMOTE_getStreamStats, - REMOTE_sendEventToStream, - REMOTE_trucateStream, - REMOTE_setStreamProperties, - REMOTE_restartApp, - REMOTE_createApp, - REMOTE_createAppWithConfig, - REMOTE_setDatasetProperties, - REMOTE_setStreamTTL; + CdapClusterManager_test("CdapClusterManager@test"), + CdapClusterManager_suspend("CdapClusterManager@suspend"), + CdapClusterManager_resume("CdapClusterManager@resume"), + CdapClusterManager_publicKey("CdapClusterManager@publicKey"), + CdapClusterManager_configurationChanged("CdapClusterManager@configurationChanged"), + CdapClusterManager_updateStreams("CdapClusterManager@updateStreams"), + CdapClusterManager_logs("CdapClusterManager@logs"), + CdapClusterManager_metrics("CdapClusterManager@metrics"), + CdapClusterManager_properties("CdapClusterManager@properties"), + CdapClusterManager_uploadInfo("CdapClusterManager@uploadInfo"), + CdapClusterManager_getValues("CdapClusterManager@getValues"), + CdapClusterManager_getValuesAll("CdapClusterManager@getValuesAll"), + CdapClusterManager_getMessages("CdapClusterManager@getMessages"), + CdapClusterManager_getRequestLogger("CdapClusterManager@getRequestLogger"), + CdapClusterManager_evaluate("CdapClusterManager@evaluate"), + CdapClusterManager_update("CdapClusterManager@update"), + CdapClusterManager_createNamespace("CdapClusterManager@createNamespace"), + CdapClusterManager_deleteNamespace("CdapClusterManager@deleteNamespace"), + CdapClusterManager_deployApp("CdapClusterManager@deployApp"), + CdapClusterManager_loadArtifact("CdapClusterManager@loadArtifact"), + CdapClusterManager_loadArtifactWithConfig("CdapClusterManager@loadArtifactWithConfig"), + CdapClusterManager_deleteArtifact("CdapClusterManager@deleteArtifact"), + CdapClusterManager_startFlow("CdapClusterManager@startFlow"), + CdapClusterManager_startWorker("CdapClusterManager@startWorker"), + CdapClusterManager_startService("CdapClusterManager@startService"), + CdapClusterManager_startApp("CdapClusterManager@startApp"), + CdapClusterManager_stopApp("CdapClusterManager@stopApp"), + CdapClusterManager_deleteApp("CdapClusterManager@deleteApp"), + CdapClusterManager_loadPreferencesApp("CdapClusterManager@loadPreferencesApp"), + CdapClusterManager_loadPreferencesFlow("CdapClusterManager@loadPreferencesFlow"), + CdapClusterManager_loadPreferencesNameSpace("CdapClusterManager@loadPreferencesNameSpace"), + CdapClusterManager_setPreferencesApp("CdapClusterManager@setPreferencesApp"), + CdapClusterManager_setPreferencesFlow("CdapClusterManager@setPreferencesFlow"), + CdapClusterManager_setPreferencesWorker("CdapClusterManager@setPreferencesWorker"), + CdapClusterManager_setPreferencesService("CdapClusterManager@setPreferencesService"), + CdapClusterManager_setPreferencesNameSpace("CdapClusterManager@setPreferencesNameSpace"), + CdapClusterManager_setFlowRunTimeArgs("CdapClusterManager@setFlowRunTimeArgs"), + CdapClusterManager_setFlowletInstances("CdapClusterManager@setFlowletInstances"), + CdapClusterManager_stopFlow("CdapClusterManager@stopFlow"), + CdapClusterManager_stopWorker("CdapClusterManager@stopWorker"), + CdapClusterManager_stopService("CdapClusterManager@stopService"), + CdapClusterManager_truncateDataSet("CdapClusterManager@truncateDataSet"), + CdapClusterManager_deleteDataset("CdapClusterManager@deleteDataset"), + CdapClusterManager_createStream("CdapClusterManager@createStream"), + CdapClusterManager_deleteStream("CdapClusterManager@deleteStream"), + CdapClusterManager_getStreamEvents("CdapClusterManager@getStreamEvents"), + CdapClusterManager_getStreamStats("CdapClusterManager@getStreamStats"), + CdapClusterManager_sendEventToStream("CdapClusterManager@sendEventToStream"), + CdapClusterManager_trucateStream("CdapClusterManager@trucateStream"), + CdapClusterManager_setStreamProperties("CdapClusterManager@setStreamProperties"), + CdapClusterManager_restartApp("CdapClusterManager@restartApp"), + CdapClusterManager_createApp("CdapClusterManager@createApp"), + CdapClusterManager_createAppWithConfig("CdapClusterManager@createAppWithConfig"), + CdapClusterManager_setDatasetProperties("CdapClusterManager@setDatasetProperties"), + CdapClusterManager_setStreamTTL("CdapClusterManager@setStreamTTL"), + CdapClusterManager_suspendSchedule("CdapClusterManager@suspendSchedule"), + CdapClusterManager_resumeSchedule("CdapClusterManager@resumeSchedule") ; + + + private String n; + + private CdapClusterManagerOperationEnum(String n) { + this.n = n; + } + + @Override + public String toString() { + return n; + } + } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterService.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterService.java index e805e70..a061037 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterService.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterService.java @@ -25,24 +25,34 @@ package org.openecomp.dcae.controller.service.cdap.cluster.servers.service; + + import java.io.InputStream; import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISwaggerHandler; import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ISiriusProvider; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.SwaggerUtils; import org.openecomp.ncomp.sirius.function.FunctionUtils; import org.openecomp.ncomp.component.ApiRequestStatus; import org.apache.log4j.Logger; -import org.openecomp.logger.EcompLogger; +import org.openecomp.ncomp.sirius.manager.logging.NcompLogger; +import org.openecomp.logger.StatusCodeEnum; +import org.openecomp.logger.EcompException; import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; import org.json.JSONObject; import java.util.Date; import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging.CdapClusterServiceOperationEnum; +import org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging.CdapClusterServiceMessageEnum; @@ -51,9 +61,9 @@ import org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClust -public class DcaeCdapClusterService extends CdapClusterServiceImpl implements ISiriusPlugin { +public class DcaeCdapClusterService extends CdapClusterServiceImpl implements ISiriusProvider, ISiriusPlugin { public static final Logger logger = Logger.getLogger(DcaeCdapClusterService.class); - static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + static final NcompLogger ecomplogger = NcompLogger.getNcompLogger(); public DcaeCdapClusterServiceProvider controller; ISiriusServer server; @@ -68,8 +78,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.deploy); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterServiceOperationEnum.CdapClusterService_deploy,server,this); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_deploy,"self:" + ManagementServer.object2ref(this)); try { controller.deploy(instanceName,containerPath); } @@ -78,7 +88,10 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterServiceMessageEnum.REQUEST_FAILED_deploy, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REQUEST_FAILED_deploy,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterServiceMessageEnum.REQUEST_FAILED_deploy, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -93,8 +106,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.undeploy); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterServiceOperationEnum.CdapClusterService_undeploy,server,this); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_undeploy,"self:" + ManagementServer.object2ref(this)); try { controller.undeploy(instanceName); } @@ -103,7 +116,10 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterServiceMessageEnum.REQUEST_FAILED_undeploy, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REQUEST_FAILED_undeploy,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterServiceMessageEnum.REQUEST_FAILED_undeploy, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -118,8 +134,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.test); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterServiceOperationEnum.CdapClusterService_test,server,this); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_test,"self:" + ManagementServer.object2ref(this)); try { res = controller.test(instanceName); } @@ -128,7 +144,10 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterServiceMessageEnum.REQUEST_FAILED_test, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REQUEST_FAILED_test,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterServiceMessageEnum.REQUEST_FAILED_test, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -143,8 +162,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.suspend); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterServiceOperationEnum.CdapClusterService_suspend,server,this); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_suspend,"self:" + ManagementServer.object2ref(this)); try { controller.suspend(instanceName); } @@ -153,7 +172,10 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterServiceMessageEnum.REQUEST_FAILED_suspend, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REQUEST_FAILED_suspend,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterServiceMessageEnum.REQUEST_FAILED_suspend, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -168,8 +190,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.resume); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterServiceOperationEnum.CdapClusterService_resume,server,this); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_resume,"self:" + ManagementServer.object2ref(this)); try { controller.resume(instanceName); } @@ -178,7 +200,10 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterServiceMessageEnum.REQUEST_FAILED_resume, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REQUEST_FAILED_resume,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterServiceMessageEnum.REQUEST_FAILED_resume, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -193,8 +218,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.pushManagerConfiguration); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterServiceOperationEnum.CdapClusterService_pushManagerConfiguration,server,this); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_pushManagerConfiguration,"self:" + ManagementServer.object2ref(this)); try { controller.pushManagerConfiguration(instanceName); } @@ -203,7 +228,10 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterServiceMessageEnum.REQUEST_FAILED_pushManagerConfiguration, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REQUEST_FAILED_pushManagerConfiguration,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterServiceMessageEnum.REQUEST_FAILED_pushManagerConfiguration, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -218,8 +246,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.pollManagerConfiguration); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterServiceOperationEnum.CdapClusterService_pollManagerConfiguration,server,this); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_pollManagerConfiguration,"self:" + ManagementServer.object2ref(this)); try { controller.pollManagerConfiguration(instanceName); } @@ -228,7 +256,10 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterServiceMessageEnum.REQUEST_FAILED_pollManagerConfiguration, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REQUEST_FAILED_pollManagerConfiguration,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterServiceMessageEnum.REQUEST_FAILED_pollManagerConfiguration, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -243,8 +274,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.managerConfiguration); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterServiceOperationEnum.CdapClusterService_managerConfiguration,server,this); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_managerConfiguration,"self:" + ManagementServer.object2ref(this)); try { res = controller.managerConfiguration(instanceName); } @@ -253,7 +284,10 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterServiceMessageEnum.REQUEST_FAILED_managerConfiguration, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REQUEST_FAILED_managerConfiguration,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterServiceMessageEnum.REQUEST_FAILED_managerConfiguration, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -268,8 +302,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.managerOperation); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterServiceOperationEnum.CdapClusterService_managerOperation,server,this); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_managerOperation,"self:" + ManagementServer.object2ref(this)); try { res = controller.managerOperation(instanceName,operation,parameters); } @@ -278,7 +312,10 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterServiceMessageEnum.REQUEST_FAILED_managerOperation, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REQUEST_FAILED_managerOperation,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterServiceMessageEnum.REQUEST_FAILED_managerOperation, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -293,8 +330,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.updateConfigurationFromPolicy); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterServiceOperationEnum.CdapClusterService_updateConfigurationFromPolicy,server,this); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_updateConfigurationFromPolicy,"self:" + ManagementServer.object2ref(this)); try { controller.updateConfigurationFromPolicy(instanceName); } @@ -303,7 +340,10 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterServiceMessageEnum.REQUEST_FAILED_updateConfigurationFromPolicy, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REQUEST_FAILED_updateConfigurationFromPolicy,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterServiceMessageEnum.REQUEST_FAILED_updateConfigurationFromPolicy, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -318,8 +358,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.runHealthTests); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterServiceOperationEnum.CdapClusterService_runHealthTests,server,this); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_runHealthTests,"self:" + ManagementServer.object2ref(this)); try { controller.runHealthTests(); } @@ -328,7 +368,10 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterServiceMessageEnum.REQUEST_FAILED_runHealthTests, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REQUEST_FAILED_runHealthTests,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterServiceMessageEnum.REQUEST_FAILED_runHealthTests, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -343,8 +386,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.START, duration_); Date now_ = new Date(); - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.updateDeploymentStatus); + ecomplogger.recordAuditEventStartIfNeeded(CdapClusterServiceOperationEnum.CdapClusterService_updateDeploymentStatus,server,this); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_updateDeploymentStatus,"self:" + ManagementServer.object2ref(this)); try { controller.updateDeploymentStatus(); } @@ -353,7 +396,10 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS if (server != null) server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.ERROR, duration_); System.err.println("ERROR: " + e); - throw e; + ecomplogger.warn(CdapClusterServiceMessageEnum.REQUEST_FAILED_updateDeploymentStatus, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REQUEST_FAILED_updateDeploymentStatus,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CdapClusterServiceMessageEnum.REQUEST_FAILED_updateDeploymentStatus, e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); duration_ = new Date().getTime()-now_.getTime(); @@ -367,6 +413,8 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS + + @Override public void start() { controller.start(); @@ -375,7 +423,7 @@ public class DcaeCdapClusterService extends CdapClusterServiceImpl implements IS public static void ecoreSetup() { DcaeCdapClusterServiceProvider.ecoreSetup(); } - public DcaeCdapClusterServiceProvider getSomfProvider() { + public DcaeCdapClusterServiceProvider getSiriusProvider() { return controller; } } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceClient.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceClient.java index 102cacd..ff1917e 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceClient.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceClient.java @@ -30,6 +30,8 @@ import org.openecomp.ncomp.sirius.manager.GenericHttpClient; import org.apache.log4j.Logger; import org.openecomp.logger.EcompLogger; +import org.openecomp.logger.StatusCodeEnum; +import org.openecomp.logger.EcompException; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; @@ -54,33 +56,37 @@ public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { DcaeCdapClusterService.ecoreSetup(); client = new GenericHttpClient(file,name); client.add("/resources", this); + client.setVersion("ONAP-R2"); } public DcaeCdapClusterServiceClient(String file, String name1, String name2) { HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); client = client1.all; // requests should be forwarded to all. client.add("/resources", this); + client.setVersion("ONAP-R2"); } public DcaeCdapClusterServiceClient(AbstractClient c) { client = c; client.add("/resources", this); + client.setVersion("ONAP-R2"); } @Override public void deploy(java.lang.String instanceName, java.lang.String containerPath) { - EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_deploy); + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_deploy,client.getRemote()); try { client.operationPath("/resources", c, "deploy", null, instanceName,containerPath); } catch (Exception e) { - ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_deploy, e.toString()); - throw new RuntimeException("remote call failed: deploy", e); + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_deploy, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_deploy,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_deploy,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -88,16 +94,17 @@ public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { @Override public void undeploy(java.lang.String instanceName) { - EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_undeploy); + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_undeploy,client.getRemote()); try { client.operationPath("/resources", c, "undeploy", null, instanceName); } catch (Exception e) { - ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_undeploy, e.toString()); - throw new RuntimeException("remote call failed: undeploy", e); + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_undeploy, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_undeploy,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_undeploy,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -105,16 +112,17 @@ public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { @Override public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) { - EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_test); + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_test,client.getRemote()); org.openecomp.dcae.controller.core.service.HealthTestResponse res; try { res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath("/resources", c, "test", null, instanceName); } catch (Exception e) { - ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_test, e.toString()); - throw new RuntimeException("remote call failed: test", e); + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_test, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_test,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_test,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -122,16 +130,17 @@ public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { @Override public void suspend(java.lang.String instanceName) { - EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_suspend); + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_suspend,client.getRemote()); try { client.operationPath("/resources", c, "suspend", null, instanceName); } catch (Exception e) { - ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_suspend, e.toString()); - throw new RuntimeException("remote call failed: suspend", e); + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_suspend, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_suspend,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_suspend,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -139,16 +148,17 @@ public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { @Override public void resume(java.lang.String instanceName) { - EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_resume); + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_resume,client.getRemote()); try { client.operationPath("/resources", c, "resume", null, instanceName); } catch (Exception e) { - ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_resume, e.toString()); - throw new RuntimeException("remote call failed: resume", e); + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_resume, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_resume,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_resume,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -156,16 +166,17 @@ public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { @Override public void pushManagerConfiguration(java.lang.String instanceName) { - EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_pushManagerConfiguration); + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_pushManagerConfiguration,client.getRemote()); try { client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName); } catch (Exception e) { - ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString()); - throw new RuntimeException("remote call failed: pushManagerConfiguration", e); + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_pushManagerConfiguration, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_pushManagerConfiguration,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_pushManagerConfiguration,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -173,16 +184,17 @@ public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { @Override public void pollManagerConfiguration(java.lang.String instanceName) { - EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_pollManagerConfiguration); + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_pollManagerConfiguration,client.getRemote()); try { client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName); } catch (Exception e) { - ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString()); - throw new RuntimeException("remote call failed: pollManagerConfiguration", e); + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_pollManagerConfiguration, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_pollManagerConfiguration,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_pollManagerConfiguration,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -190,16 +202,17 @@ public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { @Override public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) { - EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_managerConfiguration); + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_managerConfiguration,client.getRemote()); org.eclipse.emf.ecore.EObject res; try { res = (org.eclipse.emf.ecore.EObject) client.operationPath("/resources", c, "managerConfiguration", null, instanceName); } catch (Exception e) { - ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_managerConfiguration, e.toString()); - throw new RuntimeException("remote call failed: managerConfiguration", e); + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_managerConfiguration, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_managerConfiguration,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_managerConfiguration,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -207,16 +220,17 @@ public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { @Override public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) { - EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_managerOperation); + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_managerOperation,client.getRemote()); org.json.JSONObject res; try { res = (org.json.JSONObject) client.operationPath("/resources", c, "managerOperation", null, instanceName,operation,parameters); } catch (Exception e) { - ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_managerOperation, e.toString()); - throw new RuntimeException("remote call failed: managerOperation", e); + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_managerOperation, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_managerOperation,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_managerOperation,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); return res; @@ -224,16 +238,17 @@ public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { @Override public void updateConfigurationFromPolicy(java.lang.String instanceName) { - EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_updateConfigurationFromPolicy); + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_updateConfigurationFromPolicy,client.getRemote()); try { client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName); } catch (Exception e) { - ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString()); - throw new RuntimeException("remote call failed: updateConfigurationFromPolicy", e); + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_updateConfigurationFromPolicy, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_updateConfigurationFromPolicy,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_updateConfigurationFromPolicy,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -241,16 +256,17 @@ public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { @Override public void runHealthTests() { - EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_runHealthTests); + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_runHealthTests,client.getRemote()); try { client.operationPath("/resources", c, "runHealthTests", null); } catch (Exception e) { - ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_runHealthTests, e.toString()); - throw new RuntimeException("remote call failed: runHealthTests", e); + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_runHealthTests, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_runHealthTests,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_runHealthTests,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); @@ -258,16 +274,17 @@ public class DcaeCdapClusterServiceClient extends CdapClusterServiceImpl { @Override public void updateDeploymentStatus() { - EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); //foo - ecomplogger.recordMetricEventStart(); - ecomplogger.setOperation(CdapClusterServiceOperationEnum.REMOTE_updateDeploymentStatus); + EClass c = ServicePackage.eINSTANCE.getCdapClusterService(); + ecomplogger.recordMetricEventStart(CdapClusterServiceOperationEnum.CdapClusterService_updateDeploymentStatus,client.getRemote()); try { client.operationPath("/resources", c, "updateDeploymentStatus", null); } catch (Exception e) { - ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_updateDeploymentStatus, e.toString()); - throw new RuntimeException("remote call failed: updateDeploymentStatus", e); + ecomplogger.warn(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_updateDeploymentStatus, e.toString()); + EcompException e1 = EcompException.create(CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_updateDeploymentStatus,e,e.getMessage()); + ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CdapClusterServiceMessageEnum.REMOTE_CALL_FAILED_updateDeploymentStatus,e.getMessage()); + throw e1; } ecomplogger.recordMetricEventEnd(); diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceServer.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceServer.java index 69ba3f6..4e45f0f 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceServer.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/DcaeCdapClusterServiceServer.java @@ -26,17 +26,16 @@ package org.openecomp.dcae.controller.service.cdap.cluster.servers.service; import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; import java.io.IOException; +import java.io.InputStream; import java.util.Properties; import java.util.TimeZone; import org.apache.log4j.Logger; import org.eclipse.emf.ecore.EFactory; - -import org.openecomp.entity.EcompComponent; -import org.openecomp.entity.EcompSubComponent; -import org.openecomp.entity.EcompSubComponentInstance; +import org.json.JSONObject; import org.openecomp.ncomp.sirius.manager.Jetty8Server; import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.IRequestHandler; import org.openecomp.ncomp.sirius.manager.ISiriusServer; import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; @@ -46,7 +45,7 @@ import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterSer -public class DcaeCdapClusterServiceServer implements ISiriusServer { +public class DcaeCdapClusterServiceServer implements ISiriusServer, IRequestHandler { public static final Logger logger = Logger.getLogger(DcaeCdapClusterServiceServer.class); String serverPath; ManagementServer server; @@ -64,6 +63,7 @@ public class DcaeCdapClusterServiceServer implements ISiriusServer { props = getPropertiesFromClasspath(filename); serverPath = (String) props.get("server.dir"); server = new ManagementServer(f, "CdapClusterService", serverPath, filename); + ManagementServer.setBuildVersion("ONAP-R2"); server.addFactory(f); server.addRuntimeFactories(this); @@ -73,6 +73,7 @@ public class DcaeCdapClusterServiceServer implements ISiriusServer { controller = (DcaeCdapClusterService) server.find("/").o; webServer = new Jetty8Server("service.properties"); webServer.add("/resources",server); + webServer.add("/api",this); @@ -95,4 +96,17 @@ public class DcaeCdapClusterServiceServer implements ISiriusServer { public ManagementServer getServer() { return server; } + public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context, + String clientVersion) { + switch ((String) context.get("path")) { + case "/api/versions": + return server.supportedVersions(); + } + logger.warn("Unknown request action=" + action + " path=" + resourcePath + " context=" + context.toString(2)); + throw new RuntimeException("Unknown request"); + } + public Object handleBinary(String userName, String action, String resourcePath, InputStream in) { + return null; + } + } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterService.properties b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterService.properties index d32cf07..1218d2a 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterService.properties +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterService.properties @@ -1,150 +1,150 @@ dummy=\ - null|\ + dummy-null|\ null|\ null|\ null -deploy=\ - deploy-FAILED-5001W|\ +REQUEST_FAILED_deploy=\ + REQUEST-FAILED-deploy-4001W|\ {0}|\ null|\ Operation Failed with Exception -undeploy=\ - undeploy-FAILED-5001W|\ +REQUEST_FAILED_undeploy=\ + REQUEST-FAILED-undeploy-4001W|\ {0}|\ null|\ Operation Failed with Exception -test=\ - test-FAILED-5001W|\ +REQUEST_FAILED_test=\ + REQUEST-FAILED-test-4001W|\ {0}|\ null|\ Operation Failed with Exception -suspend=\ - suspend-FAILED-5001W|\ +REQUEST_FAILED_suspend=\ + REQUEST-FAILED-suspend-4001W|\ {0}|\ null|\ Operation Failed with Exception -resume=\ - resume-FAILED-5001W|\ +REQUEST_FAILED_resume=\ + REQUEST-FAILED-resume-4001W|\ {0}|\ null|\ Operation Failed with Exception -pushManagerConfiguration=\ - pushManagerConfiguration-FAILED-5001W|\ +REQUEST_FAILED_pushManagerConfiguration=\ + REQUEST-FAILED-pushManagerConfiguration-4001W|\ {0}|\ null|\ Operation Failed with Exception -pollManagerConfiguration=\ - pollManagerConfiguration-FAILED-5001W|\ +REQUEST_FAILED_pollManagerConfiguration=\ + REQUEST-FAILED-pollManagerConfiguration-4001W|\ {0}|\ null|\ Operation Failed with Exception -managerConfiguration=\ - managerConfiguration-FAILED-5001W|\ +REQUEST_FAILED_managerConfiguration=\ + REQUEST-FAILED-managerConfiguration-4001W|\ {0}|\ null|\ Operation Failed with Exception -managerOperation=\ - managerOperation-FAILED-5001W|\ +REQUEST_FAILED_managerOperation=\ + REQUEST-FAILED-managerOperation-4001W|\ {0}|\ null|\ Operation Failed with Exception -updateConfigurationFromPolicy=\ - updateConfigurationFromPolicy-FAILED-5001W|\ +REQUEST_FAILED_updateConfigurationFromPolicy=\ + REQUEST-FAILED-updateConfigurationFromPolicy-4001W|\ {0}|\ null|\ Operation Failed with Exception -runHealthTests=\ - runHealthTests-FAILED-5001W|\ +REQUEST_FAILED_runHealthTests=\ + REQUEST-FAILED-runHealthTests-4001W|\ {0}|\ null|\ Operation Failed with Exception -updateDeploymentStatus=\ - updateDeploymentStatus-FAILED-5001W|\ +REQUEST_FAILED_updateDeploymentStatus=\ + REQUEST-FAILED-updateDeploymentStatus-4001W|\ {0}|\ null|\ Operation Failed with Exception -REMOTE_deploy=\ - REMOTE-deploy-FAILED-5001W|\ +REMOTE_CALL_FAILED_deploy=\ + REMOTE-CALL-FAILED-deploy-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_undeploy=\ - REMOTE-undeploy-FAILED-5001W|\ +REMOTE_CALL_FAILED_undeploy=\ + REMOTE-CALL-FAILED-undeploy-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_test=\ - REMOTE-test-FAILED-5001W|\ +REMOTE_CALL_FAILED_test=\ + REMOTE-CALL-FAILED-test-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_suspend=\ - REMOTE-suspend-FAILED-5001W|\ +REMOTE_CALL_FAILED_suspend=\ + REMOTE-CALL-FAILED-suspend-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_resume=\ - REMOTE-resume-FAILED-5001W|\ +REMOTE_CALL_FAILED_resume=\ + REMOTE-CALL-FAILED-resume-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_pushManagerConfiguration=\ - REMOTE-pushManagerConfiguration-FAILED-5001W|\ +REMOTE_CALL_FAILED_pushManagerConfiguration=\ + REMOTE-CALL-FAILED-pushManagerConfiguration-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_pollManagerConfiguration=\ - REMOTE-pollManagerConfiguration-FAILED-5001W|\ +REMOTE_CALL_FAILED_pollManagerConfiguration=\ + REMOTE-CALL-FAILED-pollManagerConfiguration-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_managerConfiguration=\ - REMOTE-managerConfiguration-FAILED-5001W|\ +REMOTE_CALL_FAILED_managerConfiguration=\ + REMOTE-CALL-FAILED-managerConfiguration-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_managerOperation=\ - REMOTE-managerOperation-FAILED-5001W|\ +REMOTE_CALL_FAILED_managerOperation=\ + REMOTE-CALL-FAILED-managerOperation-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_updateConfigurationFromPolicy=\ - REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\ +REMOTE_CALL_FAILED_updateConfigurationFromPolicy=\ + REMOTE-CALL-FAILED-updateConfigurationFromPolicy-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_runHealthTests=\ - REMOTE-runHealthTests-FAILED-5001W|\ +REMOTE_CALL_FAILED_runHealthTests=\ + REMOTE-CALL-FAILED-runHealthTests-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception -REMOTE_updateDeploymentStatus=\ - REMOTE-updateDeploymentStatus-FAILED-5001W|\ +REMOTE_CALL_FAILED_updateDeploymentStatus=\ + REMOTE-CALL-FAILED-updateDeploymentStatus-4001W|\ {0}|\ null|\ Remote Operation Failed with Exception diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceMessageEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceMessageEnum.java index 9ed14d2..d54c19a 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceMessageEnum.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceMessageEnum.java @@ -1,25 +1,4 @@ -/*- - * ============LICENSE_START========================================== - * OPENECOMP - DCAE - * =================================================================== - * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END============================================ - */ - - package org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging; import com.att.eelf.i18n.EELFResourceManager; @@ -28,32 +7,32 @@ import org.openecomp.logger.EcompMessageEnum; public enum CdapClusterServiceMessageEnum implements EcompMessageEnum { dummy, - deploy, - undeploy, - test, - suspend, - resume, - pushManagerConfiguration, - pollManagerConfiguration, - managerConfiguration, - managerOperation, - updateConfigurationFromPolicy, - runHealthTests, - updateDeploymentStatus, - REMOTE_deploy, - REMOTE_undeploy, - REMOTE_test, - REMOTE_suspend, - REMOTE_resume, - REMOTE_pushManagerConfiguration, - REMOTE_pollManagerConfiguration, - REMOTE_managerConfiguration, - REMOTE_managerOperation, - REMOTE_updateConfigurationFromPolicy, - REMOTE_runHealthTests, - REMOTE_updateDeploymentStatus; + REQUEST_FAILED_deploy, + REQUEST_FAILED_undeploy, + REQUEST_FAILED_test, + REQUEST_FAILED_suspend, + REQUEST_FAILED_resume, + REQUEST_FAILED_pushManagerConfiguration, + REQUEST_FAILED_pollManagerConfiguration, + REQUEST_FAILED_managerConfiguration, + REQUEST_FAILED_managerOperation, + REQUEST_FAILED_updateConfigurationFromPolicy, + REQUEST_FAILED_runHealthTests, + REQUEST_FAILED_updateDeploymentStatus, + REMOTE_CALL_FAILED_deploy, + REMOTE_CALL_FAILED_undeploy, + REMOTE_CALL_FAILED_test, + REMOTE_CALL_FAILED_suspend, + REMOTE_CALL_FAILED_resume, + REMOTE_CALL_FAILED_pushManagerConfiguration, + REMOTE_CALL_FAILED_pollManagerConfiguration, + REMOTE_CALL_FAILED_managerConfiguration, + REMOTE_CALL_FAILED_managerOperation, + REMOTE_CALL_FAILED_updateConfigurationFromPolicy, + REMOTE_CALL_FAILED_runHealthTests, + REMOTE_CALL_FAILED_updateDeploymentStatus; static { - EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging.CdapClusterService"); + EELFResourceManager.loadMessageBundle("org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterService"); } } diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceOperationEnum.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceOperationEnum.java index b105151..592d36d 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceOperationEnum.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/cdap/cluster/servers/service/logging/CdapClusterServiceOperationEnum.java @@ -1,53 +1,33 @@ -/*- - * ============LICENSE_START========================================== - * OPENECOMP - DCAE - * =================================================================== - * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. - * =================================================================== - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END============================================ - */ - - package org.openecomp.dcae.controller.service.cdap.cluster.servers.service.logging; import org.openecomp.entity.EcompOperationEnum; public enum CdapClusterServiceOperationEnum implements EcompOperationEnum { - deploy, - undeploy, - test, - suspend, - resume, - pushManagerConfiguration, - pollManagerConfiguration, - managerConfiguration, - managerOperation, - updateConfigurationFromPolicy, - runHealthTests, - updateDeploymentStatus, - REMOTE_deploy, - REMOTE_undeploy, - REMOTE_test, - REMOTE_suspend, - REMOTE_resume, - REMOTE_pushManagerConfiguration, - REMOTE_pollManagerConfiguration, - REMOTE_managerConfiguration, - REMOTE_managerOperation, - REMOTE_updateConfigurationFromPolicy, - REMOTE_runHealthTests, - REMOTE_updateDeploymentStatus; + CdapClusterService_deploy("CdapClusterService@deploy"), + CdapClusterService_undeploy("CdapClusterService@undeploy"), + CdapClusterService_test("CdapClusterService@test"), + CdapClusterService_suspend("CdapClusterService@suspend"), + CdapClusterService_resume("CdapClusterService@resume"), + CdapClusterService_pushManagerConfiguration("CdapClusterService@pushManagerConfiguration"), + CdapClusterService_pollManagerConfiguration("CdapClusterService@pollManagerConfiguration"), + CdapClusterService_managerConfiguration("CdapClusterService@managerConfiguration"), + CdapClusterService_managerOperation("CdapClusterService@managerOperation"), + CdapClusterService_updateConfigurationFromPolicy("CdapClusterService@updateConfigurationFromPolicy"), + CdapClusterService_runHealthTests("CdapClusterService@runHealthTests"), + CdapClusterService_updateDeploymentStatus("CdapClusterService@updateDeploymentStatus") ; + + + private String n; + + private CdapClusterServiceOperationEnum(String n) { + this.n = n; + } + + @Override + public String toString() { + return n; + } + } |