aboutsummaryrefslogtreecommitdiffstats
path: root/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager
diff options
context:
space:
mode:
Diffstat (limited to 'dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager')
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.classpath1
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/META-INF/MANIFEST.MF8
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/assembly/assemble_zip.xml4
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/Generator.java6
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProvider.java9
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProvider.java2
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmManager.yaml192
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmService.yaml144
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/GuiClientApi.yaml72
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManager.java193
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerClient.java181
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerServer.java24
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApi.java83
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiClient.java71
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApi.properties50
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiMessageEnum.java47
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiOperationEnum.java52
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager.properties130
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerMessageEnum.java87
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerOperationEnum.java82
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmService.java149
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceClient.java137
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceServer.java24
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService.properties98
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceMessageEnum.java71
-rw-r--r--dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceOperationEnum.java70
26 files changed, 967 insertions, 1020 deletions
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.classpath b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.classpath
index d2d34b3..89273c0 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.classpath
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/.classpath
@@ -21,7 +21,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
- <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/META-INF/MANIFEST.MF b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/META-INF/MANIFEST.MF
index 95af390..b973652 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/META-INF/MANIFEST.MF
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/META-INF/MANIFEST.MF
@@ -5,10 +5,4 @@ Bundle-SymbolicName: dcae-controller-service-common-vm-manager
Bundle-Version: 0.1.0.qualifier
Export-Package: org.openecomp.dcae.controller.service.common.vm.manager.tools,
org.openecomp.dcae.controller.service.common.vm.servers.manager
-Require-Bundle: ncomp-core-types,
- ncomp-sirius-manager-model,
- ncomp-sirius-manager-server,
- ncomp-sirius-manager-console,
- ncomp-sirius-manager-generator,
- dcae-controller-service-common-vm-model;bundle-version="0.1.0",
- ncomp-utils-java;bundle-version="0.1.0"
+
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/assembly/assemble_zip.xml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/assembly/assemble_zip.xml
index a6503d1..98d4d5a 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/assembly/assemble_zip.xml
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/assembly/assemble_zip.xml
@@ -56,6 +56,10 @@
<directory>src/main/server/scripts</directory>
<outputDirectory>scripts</outputDirectory>
</fileSet>
+ <fileSet>
+ <directory>src/assembly/swm</directory>
+ <outputDirectory>swm</outputDirectory>
+ </fileSet>
</fileSets>
</assembly>
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/Generator.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/Generator.java
index 770d847..cc42234 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/Generator.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/manager/tools/Generator.java
@@ -53,12 +53,13 @@ public class Generator {
String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix();
dir = "src/main/sirius-gen/" + dir.replace('.', '/');
ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel();
- m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates");
+ m.setTemplateDirectory("../../../../ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates");
m.setPrefix("Dcae");
m.setPluginName(p.getNsURI());
m.setName("ControllerServiceCommonVmManager");
m.setTitle("ControllerServiceCommonVmManager");
ControllerGenerator g = new ControllerGenerator(o, m);
+ g.setVersion("ONAP-R2");
g.setEnableIRequestHandler(false);
g.setEnableISiriusPlugin(false);
g.addFactory(ServiceFactory.eINSTANCE);
@@ -80,12 +81,13 @@ public class Generator {
String dir = p.getNsURI().replaceAll(p.getNsPrefix()+"$", "") + "servers." + p.getNsPrefix();
dir = "src/main/sirius-gen/" + dir.replace('.', '/');
ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel();
- m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates");
+ m.setTemplateDirectory("../../../../ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates");
m.setPrefix("Dcae");
m.setPluginName(p.getNsURI());
m.setName("ControllerServiceCommonVmService");
m.setTitle("ControllerServiceCommonVmService");
ControllerGenerator g = new ControllerGenerator(o, m);
+ g.setVersion("ONAP-R2");
g.setEnableIRequestHandler(false);
g.setEnableISiriusPlugin(true);
g.addFactory(ServiceFactory.eINSTANCE);
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProvider.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProvider.java
index 66aca85..173e1de 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProvider.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerProvider.java
@@ -76,16 +76,15 @@ public class DcaeCommonVmManagerProvider extends DcaeVirtualMachineManagerProvid
String s = run(o.getScript() + " test", o.getTestTimeout());
String a[] = s.split(":");
int index = s.indexOf(":");
- String msg = index < 0 ? null : s.substring(index).trim();
- String status = a[0].trim();
+ String msg = index < 0 ? null : s.substring(index);
HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse();
- if ("GREEN".equalsIgnoreCase(status)) {
+ if ("GREEN".equalsIgnoreCase(a[0])) {
res.setStatus(HealthTestStatus.GREEN);
res.setMessageCode(msg);
- } else if ("YELLOW".equalsIgnoreCase(status)) {
+ } else if ("YELLOW".equalsIgnoreCase(a[0])) {
res.setStatus(HealthTestStatus.YELLOW);
res.setMessageCode(msg);
- } else if ("RED".equalsIgnoreCase(status)) {
+ } else if ("RED".equalsIgnoreCase(a[0])) {
res.setStatus(HealthTestStatus.RED);
res.setMessageCode(msg);
} else {
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProvider.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProvider.java
index 3d02bfd..99d207d 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProvider.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/java/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceProvider.java
@@ -53,7 +53,7 @@ public class DcaeCommonVmServiceProvider extends DcaeVirtualMachineServiceProvid
}
@Override
- protected EObject convertToManagerConfiguration(VirtualMachineServiceInstance i) {
+ public EObject convertToManagerConfiguration(VirtualMachineServiceInstance i) {
CommonVmServiceInstance i1 = (CommonVmServiceInstance) i;
CommonVmServiceInstance c = ServiceFactory.eINSTANCE.createCommonVmServiceInstance();
c.setScript(i1.getScript());
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmManager.yaml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmManager.yaml
index 63cb773..55b451f 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmManager.yaml
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmManager.yaml
@@ -1,179 +1,147 @@
operations:
- test: {}
- suspend: {}
- resume: {}
- publicKey: {}
- configurationChanged: {}
- updateStreams: {}
- logs: {}
- metrics: {}
- properties: {}
- uploadInfo: {}
- getValues: {}
- getValuesAll: {}
- getMessages: {}
- getRequestLogger: {}
- evaluate: {}
- update: {}
- 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
+ CommonVmManager@test: {}
+ CommonVmManager@suspend: {}
+ CommonVmManager@resume: {}
+ CommonVmManager@publicKey: {}
+ CommonVmManager@configurationChanged: {}
+ CommonVmManager@updateStreams: {}
+ CommonVmManager@logs: {}
+ CommonVmManager@metrics: {}
+ CommonVmManager@properties: {}
+ CommonVmManager@uploadInfo: {}
+ CommonVmManager@getValues: {}
+ CommonVmManager@getValuesAll: {}
+ CommonVmManager@getMessages: {}
+ CommonVmManager@getRequestLogger: {}
+ CommonVmManager@evaluate: {}
+ CommonVmManager@update: {}
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
- 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_publicKey:
- errorCode: REMOTE-publicKey-FAILED-5001W
+ REMOTE-CALL-FAILED-publicKey:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_configurationChanged:
- errorCode: REMOTE-configurationChanged-FAILED-5001W
+ REMOTE-CALL-FAILED-configurationChanged:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_updateStreams:
- errorCode: REMOTE-updateStreams-FAILED-5001W
+ REMOTE-CALL-FAILED-updateStreams:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_logs:
- errorCode: REMOTE-logs-FAILED-5001W
+ REMOTE-CALL-FAILED-logs:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_metrics:
- errorCode: REMOTE-metrics-FAILED-5001W
+ REMOTE-CALL-FAILED-metrics:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_properties:
- errorCode: REMOTE-properties-FAILED-5001W
+ REMOTE-CALL-FAILED-properties:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_uploadInfo:
- errorCode: REMOTE-uploadInfo-FAILED-5001W
+ REMOTE-CALL-FAILED-uploadInfo:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getValues:
- errorCode: REMOTE-getValues-FAILED-5001W
+ REMOTE-CALL-FAILED-getValues:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getValuesAll:
- errorCode: REMOTE-getValuesAll-FAILED-5001W
+ REMOTE-CALL-FAILED-getValuesAll:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getMessages:
- errorCode: REMOTE-getMessages-FAILED-5001W
+ REMOTE-CALL-FAILED-getMessages:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getRequestLogger:
- errorCode: REMOTE-getRequestLogger-FAILED-5001W
+ REMOTE-CALL-FAILED-getRequestLogger:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_evaluate:
- errorCode: REMOTE-evaluate-FAILED-5001W
+ REMOTE-CALL-FAILED-evaluate:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_update:
- errorCode: REMOTE-update-FAILED-5001W
+ REMOTE-CALL-FAILED-update:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmService.yaml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmService.yaml
index 6ac8c34..80efba1 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmService.yaml
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/CommonVmService.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
+ CommonVmService@deploy: {}
+ CommonVmService@undeploy: {}
+ CommonVmService@test: {}
+ CommonVmService@suspend: {}
+ CommonVmService@resume: {}
+ CommonVmService@pushManagerConfiguration: {}
+ CommonVmService@pollManagerConfiguration: {}
+ CommonVmService@managerConfiguration: {}
+ CommonVmService@managerOperation: {}
+ CommonVmService@updateConfigurationFromPolicy: {}
+ CommonVmService@runHealthTests: {}
+ CommonVmService@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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/GuiClientApi.yaml
index bf3d69d..1489339 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/GuiClientApi.yaml
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManager.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManager.java
index dabe74e..81f80b5 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManager.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManager.java
@@ -26,20 +26,27 @@ package org.openecomp.dcae.controller.service.common.vm.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;
@@ -72,9 +79,9 @@ import org.openecomp.dcae.controller.service.common.vm.manager.impl.CommonVmMana
-public class DcaeCommonVmManager extends CommonVmManagerImpl {
+public class DcaeCommonVmManager extends CommonVmManagerImpl implements ISiriusProvider {
public static final Logger logger = Logger.getLogger(DcaeCommonVmManager.class);
- static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ static final NcompLogger ecomplogger = NcompLogger.getNcompLogger();
public DcaeCommonVmManagerProvider controller;
ISiriusServer server;
@@ -89,9 +96,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.test);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_test,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_test,"self:" + ManagementServer.object2ref(this));
try {
res = controller.test();
}
@@ -100,8 +106,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.test, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_test, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_test,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_test, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -116,9 +124,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.suspend);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_suspend,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_suspend,"self:" + ManagementServer.object2ref(this));
try {
controller.suspend();
}
@@ -127,8 +134,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.suspend, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_suspend, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_suspend,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_suspend, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -143,9 +152,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.resume);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_resume,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_resume,"self:" + ManagementServer.object2ref(this));
try {
controller.resume();
}
@@ -154,8 +162,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.resume, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_resume, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_resume,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_resume, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -170,9 +180,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.START, duration_);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.publicKey);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_publicKey,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_publicKey,"self:" + ManagementServer.object2ref(this));
try {
res = controller.publicKey();
}
@@ -181,8 +190,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "publicKey", ApiRequestStatus.ERROR, duration_);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.publicKey, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_publicKey, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_publicKey,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_publicKey, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -197,9 +208,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.START, duration_);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.configurationChanged);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_configurationChanged,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_configurationChanged,"self:" + ManagementServer.object2ref(this));
try {
controller.configurationChanged();
}
@@ -208,8 +218,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "configurationChanged", ApiRequestStatus.ERROR, duration_);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.configurationChanged, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_configurationChanged, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_configurationChanged,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_configurationChanged, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -224,9 +236,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.START, duration_,inputStreams,outputStreams);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.updateStreams);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_updateStreams,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_updateStreams,"self:" + ManagementServer.object2ref(this));
try {
controller.updateStreams(inputStreams,outputStreams);
}
@@ -235,8 +246,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "updateStreams", ApiRequestStatus.ERROR, duration_,inputStreams,outputStreams);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.updateStreams, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_updateStreams, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_updateStreams,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_updateStreams, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -251,9 +264,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "logs", ApiRequestStatus.START, duration_,cx,logs);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.logs);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_logs,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_logs,"self:" + ManagementServer.object2ref(this));
try {
controller.logs(cx,logs);
}
@@ -262,8 +274,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "logs", ApiRequestStatus.ERROR, duration_,cx,logs);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.logs, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_logs, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_logs,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_logs, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -278,9 +292,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.START, duration_,cx,metrics);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.metrics);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_metrics,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_metrics,"self:" + ManagementServer.object2ref(this));
try {
controller.metrics(cx,metrics);
}
@@ -289,8 +302,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.ERROR, duration_,cx,metrics);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.metrics, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_metrics, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_metrics,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_metrics, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -305,9 +320,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "properties", ApiRequestStatus.START, duration_,cx,l);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.properties);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_properties,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_properties,"self:" + ManagementServer.object2ref(this));
try {
controller.properties(cx,l);
}
@@ -316,8 +330,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "properties", ApiRequestStatus.ERROR, duration_,cx,l);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.properties, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_properties, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_properties,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_properties, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -332,9 +348,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.START, duration_,cx,info);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.uploadInfo);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_uploadInfo,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_uploadInfo,"self:" + ManagementServer.object2ref(this));
try {
controller.uploadInfo(cx,info);
}
@@ -343,8 +358,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.ERROR, duration_,cx,info);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.uploadInfo, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_uploadInfo, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_uploadInfo,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_uploadInfo, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -359,9 +376,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
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(CommonVmManagerOperationEnum.getValues);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_getValues,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_getValues,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getValues(cx,path,start,end,option,relativeInterval);
}
@@ -370,8 +386,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.ERROR, duration_,cx,path,start,end,option,relativeInterval);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.getValues, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_getValues, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_getValues,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_getValues, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -386,9 +404,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
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(CommonVmManagerOperationEnum.getValuesAll);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_getValuesAll,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_getValuesAll,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getValuesAll(cx,path,metrics,start,end,option,relativeInterval);
}
@@ -397,8 +414,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.ERROR, duration_,cx,path,metrics,start,end,option,relativeInterval);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.getValuesAll, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_getValuesAll, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_getValuesAll,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_getValuesAll, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -413,9 +432,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.START, duration_,cx,path,start,end);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.getMessages);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_getMessages,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_getMessages,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getMessages(cx,path,start,end);
}
@@ -424,8 +442,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.ERROR, duration_,cx,path,start,end);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.getMessages, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_getMessages, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_getMessages,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_getMessages, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -440,9 +460,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.START, duration_,userName,action,resourcePath,context);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.getRequestLogger);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_getRequestLogger,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_getRequestLogger,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getRequestLogger(userName,action,resourcePath,context);
}
@@ -451,8 +470,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.ERROR, duration_,userName,action,resourcePath,context);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.getRequestLogger, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_getRequestLogger, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_getRequestLogger,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_getRequestLogger, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -467,9 +488,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.START, duration_,path,function);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.evaluate);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_evaluate,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_evaluate,"self:" + ManagementServer.object2ref(this));
try {
res = controller.evaluate(path,function);
}
@@ -478,8 +498,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.ERROR, duration_,path,function);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.evaluate, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_evaluate, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_evaluate,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_evaluate, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -494,9 +516,8 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "update", ApiRequestStatus.START, duration_,path,function);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.update);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmManagerOperationEnum.CommonVmManager_update,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_update,"self:" + ManagementServer.object2ref(this));
try {
controller.update(path,function);
}
@@ -505,8 +526,10 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
if (server != null)
server.getServer().recordApi(null, this, "update", ApiRequestStatus.ERROR, duration_,path,function);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmManagerMessageEnum.update, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmManagerMessageEnum.REQUEST_FAILED_update, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REQUEST_FAILED_update,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmManagerMessageEnum.REQUEST_FAILED_update, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -520,10 +543,12 @@ public class DcaeCommonVmManager extends CommonVmManagerImpl {
+
+
public static void ecoreSetup() {
DcaeCommonVmManagerProvider.ecoreSetup();
}
- public DcaeCommonVmManagerProvider getSomfProvider() {
+ public DcaeCommonVmManagerProvider getSiriusProvider() {
return controller;
}
}
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerClient.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerClient.java
index 57a8525..750b6aa 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerClient.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerClient.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 DcaeCommonVmManagerClient extends CommonVmManagerImpl {
DcaeCommonVmManager.ecoreSetup();
client = new GenericHttpClient(file,name);
client.add("/resources", this);
+ client.setVersion("ONAP-R2");
}
public DcaeCommonVmManagerClient(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 DcaeCommonVmManagerClient(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.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_test);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_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(CommonVmManagerMessageEnum.REMOTE_test, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_test, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_test,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_test,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -88,16 +94,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@Override
public void suspend() {
- EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_suspend);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_suspend,client.getRemote());
try {
client.operationPath("/resources", c, "suspend", null);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_suspend, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_suspend, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_suspend,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_suspend,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -105,16 +112,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@Override
public void resume() {
- EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_resume);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_resume,client.getRemote());
try {
client.operationPath("/resources", c, "resume", null);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_resume, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_resume, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_resume,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_resume,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -122,16 +130,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@Override
public java.lang.String publicKey() {
- EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_publicKey);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_publicKey,client.getRemote());
java.lang.String res;
try {
res = (java.lang.String) client.operationPath("/resources", c, "publicKey", null);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_publicKey, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@publicKey: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_publicKey, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_publicKey,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_publicKey,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -139,16 +148,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@Override
public void configurationChanged() {
- EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_configurationChanged);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_configurationChanged,client.getRemote());
try {
client.operationPath("/resources", c, "configurationChanged", null);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_configurationChanged, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@configurationChanged: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_configurationChanged, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_configurationChanged,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_configurationChanged,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -156,16 +166,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@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.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_updateStreams);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_updateStreams,client.getRemote());
try {
client.operationPath("/resources", c, "updateStreams", null, inputStreams,outputStreams);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_updateStreams, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateStreams: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_updateStreams, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_updateStreams,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_updateStreams,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -173,16 +184,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@Override
public void logs(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.logs.LogMessage> logs) {
- EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_logs);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_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(CommonVmManagerMessageEnum.REMOTE_logs, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@logs: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_logs, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_logs,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_logs,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -190,16 +202,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@Override
public void metrics(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.metrics.Metric> metrics) {
- EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_metrics);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_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(CommonVmManagerMessageEnum.REMOTE_metrics, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@metrics: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_metrics, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_metrics,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_metrics,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -207,16 +220,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@Override
public void properties(org.json.JSONObject cx, EList<org.openecomp.ncomp.sirius.manager.properties.AbstractProperty> l) {
- EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_properties);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_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(CommonVmManagerMessageEnum.REMOTE_properties, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@properties: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_properties, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_properties,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_properties,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -224,16 +238,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@Override
public void uploadInfo(org.json.JSONObject cx, EList<org.openecomp.ncomp.sirius.manager.server.ManagementInfo> info) {
- EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_uploadInfo);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_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(CommonVmManagerMessageEnum.REMOTE_uploadInfo, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@uploadInfo: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_uploadInfo, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_uploadInfo,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_uploadInfo,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -241,16 +256,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@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.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_getValues);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_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(CommonVmManagerMessageEnum.REMOTE_getValues, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getValues: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_getValues, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_getValues,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_getValues,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -258,16 +274,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@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.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_getValuesAll);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_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(CommonVmManagerMessageEnum.REMOTE_getValuesAll, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getValuesAll: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_getValuesAll, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_getValuesAll,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_getValuesAll,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -275,16 +292,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@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.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_getMessages);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_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(CommonVmManagerMessageEnum.REMOTE_getMessages, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getMessages: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_getMessages, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_getMessages,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_getMessages,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -292,16 +310,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@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.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_getRequestLogger);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_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(CommonVmManagerMessageEnum.REMOTE_getRequestLogger, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getRequestLogger: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_getRequestLogger, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_getRequestLogger,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_getRequestLogger,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -309,16 +328,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@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.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_evaluate);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_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(CommonVmManagerMessageEnum.REMOTE_evaluate, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@evaluate: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_evaluate, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_evaluate,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_evaluate,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -326,16 +346,17 @@ public class DcaeCommonVmManagerClient extends CommonVmManagerImpl {
@Override
public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) {
- EClass c = ManagerPackage.eINSTANCE.getCommonVmManager(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmManagerOperationEnum.REMOTE_update);
+ EClass c = ManagerPackage.eINSTANCE.getCommonVmManager();
+ ecomplogger.recordMetricEventStart(CommonVmManagerOperationEnum.CommonVmManager_update,client.getRemote());
try {
client.operationPath("/resources", c, "update", null, path,function);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_update, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@update: " + e);
+ ecomplogger.warn(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_update, e.toString());
+ EcompException e1 = EcompException.create(CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_update,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmManagerMessageEnum.REMOTE_CALL_FAILED_update,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerServer.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerServer.java
index 639b301..08545d1 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerServer.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/DcaeCommonVmManagerServer.java
@@ -26,17 +26,16 @@ package org.openecomp.dcae.controller.service.common.vm.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.common.vm.manager.CommonVmManager;
@@ -48,7 +47,7 @@ import org.openecomp.dcae.controller.service.common.vm.servers.manager.gui.DcaeM
-public class DcaeCommonVmManagerServer implements ISiriusServer {
+public class DcaeCommonVmManagerServer implements ISiriusServer, IRequestHandler {
public static final Logger logger = Logger.getLogger(DcaeCommonVmManagerServer.class);
String serverPath;
ManagementServer server;
@@ -69,6 +68,7 @@ public class DcaeCommonVmManagerServer implements ISiriusServer {
props = getPropertiesFromClasspath(filename);
serverPath = (String) props.get("server.dir");
server = new ManagementServer(f, "CommonVmManager", serverPath, filename);
+ ManagementServer.setBuildVersion("ONAP-R2");
server.addFactory(f);
server.addFactory(org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory.eINSTANCE);
@@ -81,6 +81,7 @@ public class DcaeCommonVmManagerServer implements ISiriusServer {
controller = (DcaeCommonVmManager) server.find("/").o;
webServer = new Jetty8Server("manager.properties");
webServer.add("/resources",server);
+ webServer.add("/api",this);
@@ -109,4 +110,17 @@ public class DcaeCommonVmManagerServer 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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApi.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApi.java
index d9da84b..27d606c 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApi.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApi.java
@@ -26,20 +26,27 @@ package org.openecomp.dcae.controller.service.common.vm.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;
@@ -84,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;
@@ -101,9 +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.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getTree,server,this);
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTree,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getTree();
}
@@ -112,8 +118,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_);
System.err.println("ERROR: " + e);
- ecomplogger.warn(GuiClientApiMessageEnum.getTree, e.toString());
- 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();
@@ -128,9 +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.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getObject,server,this);
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getObject,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getObject(path);
}
@@ -139,8 +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);
- ecomplogger.warn(GuiClientApiMessageEnum.getObject, e.toString());
- 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();
@@ -155,9 +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.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getTimeSerie,server,this);
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTimeSerie,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getTimeSerie(path,start,end,duration);
}
@@ -166,8 +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);
- ecomplogger.warn(GuiClientApiMessageEnum.getTimeSerie, e.toString());
- 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();
@@ -182,9 +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.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getTable,server,this);
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTable,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getTable(path,start,end);
}
@@ -193,8 +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);
- ecomplogger.warn(GuiClientApiMessageEnum.getTable, e.toString());
- 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();
@@ -209,9 +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.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getHtml,server,this);
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getHtml,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getHtml(path,start,end);
}
@@ -220,8 +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);
- ecomplogger.warn(GuiClientApiMessageEnum.getHtml, e.toString());
- 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();
@@ -236,9 +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.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getGraph,server,this);
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getGraph,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getGraph(path,start,end);
}
@@ -247,8 +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);
- ecomplogger.warn(GuiClientApiMessageEnum.getGraph, e.toString());
- 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();
@@ -262,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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiClient.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiClient.java
index 05d15d1..d3a8724 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/DcaeGuiClientApiClient.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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 {
DcaeCommonVmManager.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: " + client.getRemote() + "@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: " + client.getRemote() + "@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: " + client.getRemote() + "@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: " + client.getRemote() + "@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: " + client.getRemote() + "@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: " + client.getRemote() + "@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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApi.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApi.properties
index 8705ab8..3822d29 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApi.properties
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiMessageEnum.java
index 26a6f5c..527ed2d 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiMessageEnum.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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.common.vm.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.common.vm.servers.manager.gui.logging.GuiClientApi");
+ EELFResourceManager.loadMessageBundle("org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApi");
}
}
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiOperationEnum.java
index d42fa0c..95d4d1e 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/gui/logging/GuiClientApiOperationEnum.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/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.common.vm.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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager.properties
index 9eb6331..ec788c2 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager.properties
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager.properties
@@ -1,198 +1,198 @@
dummy=\
- null|\
+ dummy-null|\
null|\
null|\
null
-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
-publicKey=\
- publicKey-FAILED-5001W|\
+REQUEST_FAILED_publicKey=\
+ REQUEST-FAILED-publicKey-4001W|\
{0}|\
null|\
Operation Failed with Exception
-configurationChanged=\
- configurationChanged-FAILED-5001W|\
+REQUEST_FAILED_configurationChanged=\
+ REQUEST-FAILED-configurationChanged-4001W|\
{0}|\
null|\
Operation Failed with Exception
-updateStreams=\
- updateStreams-FAILED-5001W|\
+REQUEST_FAILED_updateStreams=\
+ REQUEST-FAILED-updateStreams-4001W|\
{0}|\
null|\
Operation Failed with Exception
-logs=\
- logs-FAILED-5001W|\
+REQUEST_FAILED_logs=\
+ REQUEST-FAILED-logs-4001W|\
{0}|\
null|\
Operation Failed with Exception
-metrics=\
- metrics-FAILED-5001W|\
+REQUEST_FAILED_metrics=\
+ REQUEST-FAILED-metrics-4001W|\
{0}|\
null|\
Operation Failed with Exception
-properties=\
- properties-FAILED-5001W|\
+REQUEST_FAILED_properties=\
+ REQUEST-FAILED-properties-4001W|\
{0}|\
null|\
Operation Failed with Exception
-uploadInfo=\
- uploadInfo-FAILED-5001W|\
+REQUEST_FAILED_uploadInfo=\
+ REQUEST-FAILED-uploadInfo-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getValues=\
- getValues-FAILED-5001W|\
+REQUEST_FAILED_getValues=\
+ REQUEST-FAILED-getValues-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getValuesAll=\
- getValuesAll-FAILED-5001W|\
+REQUEST_FAILED_getValuesAll=\
+ REQUEST-FAILED-getValuesAll-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getMessages=\
- getMessages-FAILED-5001W|\
+REQUEST_FAILED_getMessages=\
+ REQUEST-FAILED-getMessages-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getRequestLogger=\
- getRequestLogger-FAILED-5001W|\
+REQUEST_FAILED_getRequestLogger=\
+ REQUEST-FAILED-getRequestLogger-4001W|\
{0}|\
null|\
Operation Failed with Exception
-evaluate=\
- evaluate-FAILED-5001W|\
+REQUEST_FAILED_evaluate=\
+ REQUEST-FAILED-evaluate-4001W|\
{0}|\
null|\
Operation Failed with Exception
-update=\
- update-FAILED-5001W|\
+REQUEST_FAILED_update=\
+ REQUEST-FAILED-update-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_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_publicKey=\
- REMOTE-publicKey-FAILED-5001W|\
+REMOTE_CALL_FAILED_publicKey=\
+ REMOTE-CALL-FAILED-publicKey-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_configurationChanged=\
- REMOTE-configurationChanged-FAILED-5001W|\
+REMOTE_CALL_FAILED_configurationChanged=\
+ REMOTE-CALL-FAILED-configurationChanged-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_updateStreams=\
- REMOTE-updateStreams-FAILED-5001W|\
+REMOTE_CALL_FAILED_updateStreams=\
+ REMOTE-CALL-FAILED-updateStreams-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_logs=\
- REMOTE-logs-FAILED-5001W|\
+REMOTE_CALL_FAILED_logs=\
+ REMOTE-CALL-FAILED-logs-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_metrics=\
- REMOTE-metrics-FAILED-5001W|\
+REMOTE_CALL_FAILED_metrics=\
+ REMOTE-CALL-FAILED-metrics-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_properties=\
- REMOTE-properties-FAILED-5001W|\
+REMOTE_CALL_FAILED_properties=\
+ REMOTE-CALL-FAILED-properties-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_uploadInfo=\
- REMOTE-uploadInfo-FAILED-5001W|\
+REMOTE_CALL_FAILED_uploadInfo=\
+ REMOTE-CALL-FAILED-uploadInfo-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getValues=\
- REMOTE-getValues-FAILED-5001W|\
+REMOTE_CALL_FAILED_getValues=\
+ REMOTE-CALL-FAILED-getValues-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getValuesAll=\
- REMOTE-getValuesAll-FAILED-5001W|\
+REMOTE_CALL_FAILED_getValuesAll=\
+ REMOTE-CALL-FAILED-getValuesAll-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getMessages=\
- REMOTE-getMessages-FAILED-5001W|\
+REMOTE_CALL_FAILED_getMessages=\
+ REMOTE-CALL-FAILED-getMessages-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getRequestLogger=\
- REMOTE-getRequestLogger-FAILED-5001W|\
+REMOTE_CALL_FAILED_getRequestLogger=\
+ REMOTE-CALL-FAILED-getRequestLogger-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_evaluate=\
- REMOTE-evaluate-FAILED-5001W|\
+REMOTE_CALL_FAILED_evaluate=\
+ REMOTE-CALL-FAILED-evaluate-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_update=\
- REMOTE-update-FAILED-5001W|\
+REMOTE_CALL_FAILED_update=\
+ REMOTE-CALL-FAILED-update-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerMessageEnum.java
index 4c3dd1d..29bf1ad 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerMessageEnum.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerMessageEnum.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.common.vm.servers.manager.logging;
import com.att.eelf.i18n.EELFResourceManager;
@@ -28,40 +7,40 @@ import org.openecomp.logger.EcompMessageEnum;
public enum CommonVmManagerMessageEnum implements EcompMessageEnum {
dummy,
- test,
- suspend,
- resume,
- publicKey,
- configurationChanged,
- updateStreams,
- logs,
- metrics,
- properties,
- uploadInfo,
- getValues,
- getValuesAll,
- getMessages,
- getRequestLogger,
- evaluate,
- update,
- 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;
+ 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,
+ 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;
static {
- EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.service.common.vm.servers.manager.logging.CommonVmManager");
+ EELFResourceManager.loadMessageBundle("org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManager");
}
}
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerOperationEnum.java
index 0b6ccd7..c8ec04a 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerOperationEnum.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/manager/logging/CommonVmManagerOperationEnum.java
@@ -1,61 +1,37 @@
-/*-
- * ============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.common.vm.servers.manager.logging;
import org.openecomp.entity.EcompOperationEnum;
public enum CommonVmManagerOperationEnum implements EcompOperationEnum {
- test,
- suspend,
- resume,
- publicKey,
- configurationChanged,
- updateStreams,
- logs,
- metrics,
- properties,
- uploadInfo,
- getValues,
- getValuesAll,
- getMessages,
- getRequestLogger,
- evaluate,
- update,
- 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;
+ CommonVmManager_test("CommonVmManager@test"),
+ CommonVmManager_suspend("CommonVmManager@suspend"),
+ CommonVmManager_resume("CommonVmManager@resume"),
+ CommonVmManager_publicKey("CommonVmManager@publicKey"),
+ CommonVmManager_configurationChanged("CommonVmManager@configurationChanged"),
+ CommonVmManager_updateStreams("CommonVmManager@updateStreams"),
+ CommonVmManager_logs("CommonVmManager@logs"),
+ CommonVmManager_metrics("CommonVmManager@metrics"),
+ CommonVmManager_properties("CommonVmManager@properties"),
+ CommonVmManager_uploadInfo("CommonVmManager@uploadInfo"),
+ CommonVmManager_getValues("CommonVmManager@getValues"),
+ CommonVmManager_getValuesAll("CommonVmManager@getValuesAll"),
+ CommonVmManager_getMessages("CommonVmManager@getMessages"),
+ CommonVmManager_getRequestLogger("CommonVmManager@getRequestLogger"),
+ CommonVmManager_evaluate("CommonVmManager@evaluate"),
+ CommonVmManager_update("CommonVmManager@update") ;
+
+
+ private String n;
+
+ private CommonVmManagerOperationEnum(String n) {
+ this.n = n;
+ }
+
+ @Override
+ public String toString() {
+ return n;
+ }
+
}
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmService.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmService.java
index df84442..017ff50 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmService.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmService.java
@@ -26,20 +26,27 @@ package org.openecomp.dcae.controller.service.common.vm.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;
@@ -54,9 +61,9 @@ import org.openecomp.dcae.controller.service.common.vm.service.impl.CommonVmServ
-public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusPlugin {
+public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusProvider, ISiriusPlugin {
public static final Logger logger = Logger.getLogger(DcaeCommonVmService.class);
- static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ static final NcompLogger ecomplogger = NcompLogger.getNcompLogger();
public DcaeCommonVmServiceProvider controller;
ISiriusServer server;
@@ -71,9 +78,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.deploy);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmServiceOperationEnum.CommonVmService_deploy,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_deploy,"self:" + ManagementServer.object2ref(this));
try {
controller.deploy(instanceName,containerPath);
}
@@ -82,8 +88,10 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmServiceMessageEnum.deploy, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmServiceMessageEnum.REQUEST_FAILED_deploy, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REQUEST_FAILED_deploy,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmServiceMessageEnum.REQUEST_FAILED_deploy, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -98,9 +106,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.undeploy);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmServiceOperationEnum.CommonVmService_undeploy,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_undeploy,"self:" + ManagementServer.object2ref(this));
try {
controller.undeploy(instanceName);
}
@@ -109,8 +116,10 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmServiceMessageEnum.undeploy, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmServiceMessageEnum.REQUEST_FAILED_undeploy, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REQUEST_FAILED_undeploy,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmServiceMessageEnum.REQUEST_FAILED_undeploy, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -125,9 +134,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.test);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmServiceOperationEnum.CommonVmService_test,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_test,"self:" + ManagementServer.object2ref(this));
try {
res = controller.test(instanceName);
}
@@ -136,8 +144,10 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmServiceMessageEnum.test, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmServiceMessageEnum.REQUEST_FAILED_test, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REQUEST_FAILED_test,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmServiceMessageEnum.REQUEST_FAILED_test, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -152,9 +162,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.suspend);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmServiceOperationEnum.CommonVmService_suspend,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_suspend,"self:" + ManagementServer.object2ref(this));
try {
controller.suspend(instanceName);
}
@@ -163,8 +172,10 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmServiceMessageEnum.suspend, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmServiceMessageEnum.REQUEST_FAILED_suspend, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REQUEST_FAILED_suspend,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmServiceMessageEnum.REQUEST_FAILED_suspend, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -179,9 +190,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.resume);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmServiceOperationEnum.CommonVmService_resume,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_resume,"self:" + ManagementServer.object2ref(this));
try {
controller.resume(instanceName);
}
@@ -190,8 +200,10 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmServiceMessageEnum.resume, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmServiceMessageEnum.REQUEST_FAILED_resume, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REQUEST_FAILED_resume,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmServiceMessageEnum.REQUEST_FAILED_resume, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -206,9 +218,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.pushManagerConfiguration);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmServiceOperationEnum.CommonVmService_pushManagerConfiguration,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_pushManagerConfiguration,"self:" + ManagementServer.object2ref(this));
try {
controller.pushManagerConfiguration(instanceName);
}
@@ -217,8 +228,10 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmServiceMessageEnum.pushManagerConfiguration, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmServiceMessageEnum.REQUEST_FAILED_pushManagerConfiguration, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REQUEST_FAILED_pushManagerConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmServiceMessageEnum.REQUEST_FAILED_pushManagerConfiguration, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -233,9 +246,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.pollManagerConfiguration);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmServiceOperationEnum.CommonVmService_pollManagerConfiguration,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_pollManagerConfiguration,"self:" + ManagementServer.object2ref(this));
try {
controller.pollManagerConfiguration(instanceName);
}
@@ -244,8 +256,10 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmServiceMessageEnum.pollManagerConfiguration, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmServiceMessageEnum.REQUEST_FAILED_pollManagerConfiguration, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REQUEST_FAILED_pollManagerConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmServiceMessageEnum.REQUEST_FAILED_pollManagerConfiguration, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -260,9 +274,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.managerConfiguration);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmServiceOperationEnum.CommonVmService_managerConfiguration,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_managerConfiguration,"self:" + ManagementServer.object2ref(this));
try {
res = controller.managerConfiguration(instanceName);
}
@@ -271,8 +284,10 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmServiceMessageEnum.managerConfiguration, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmServiceMessageEnum.REQUEST_FAILED_managerConfiguration, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REQUEST_FAILED_managerConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmServiceMessageEnum.REQUEST_FAILED_managerConfiguration, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -287,9 +302,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.managerOperation);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmServiceOperationEnum.CommonVmService_managerOperation,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_managerOperation,"self:" + ManagementServer.object2ref(this));
try {
res = controller.managerOperation(instanceName,operation,parameters);
}
@@ -298,8 +312,10 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmServiceMessageEnum.managerOperation, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmServiceMessageEnum.REQUEST_FAILED_managerOperation, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REQUEST_FAILED_managerOperation,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmServiceMessageEnum.REQUEST_FAILED_managerOperation, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -314,9 +330,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.updateConfigurationFromPolicy);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmServiceOperationEnum.CommonVmService_updateConfigurationFromPolicy,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_updateConfigurationFromPolicy,"self:" + ManagementServer.object2ref(this));
try {
controller.updateConfigurationFromPolicy(instanceName);
}
@@ -325,8 +340,10 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmServiceMessageEnum.updateConfigurationFromPolicy, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmServiceMessageEnum.REQUEST_FAILED_updateConfigurationFromPolicy, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REQUEST_FAILED_updateConfigurationFromPolicy,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmServiceMessageEnum.REQUEST_FAILED_updateConfigurationFromPolicy, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -341,9 +358,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.runHealthTests);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmServiceOperationEnum.CommonVmService_runHealthTests,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_runHealthTests,"self:" + ManagementServer.object2ref(this));
try {
controller.runHealthTests();
}
@@ -352,8 +368,10 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmServiceMessageEnum.runHealthTests, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmServiceMessageEnum.REQUEST_FAILED_runHealthTests, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REQUEST_FAILED_runHealthTests,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmServiceMessageEnum.REQUEST_FAILED_runHealthTests, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -368,9 +386,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.START, duration_);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.updateDeploymentStatus);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(CommonVmServiceOperationEnum.CommonVmService_updateDeploymentStatus,server,this);
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_updateDeploymentStatus,"self:" + ManagementServer.object2ref(this));
try {
controller.updateDeploymentStatus();
}
@@ -379,8 +396,10 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
if (server != null)
server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.ERROR, duration_);
System.err.println("ERROR: " + e);
- ecomplogger.warn(CommonVmServiceMessageEnum.updateDeploymentStatus, e.toString());
- throw e;
+ ecomplogger.warn(CommonVmServiceMessageEnum.REQUEST_FAILED_updateDeploymentStatus, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REQUEST_FAILED_updateDeploymentStatus,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, CommonVmServiceMessageEnum.REQUEST_FAILED_updateDeploymentStatus, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -394,6 +413,8 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
+
+
@Override
public void start() {
controller.start();
@@ -402,7 +423,7 @@ public class DcaeCommonVmService extends CommonVmServiceImpl implements ISiriusP
public static void ecoreSetup() {
DcaeCommonVmServiceProvider.ecoreSetup();
}
- public DcaeCommonVmServiceProvider getSomfProvider() {
+ public DcaeCommonVmServiceProvider getSiriusProvider() {
return controller;
}
}
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceClient.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceClient.java
index 19ffd2d..568a2cd 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceClient.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceClient.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 DcaeCommonVmServiceClient extends CommonVmServiceImpl {
DcaeCommonVmService.ecoreSetup();
client = new GenericHttpClient(file,name);
client.add("/resources", this);
+ client.setVersion("ONAP-R2");
}
public DcaeCommonVmServiceClient(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 DcaeCommonVmServiceClient(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.getCommonVmService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_deploy);
+ EClass c = ServicePackage.eINSTANCE.getCommonVmService();
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_deploy,client.getRemote());
try {
client.operationPath("/resources", c, "deploy", null, instanceName,containerPath);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_deploy, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@deploy: " + e);
+ ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_deploy, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_deploy,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_deploy,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -88,16 +94,17 @@ public class DcaeCommonVmServiceClient extends CommonVmServiceImpl {
@Override
public void undeploy(java.lang.String instanceName) {
- EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_undeploy);
+ EClass c = ServicePackage.eINSTANCE.getCommonVmService();
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_undeploy,client.getRemote());
try {
client.operationPath("/resources", c, "undeploy", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_undeploy, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@undeploy: " + e);
+ ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_undeploy, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_undeploy,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_undeploy,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -105,16 +112,17 @@ public class DcaeCommonVmServiceClient extends CommonVmServiceImpl {
@Override
public org.openecomp.dcae.controller.core.service.HealthTestResponse test(java.lang.String instanceName) {
- EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_test);
+ EClass c = ServicePackage.eINSTANCE.getCommonVmService();
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_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(CommonVmServiceMessageEnum.REMOTE_test, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e);
+ ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_test, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_test,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_test,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -122,16 +130,17 @@ public class DcaeCommonVmServiceClient extends CommonVmServiceImpl {
@Override
public void suspend(java.lang.String instanceName) {
- EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_suspend);
+ EClass c = ServicePackage.eINSTANCE.getCommonVmService();
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_suspend,client.getRemote());
try {
client.operationPath("/resources", c, "suspend", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_suspend, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e);
+ ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_suspend, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_suspend,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_suspend,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -139,16 +148,17 @@ public class DcaeCommonVmServiceClient extends CommonVmServiceImpl {
@Override
public void resume(java.lang.String instanceName) {
- EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_resume);
+ EClass c = ServicePackage.eINSTANCE.getCommonVmService();
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_resume,client.getRemote());
try {
client.operationPath("/resources", c, "resume", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_resume, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e);
+ ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_resume, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_resume,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_resume,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -156,16 +166,17 @@ public class DcaeCommonVmServiceClient extends CommonVmServiceImpl {
@Override
public void pushManagerConfiguration(java.lang.String instanceName) {
- EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_pushManagerConfiguration);
+ EClass c = ServicePackage.eINSTANCE.getCommonVmService();
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_pushManagerConfiguration,client.getRemote());
try {
client.operationPath("/resources", c, "pushManagerConfiguration", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@pushManagerConfiguration: " + e);
+ ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_pushManagerConfiguration, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_pushManagerConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_pushManagerConfiguration,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -173,16 +184,17 @@ public class DcaeCommonVmServiceClient extends CommonVmServiceImpl {
@Override
public void pollManagerConfiguration(java.lang.String instanceName) {
- EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_pollManagerConfiguration);
+ EClass c = ServicePackage.eINSTANCE.getCommonVmService();
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_pollManagerConfiguration,client.getRemote());
try {
client.operationPath("/resources", c, "pollManagerConfiguration", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@pollManagerConfiguration: " + e);
+ ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_pollManagerConfiguration, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_pollManagerConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_pollManagerConfiguration,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -190,16 +202,17 @@ public class DcaeCommonVmServiceClient extends CommonVmServiceImpl {
@Override
public org.eclipse.emf.ecore.EObject managerConfiguration(java.lang.String instanceName) {
- EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_managerConfiguration);
+ EClass c = ServicePackage.eINSTANCE.getCommonVmService();
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_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(CommonVmServiceMessageEnum.REMOTE_managerConfiguration, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerConfiguration: " + e);
+ ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_managerConfiguration, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_managerConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_managerConfiguration,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -207,16 +220,17 @@ public class DcaeCommonVmServiceClient extends CommonVmServiceImpl {
@Override
public org.json.JSONObject managerOperation(java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) {
- EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_managerOperation);
+ EClass c = ServicePackage.eINSTANCE.getCommonVmService();
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_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(CommonVmServiceMessageEnum.REMOTE_managerOperation, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerOperation: " + e);
+ ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_managerOperation, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_managerOperation,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_managerOperation,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -224,16 +238,17 @@ public class DcaeCommonVmServiceClient extends CommonVmServiceImpl {
@Override
public void updateConfigurationFromPolicy(java.lang.String instanceName) {
- EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_updateConfigurationFromPolicy);
+ EClass c = ServicePackage.eINSTANCE.getCommonVmService();
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_updateConfigurationFromPolicy,client.getRemote());
try {
client.operationPath("/resources", c, "updateConfigurationFromPolicy", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateConfigurationFromPolicy: " + e);
+ ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_updateConfigurationFromPolicy, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_updateConfigurationFromPolicy,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_updateConfigurationFromPolicy,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -241,16 +256,17 @@ public class DcaeCommonVmServiceClient extends CommonVmServiceImpl {
@Override
public void runHealthTests() {
- EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_runHealthTests);
+ EClass c = ServicePackage.eINSTANCE.getCommonVmService();
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_runHealthTests,client.getRemote());
try {
client.operationPath("/resources", c, "runHealthTests", null);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_runHealthTests, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@runHealthTests: " + e);
+ ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_runHealthTests, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_runHealthTests,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_runHealthTests,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -258,16 +274,17 @@ public class DcaeCommonVmServiceClient extends CommonVmServiceImpl {
@Override
public void updateDeploymentStatus() {
- EClass c = ServicePackage.eINSTANCE.getCommonVmService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(CommonVmServiceOperationEnum.REMOTE_updateDeploymentStatus);
+ EClass c = ServicePackage.eINSTANCE.getCommonVmService();
+ ecomplogger.recordMetricEventStart(CommonVmServiceOperationEnum.CommonVmService_updateDeploymentStatus,client.getRemote());
try {
client.operationPath("/resources", c, "updateDeploymentStatus", null);
}
catch (Exception e) {
- ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_updateDeploymentStatus, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateDeploymentStatus: " + e);
+ ecomplogger.warn(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_updateDeploymentStatus, e.toString());
+ EcompException e1 = EcompException.create(CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_updateDeploymentStatus,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,CommonVmServiceMessageEnum.REMOTE_CALL_FAILED_updateDeploymentStatus,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceServer.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceServer.java
index 67e4088..baea8dc 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceServer.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/DcaeCommonVmServiceServer.java
@@ -26,17 +26,16 @@ package org.openecomp.dcae.controller.service.common.vm.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.common.vm.service.CommonVmService;
@@ -46,7 +45,7 @@ import org.openecomp.dcae.controller.service.common.vm.service.CommonVmService;
-public class DcaeCommonVmServiceServer implements ISiriusServer {
+public class DcaeCommonVmServiceServer implements ISiriusServer, IRequestHandler {
public static final Logger logger = Logger.getLogger(DcaeCommonVmServiceServer.class);
String serverPath;
ManagementServer server;
@@ -64,6 +63,7 @@ public class DcaeCommonVmServiceServer implements ISiriusServer {
props = getPropertiesFromClasspath(filename);
serverPath = (String) props.get("server.dir");
server = new ManagementServer(f, "CommonVmService", serverPath, filename);
+ ManagementServer.setBuildVersion("ONAP-R2");
server.addFactory(f);
server.addFactory(org.openecomp.dcae.controller.service.common.vm.service.ServiceFactory.eINSTANCE);
@@ -76,6 +76,7 @@ public class DcaeCommonVmServiceServer implements ISiriusServer {
controller = (DcaeCommonVmService) server.find("/").o;
webServer = new Jetty8Server("service.properties");
webServer.add("/resources",server);
+ webServer.add("/api",this);
@@ -98,4 +99,17 @@ public class DcaeCommonVmServiceServer 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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService.properties b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService.properties
index d32cf07..1218d2a 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService.properties
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService.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-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceMessageEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceMessageEnum.java
index b46423a..197e4ae 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceMessageEnum.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceMessageEnum.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.common.vm.servers.service.logging;
import com.att.eelf.i18n.EELFResourceManager;
@@ -28,32 +7,32 @@ import org.openecomp.logger.EcompMessageEnum;
public enum CommonVmServiceMessageEnum 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.common.vm.servers.service.logging.CommonVmService");
+ EELFResourceManager.loadMessageBundle("org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmService");
}
}
diff --git a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceOperationEnum.java b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceOperationEnum.java
index f0f2971..8073443 100644
--- a/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceOperationEnum.java
+++ b/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/src/main/sirius-gen/org/openecomp/dcae/controller/service/common/vm/servers/service/logging/CommonVmServiceOperationEnum.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.common.vm.servers.service.logging;
import org.openecomp.entity.EcompOperationEnum;
public enum CommonVmServiceOperationEnum 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;
+ CommonVmService_deploy("CommonVmService@deploy"),
+ CommonVmService_undeploy("CommonVmService@undeploy"),
+ CommonVmService_test("CommonVmService@test"),
+ CommonVmService_suspend("CommonVmService@suspend"),
+ CommonVmService_resume("CommonVmService@resume"),
+ CommonVmService_pushManagerConfiguration("CommonVmService@pushManagerConfiguration"),
+ CommonVmService_pollManagerConfiguration("CommonVmService@pollManagerConfiguration"),
+ CommonVmService_managerConfiguration("CommonVmService@managerConfiguration"),
+ CommonVmService_managerOperation("CommonVmService@managerOperation"),
+ CommonVmService_updateConfigurationFromPolicy("CommonVmService@updateConfigurationFromPolicy"),
+ CommonVmService_runHealthTests("CommonVmService@runHealthTests"),
+ CommonVmService_updateDeploymentStatus("CommonVmService@updateDeploymentStatus") ;
+
+
+ private String n;
+
+ private CommonVmServiceOperationEnum(String n) {
+ this.n = n;
+ }
+
+ @Override
+ public String toString() {
+ return n;
+ }
+
}