aboutsummaryrefslogtreecommitdiffstats
path: root/ncomp-openstack-controller
diff options
context:
space:
mode:
authorCarsten Lund <lund@research.att.com>2017-04-16 14:13:29 +0000
committerCarsten Lund <lund@research.att.com>2017-04-16 14:13:44 +0000
commitaccd25463d8aef29d33cb2f2675164a3bdbce9c0 (patch)
treecde7cc365b9f396030753b58a141eb87dbb71ba5 /ncomp-openstack-controller
parent4cdd2049812df968d53bfbc140ff1f5642b3d42d (diff)
[DCAE-15] Changes related to version 1.1
See Jira for details Change-Id: Icf804164264baf85a2f81553f74289549e3da953 Signed-off-by: Carsten Lund <lund@research.att.com>
Diffstat (limited to 'ncomp-openstack-controller')
-rw-r--r--ncomp-openstack-controller/.classpath2
-rw-r--r--ncomp-openstack-controller/META-INF/MANIFEST.MF7
-rw-r--r--ncomp-openstack-controller/pom.xml2
-rw-r--r--ncomp-openstack-controller/src/main/java/org/openecomp/ncomp/openstack/controller/tools/Generator.java4
-rw-r--r--ncomp-openstack-controller/src/main/java/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerProvider.java13
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/OpenStackController.yaml12
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/OpenStackLocation.yaml288
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackController.java28
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerClient.java16
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerServer.java24
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/OsOpenStackLocation.java292
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/OsOpenStackLocationClient.java280
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocation.properties194
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocationMessageEnum.java119
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocationOperationEnum.java106
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptor.properties2
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptorMessageEnum.java23
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptorOperationEnum.java36
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackController.properties10
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackControllerMessageEnum.java27
-rw-r--r--ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackControllerOperationEnum.java37
21 files changed, 723 insertions, 799 deletions
diff --git a/ncomp-openstack-controller/.classpath b/ncomp-openstack-controller/.classpath
index fda728c..15a18db 100644
--- a/ncomp-openstack-controller/.classpath
+++ b/ncomp-openstack-controller/.classpath
@@ -20,8 +20,6 @@
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
- <classpathentry combineaccessrules="false" kind="src" path="/ncomp-sirius-manager-drools"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/ncomp-openstack-controller/META-INF/MANIFEST.MF b/ncomp-openstack-controller/META-INF/MANIFEST.MF
index 932b68c..86c63c1 100644
--- a/ncomp-openstack-controller/META-INF/MANIFEST.MF
+++ b/ncomp-openstack-controller/META-INF/MANIFEST.MF
@@ -6,10 +6,3 @@ Bundle-Version: 0.1.0.qualifier
Export-Package: org.openecomp.ncomp.openstack.controller.tools,
org.openecomp.ncomp.servers.openstack,
org.openecomp.ncomp.servers.openstack.loc
-Require-Bundle: ncomp-core-types;bundle-version="0.1.0",
- ncomp-sirius-manager-model;bundle-version="0.1.0",
- ncomp-sirius-manager-server;bundle-version="0.1.0",
- ncomp-sirius-manager-console;bundle-version="0.1.0",
- ncomp-sirius-manager-generator;bundle-version="0.1.0",
- ncomp-openstack-model;bundle-version="0.1.0",
- ncomp-utils-java;bundle-version="0.1.0"
diff --git a/ncomp-openstack-controller/pom.xml b/ncomp-openstack-controller/pom.xml
index 71790a7..1781dde 100644
--- a/ncomp-openstack-controller/pom.xml
+++ b/ncomp-openstack-controller/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.openecomp.ncomp.sirius.manager</groupId>
<artifactId>ncomp-sirius-manager-base</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<relativePath>../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base</relativePath>
</parent>
<dependencies>
diff --git a/ncomp-openstack-controller/src/main/java/org/openecomp/ncomp/openstack/controller/tools/Generator.java b/ncomp-openstack-controller/src/main/java/org/openecomp/ncomp/openstack/controller/tools/Generator.java
index 397b827..b5c366e 100644
--- a/ncomp-openstack-controller/src/main/java/org/openecomp/ncomp/openstack/controller/tools/Generator.java
+++ b/ncomp-openstack-controller/src/main/java/org/openecomp/ncomp/openstack/controller/tools/Generator.java
@@ -47,12 +47,13 @@ public class Generator {
String dir = p.getNsURI().replace(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("Os");
m.setPluginName(p.getNsURI());
m.setName("OpenStackController");
m.setTitle("OpenStack Controller");
ControllerGenerator g = new ControllerGenerator(o,m);
+ g.setVersion("ONAP-R2");
EObject loc =LocationFactory.eINSTANCE.createOpenStackLocation();
g.addObject("loc",loc,m);
g.setEnableIRequestHandler(false);
@@ -62,7 +63,6 @@ public class Generator {
//g.addApi("e",e,m);
//g.addFactory("org.openecomp.ncomp.sirius.servers.openstack.OsOpenstackFactory");
g.generate(dir);
- g.generateAnt("./ant.xml",true,true);
g.generateScripts("src/main/server-gen/bin","openstack-controller");
String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging";
YamlToJava.convert("src/main/resources/OpenStackAdaptor.yaml", dir + "/logging", pName);
diff --git a/ncomp-openstack-controller/src/main/java/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerProvider.java b/ncomp-openstack-controller/src/main/java/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerProvider.java
index 07941a9..26bf870 100644
--- a/ncomp-openstack-controller/src/main/java/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerProvider.java
+++ b/ncomp-openstack-controller/src/main/java/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerProvider.java
@@ -27,7 +27,7 @@ import java.util.HashMap;
import org.apache.log4j.Logger;
import org.json.JSONObject;
-import org.openecomp.logger.EcompLogger;
+import org.openecomp.logger.StatusCodeEnum;
import org.openecomp.ncomp.openstack.OpenStackController;
import org.openecomp.ncomp.openstack.controller.tools.OpenStackUtil;
import org.openecomp.ncomp.openstack.location.OpenStackLocation;
@@ -38,11 +38,12 @@ import org.openecomp.ncomp.sirius.manager.ISiriusServer;
import org.openecomp.ncomp.sirius.manager.ManagementServer;
import org.openecomp.ncomp.sirius.manager.ManagementServerError;
import org.openecomp.ncomp.sirius.manager.ManagementServerUtils;
+import org.openecomp.ncomp.sirius.manager.logging.NcompLogger;
import org.openecomp.ncomp.sirius.manager.server.ServerPackage;
public class OsOpenStackControllerProvider extends BasicAdaptorProvider {
public static final Logger logger = Logger.getLogger(OsOpenStackControllerProvider.class);
- static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ static final NcompLogger ecomplogger = NcompLogger.getNcompLogger();
private HashMap<String, OpenStackUtil> utils = new HashMap<String, OpenStackUtil>();
private HashMap<String, Thread> pollers = new HashMap<String, Thread>();
private HashMap<String, Date> lastPoll = new HashMap<String, Date>();
@@ -71,20 +72,20 @@ public class OsOpenStackControllerProvider extends BasicAdaptorProvider {
t = new Thread("openstackPoller " + l.getName()) {
@Override
public void run() {
- ecomplogger.setOperation(OpenStackAdaptorOperationEnum.POLLING);
while (true) {
Date lastPoll2 = lastPoll.get(l.getName());
if (lastPoll2 == null || lastPoll2.getTime() + pollingFrequency < new Date().getTime()) {
try {
+ ecomplogger.setOperation(OpenStackAdaptorOperationEnum.POLLING);
ecomplogger.newRequestId();
+ ecomplogger.setInstanceId(controller, l);
ecomplogger.recordAuditEventStart();
openstackPolling(l);
+ ecomplogger.recordAuditEventEnd();
} catch (Exception e) {
ecomplogger.warn(OpenStackAdaptorMessageEnum.POLLING_FAILED, ManagementServer.object2ref(l));
ManagementServerUtils.printStackTrace(e);
- }
- finally {
- ecomplogger.recordAuditEventEnd();
+ ecomplogger.recordAuditEventEnd(StatusCodeEnum.ERROR);
}
}
try {
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/OpenStackController.yaml b/ncomp-openstack-controller/src/main/sirius-gen/OpenStackController.yaml
index fb697a4..76c322f 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/OpenStackController.yaml
+++ b/ncomp-openstack-controller/src/main/sirius-gen/OpenStackController.yaml
@@ -1,14 +1,12 @@
operations:
- uploadOpenstackConfiguration: {}
- REMOTE_uploadOpenstackConfiguration:
- decription: Remote call uploadOpenstackConfiguration
+ OpenStackController@uploadOpenstackConfiguration: {}
messages:
dummy: {}
- uploadOpenstackConfiguration:
- errorCode: uploadOpenstackConfiguration-FAILED-5001W
+ REQUEST-FAILED-uploadOpenstackConfiguration:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- REMOTE_uploadOpenstackConfiguration:
- errorCode: REMOTE-uploadOpenstackConfiguration-FAILED-5001W
+ REMOTE-CALL-FAILED-uploadOpenstackConfiguration:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/OpenStackLocation.yaml b/ncomp-openstack-controller/src/main/sirius-gen/OpenStackLocation.yaml
index 3296bdc..bc1eb42 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/OpenStackLocation.yaml
+++ b/ncomp-openstack-controller/src/main/sirius-gen/OpenStackLocation.yaml
@@ -1,267 +1,219 @@
operations:
- createNetwork: {}
- createSubnet: {}
- createPort: {}
- createRouter: {}
- deleteNetwork: {}
- deleteSubnet: {}
- deletePort: {}
- deleteRouter: {}
- associateFloatingIp: {}
- createServer: {}
- deleteServer: {}
- createKeyPair: {}
- delete: {}
- createFlavor: {}
- createSecurityGroup: {}
- serverAction: {}
- deployVmType: {}
- undeployVmType: {}
- deployUser: {}
- undeployUser: {}
- createAlarm: {}
- deleteAlarm: {}
- poll: {}
- mergeLocation: {}
- REMOTE_createNetwork:
- decription: Remote call createNetwork
- REMOTE_createSubnet:
- decription: Remote call createSubnet
- REMOTE_createPort:
- decription: Remote call createPort
- REMOTE_createRouter:
- decription: Remote call createRouter
- REMOTE_deleteNetwork:
- decription: Remote call deleteNetwork
- REMOTE_deleteSubnet:
- decription: Remote call deleteSubnet
- REMOTE_deletePort:
- decription: Remote call deletePort
- REMOTE_deleteRouter:
- decription: Remote call deleteRouter
- REMOTE_associateFloatingIp:
- decription: Remote call associateFloatingIp
- REMOTE_createServer:
- decription: Remote call createServer
- REMOTE_deleteServer:
- decription: Remote call deleteServer
- REMOTE_createKeyPair:
- decription: Remote call createKeyPair
- REMOTE_delete:
- decription: Remote call delete
- REMOTE_createFlavor:
- decription: Remote call createFlavor
- REMOTE_createSecurityGroup:
- decription: Remote call createSecurityGroup
- REMOTE_serverAction:
- decription: Remote call serverAction
- REMOTE_deployVmType:
- decription: Remote call deployVmType
- REMOTE_undeployVmType:
- decription: Remote call undeployVmType
- REMOTE_deployUser:
- decription: Remote call deployUser
- REMOTE_undeployUser:
- decription: Remote call undeployUser
- REMOTE_createAlarm:
- decription: Remote call createAlarm
- REMOTE_deleteAlarm:
- decription: Remote call deleteAlarm
- REMOTE_poll:
- decription: Remote call poll
- REMOTE_mergeLocation:
- decription: Remote call mergeLocation
+ OpenStackLocation@createNetwork: {}
+ OpenStackLocation@createSubnet: {}
+ OpenStackLocation@createPort: {}
+ OpenStackLocation@createRouter: {}
+ OpenStackLocation@deleteNetwork: {}
+ OpenStackLocation@deleteSubnet: {}
+ OpenStackLocation@deletePort: {}
+ OpenStackLocation@deleteRouter: {}
+ OpenStackLocation@associateFloatingIp: {}
+ OpenStackLocation@createServer: {}
+ OpenStackLocation@deleteServer: {}
+ OpenStackLocation@createKeyPair: {}
+ OpenStackLocation@delete: {}
+ OpenStackLocation@createFlavor: {}
+ OpenStackLocation@createSecurityGroup: {}
+ OpenStackLocation@serverAction: {}
+ OpenStackLocation@deployVmType: {}
+ OpenStackLocation@undeployVmType: {}
+ OpenStackLocation@deployUser: {}
+ OpenStackLocation@undeployUser: {}
+ OpenStackLocation@createAlarm: {}
+ OpenStackLocation@deleteAlarm: {}
+ OpenStackLocation@poll: {}
+ OpenStackLocation@mergeLocation: {}
messages:
dummy: {}
- createNetwork:
- errorCode: createNetwork-FAILED-5001W
+ REQUEST-FAILED-createNetwork:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- createSubnet:
- errorCode: createSubnet-FAILED-5001W
+ REQUEST-FAILED-createSubnet:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- createPort:
- errorCode: createPort-FAILED-5001W
+ REQUEST-FAILED-createPort:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- createRouter:
- errorCode: createRouter-FAILED-5001W
+ REQUEST-FAILED-createRouter:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- deleteNetwork:
- errorCode: deleteNetwork-FAILED-5001W
+ REQUEST-FAILED-deleteNetwork:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- deleteSubnet:
- errorCode: deleteSubnet-FAILED-5001W
+ REQUEST-FAILED-deleteSubnet:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- deletePort:
- errorCode: deletePort-FAILED-5001W
+ REQUEST-FAILED-deletePort:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- deleteRouter:
- errorCode: deleteRouter-FAILED-5001W
+ REQUEST-FAILED-deleteRouter:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- associateFloatingIp:
- errorCode: associateFloatingIp-FAILED-5001W
+ REQUEST-FAILED-associateFloatingIp:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- createServer:
- errorCode: createServer-FAILED-5001W
+ REQUEST-FAILED-createServer:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- deleteServer:
- errorCode: deleteServer-FAILED-5001W
+ REQUEST-FAILED-deleteServer:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- createKeyPair:
- errorCode: createKeyPair-FAILED-5001W
+ REQUEST-FAILED-createKeyPair:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- delete:
- errorCode: delete-FAILED-5001W
+ REQUEST-FAILED-delete:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- createFlavor:
- errorCode: createFlavor-FAILED-5001W
+ REQUEST-FAILED-createFlavor:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- createSecurityGroup:
- errorCode: createSecurityGroup-FAILED-5001W
+ REQUEST-FAILED-createSecurityGroup:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- serverAction:
- errorCode: serverAction-FAILED-5001W
+ REQUEST-FAILED-serverAction:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- deployVmType:
- errorCode: deployVmType-FAILED-5001W
+ REQUEST-FAILED-deployVmType:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- undeployVmType:
- errorCode: undeployVmType-FAILED-5001W
+ REQUEST-FAILED-undeployVmType:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- deployUser:
- errorCode: deployUser-FAILED-5001W
+ REQUEST-FAILED-deployUser:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- undeployUser:
- errorCode: undeployUser-FAILED-5001W
+ REQUEST-FAILED-undeployUser:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- createAlarm:
- errorCode: createAlarm-FAILED-5001W
+ REQUEST-FAILED-createAlarm:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- deleteAlarm:
- errorCode: deleteAlarm-FAILED-5001W
+ REQUEST-FAILED-deleteAlarm:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- poll:
- errorCode: poll-FAILED-5001W
+ REQUEST-FAILED-poll:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- mergeLocation:
- errorCode: mergeLocation-FAILED-5001W
+ REQUEST-FAILED-mergeLocation:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- REMOTE_createNetwork:
- errorCode: REMOTE-createNetwork-FAILED-5001W
+ REMOTE-CALL-FAILED-createNetwork:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_createSubnet:
- errorCode: REMOTE-createSubnet-FAILED-5001W
+ REMOTE-CALL-FAILED-createSubnet:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_createPort:
- errorCode: REMOTE-createPort-FAILED-5001W
+ REMOTE-CALL-FAILED-createPort:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_createRouter:
- errorCode: REMOTE-createRouter-FAILED-5001W
+ REMOTE-CALL-FAILED-createRouter:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_deleteNetwork:
- errorCode: REMOTE-deleteNetwork-FAILED-5001W
+ REMOTE-CALL-FAILED-deleteNetwork:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_deleteSubnet:
- errorCode: REMOTE-deleteSubnet-FAILED-5001W
+ REMOTE-CALL-FAILED-deleteSubnet:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_deletePort:
- errorCode: REMOTE-deletePort-FAILED-5001W
+ REMOTE-CALL-FAILED-deletePort:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_deleteRouter:
- errorCode: REMOTE-deleteRouter-FAILED-5001W
+ REMOTE-CALL-FAILED-deleteRouter:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_associateFloatingIp:
- errorCode: REMOTE-associateFloatingIp-FAILED-5001W
+ REMOTE-CALL-FAILED-associateFloatingIp:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_createServer:
- errorCode: REMOTE-createServer-FAILED-5001W
+ REMOTE-CALL-FAILED-createServer:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_deleteServer:
- errorCode: REMOTE-deleteServer-FAILED-5001W
+ REMOTE-CALL-FAILED-deleteServer:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_createKeyPair:
- errorCode: REMOTE-createKeyPair-FAILED-5001W
+ REMOTE-CALL-FAILED-createKeyPair:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_delete:
- errorCode: REMOTE-delete-FAILED-5001W
+ REMOTE-CALL-FAILED-delete:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_createFlavor:
- errorCode: REMOTE-createFlavor-FAILED-5001W
+ REMOTE-CALL-FAILED-createFlavor:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_createSecurityGroup:
- errorCode: REMOTE-createSecurityGroup-FAILED-5001W
+ REMOTE-CALL-FAILED-createSecurityGroup:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_serverAction:
- errorCode: REMOTE-serverAction-FAILED-5001W
+ REMOTE-CALL-FAILED-serverAction:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_deployVmType:
- errorCode: REMOTE-deployVmType-FAILED-5001W
+ REMOTE-CALL-FAILED-deployVmType:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_undeployVmType:
- errorCode: REMOTE-undeployVmType-FAILED-5001W
+ REMOTE-CALL-FAILED-undeployVmType:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_deployUser:
- errorCode: REMOTE-deployUser-FAILED-5001W
+ REMOTE-CALL-FAILED-deployUser:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_undeployUser:
- errorCode: REMOTE-undeployUser-FAILED-5001W
+ REMOTE-CALL-FAILED-undeployUser:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_createAlarm:
- errorCode: REMOTE-createAlarm-FAILED-5001W
+ REMOTE-CALL-FAILED-createAlarm:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_deleteAlarm:
- errorCode: REMOTE-deleteAlarm-FAILED-5001W
+ REMOTE-CALL-FAILED-deleteAlarm:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_poll:
- errorCode: REMOTE-poll-FAILED-5001W
+ REMOTE-CALL-FAILED-poll:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_mergeLocation:
- errorCode: REMOTE-mergeLocation-FAILED-5001W
+ REMOTE-CALL-FAILED-mergeLocation:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackController.java b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackController.java
index f6db33f..c78df86 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackController.java
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackController.java
@@ -26,20 +26,27 @@ package org.openecomp.ncomp.servers.openstack;
+
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.ncomp.openstack.impl.OpenStackControllerImpl;
-public class OsOpenStackController extends OpenStackControllerImpl implements ISiriusPlugin {
+public class OsOpenStackController extends OpenStackControllerImpl implements ISiriusProvider, ISiriusPlugin {
public static final Logger logger = Logger.getLogger(OsOpenStackController.class);
- static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ static final NcompLogger ecomplogger = NcompLogger.getNcompLogger();
public OsOpenStackControllerProvider controller;
ISiriusServer server;
@@ -71,9 +78,8 @@ public class OsOpenStackController extends OpenStackControllerImpl implements IS
if (server != null)
server.getServer().recordApi(null, this, "uploadOpenstackConfiguration", ApiRequestStatus.START, duration_,cx,loc);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackControllerOperationEnum.uploadOpenstackConfiguration);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackControllerOperationEnum.OpenStackController_uploadOpenstackConfiguration,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackControllerOperationEnum.OpenStackController_uploadOpenstackConfiguration,"self:" + ManagementServer.object2ref(this));
try {
controller.uploadOpenstackConfiguration(cx,loc);
}
@@ -82,8 +88,10 @@ public class OsOpenStackController extends OpenStackControllerImpl implements IS
if (server != null)
server.getServer().recordApi(null, this, "uploadOpenstackConfiguration", ApiRequestStatus.ERROR, duration_,cx,loc);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackControllerMessageEnum.uploadOpenstackConfiguration, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackControllerMessageEnum.REQUEST_FAILED_uploadOpenstackConfiguration, e.toString());
+ EcompException e1 = EcompException.create(OpenStackControllerMessageEnum.REQUEST_FAILED_uploadOpenstackConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackControllerMessageEnum.REQUEST_FAILED_uploadOpenstackConfiguration, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -97,6 +105,8 @@ public class OsOpenStackController extends OpenStackControllerImpl implements IS
+
+
@Override
public void start() {
controller.start();
@@ -105,7 +115,7 @@ public class OsOpenStackController extends OpenStackControllerImpl implements IS
public static void ecoreSetup() {
OsOpenStackControllerProvider.ecoreSetup();
}
- public OsOpenStackControllerProvider getSomfProvider() {
+ public OsOpenStackControllerProvider getSiriusProvider() {
return controller;
}
}
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerClient.java b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerClient.java
index 855faf9..45f8bc4 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerClient.java
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerClient.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 OsOpenStackControllerClient extends OpenStackControllerImpl {
OsOpenStackController.ecoreSetup();
client = new GenericHttpClient(file,name);
client.add("/resources", this);
+ client.setVersion("ONAP-R2");
}
public OsOpenStackControllerClient(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 OsOpenStackControllerClient(AbstractClient c) {
client = c;
client.add("/resources", this);
+ client.setVersion("ONAP-R2");
}
@Override
public void uploadOpenstackConfiguration(org.json.JSONObject cx, org.openecomp.ncomp.openstack.location.OpenStackLocation loc) {
- EClass c = OpenstackPackage.eINSTANCE.getOpenStackController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackControllerOperationEnum.REMOTE_uploadOpenstackConfiguration);
+ EClass c = OpenstackPackage.eINSTANCE.getOpenStackController();
+ ecomplogger.recordMetricEventStart(OpenStackControllerOperationEnum.OpenStackController_uploadOpenstackConfiguration,client.getRemote());
try {
client.operationPath("/resources", c, "uploadOpenstackConfiguration", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,loc);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackControllerMessageEnum.REMOTE_uploadOpenstackConfiguration, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@uploadOpenstackConfiguration: " + e);
+ ecomplogger.warn(OpenStackControllerMessageEnum.REMOTE_CALL_FAILED_uploadOpenstackConfiguration, e.toString());
+ EcompException e1 = EcompException.create(OpenStackControllerMessageEnum.REMOTE_CALL_FAILED_uploadOpenstackConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackControllerMessageEnum.REMOTE_CALL_FAILED_uploadOpenstackConfiguration,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerServer.java b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerServer.java
index 4249dc3..a5083ca 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerServer.java
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/OsOpenStackControllerServer.java
@@ -26,17 +26,16 @@ package org.openecomp.ncomp.servers.openstack;
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.ncomp.openstack.OpenStackController;
@@ -48,7 +47,7 @@ import org.openecomp.ncomp.servers.openstack.loc.OsLocationFactory;
-public class OsOpenStackControllerServer implements ISiriusServer {
+public class OsOpenStackControllerServer implements ISiriusServer, IRequestHandler {
public static final Logger logger = Logger.getLogger(OsOpenStackControllerServer.class);
String serverPath;
ManagementServer server;
@@ -69,6 +68,7 @@ public class OsOpenStackControllerServer implements ISiriusServer {
props = getPropertiesFromClasspath(filename);
serverPath = (String) props.get("server.dir");
server = new ManagementServer(f, "OpenStackController", serverPath, filename);
+ ManagementServer.setBuildVersion("ONAP-R2");
server.addFactory(f);
server.addRuntimeFactories(this);
@@ -78,6 +78,7 @@ public class OsOpenStackControllerServer implements ISiriusServer {
controller = (OsOpenStackController) server.find("/").o;
webServer = new Jetty8Server("openstack.properties");
webServer.add("/resources",server);
+ webServer.add("/api",this);
@@ -106,4 +107,17 @@ public class OsOpenStackControllerServer 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/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/OsOpenStackLocation.java b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/OsOpenStackLocation.java
index 120135c..d7eab0f 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/OsOpenStackLocation.java
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/OsOpenStackLocation.java
@@ -26,20 +26,27 @@ package org.openecomp.ncomp.servers.openstack.loc;
+
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.ncomp.openstack.location.impl.OpenStackLocationImpl;
-public class OsOpenStackLocation extends OpenStackLocationImpl {
+public class OsOpenStackLocation extends OpenStackLocationImpl implements ISiriusProvider {
public static final Logger logger = Logger.getLogger(OsOpenStackLocation.class);
- static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ static final NcompLogger ecomplogger = NcompLogger.getNcompLogger();
public OsOpenStackLocationProvider controller;
ISiriusServer server;
@@ -71,9 +78,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "poll", ApiRequestStatus.START, duration_);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.poll);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_poll,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_poll,"self:" + ManagementServer.object2ref(this));
try {
controller.poll();
}
@@ -82,8 +88,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "poll", ApiRequestStatus.ERROR, duration_);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.poll, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_poll, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_poll,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_poll, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -98,9 +106,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "mergeLocation", ApiRequestStatus.START, duration_,loc);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.mergeLocation);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_mergeLocation,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_mergeLocation,"self:" + ManagementServer.object2ref(this));
try {
controller.mergeLocation(loc);
}
@@ -109,8 +116,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "mergeLocation", ApiRequestStatus.ERROR, duration_,loc);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.mergeLocation, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_mergeLocation, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_mergeLocation,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_mergeLocation, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -125,9 +134,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createNetwork", ApiRequestStatus.START, duration_,request);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.createNetwork);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_createNetwork,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createNetwork,"self:" + ManagementServer.object2ref(this));
try {
res = controller.createNetwork(request);
}
@@ -136,8 +144,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createNetwork", ApiRequestStatus.ERROR, duration_,request);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.createNetwork, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_createNetwork, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_createNetwork,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_createNetwork, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -152,9 +162,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createSubnet", ApiRequestStatus.START, duration_,request);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.createSubnet);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_createSubnet,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createSubnet,"self:" + ManagementServer.object2ref(this));
try {
res = controller.createSubnet(request);
}
@@ -163,8 +172,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createSubnet", ApiRequestStatus.ERROR, duration_,request);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.createSubnet, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_createSubnet, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_createSubnet,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_createSubnet, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -179,9 +190,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createPort", ApiRequestStatus.START, duration_,request);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.createPort);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_createPort,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createPort,"self:" + ManagementServer.object2ref(this));
try {
res = controller.createPort(request);
}
@@ -190,8 +200,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createPort", ApiRequestStatus.ERROR, duration_,request);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.createPort, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_createPort, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_createPort,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_createPort, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -206,9 +218,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createRouter", ApiRequestStatus.START, duration_,request);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.createRouter);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_createRouter,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createRouter,"self:" + ManagementServer.object2ref(this));
try {
res = controller.createRouter(request);
}
@@ -217,8 +228,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createRouter", ApiRequestStatus.ERROR, duration_,request);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.createRouter, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_createRouter, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_createRouter,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_createRouter, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -233,9 +246,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deleteNetwork", ApiRequestStatus.START, duration_,projectName,name);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.deleteNetwork);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_deleteNetwork,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deleteNetwork,"self:" + ManagementServer.object2ref(this));
try {
controller.deleteNetwork(projectName,name);
}
@@ -244,8 +256,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deleteNetwork", ApiRequestStatus.ERROR, duration_,projectName,name);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.deleteNetwork, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_deleteNetwork, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_deleteNetwork,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_deleteNetwork, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -260,9 +274,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deleteSubnet", ApiRequestStatus.START, duration_,projectName,name);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.deleteSubnet);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_deleteSubnet,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deleteSubnet,"self:" + ManagementServer.object2ref(this));
try {
controller.deleteSubnet(projectName,name);
}
@@ -271,8 +284,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deleteSubnet", ApiRequestStatus.ERROR, duration_,projectName,name);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.deleteSubnet, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_deleteSubnet, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_deleteSubnet,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_deleteSubnet, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -287,9 +302,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deletePort", ApiRequestStatus.START, duration_,projectName,name);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.deletePort);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_deletePort,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deletePort,"self:" + ManagementServer.object2ref(this));
try {
controller.deletePort(projectName,name);
}
@@ -298,8 +312,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deletePort", ApiRequestStatus.ERROR, duration_,projectName,name);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.deletePort, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_deletePort, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_deletePort,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_deletePort, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -314,9 +330,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deleteRouter", ApiRequestStatus.START, duration_,projectName,name);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.deleteRouter);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_deleteRouter,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deleteRouter,"self:" + ManagementServer.object2ref(this));
try {
controller.deleteRouter(projectName,name);
}
@@ -325,8 +340,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deleteRouter", ApiRequestStatus.ERROR, duration_,projectName,name);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.deleteRouter, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_deleteRouter, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_deleteRouter,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_deleteRouter, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -341,9 +358,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "associateFloatingIp", ApiRequestStatus.START, duration_,projectName,ipId,portId);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.associateFloatingIp);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_associateFloatingIp,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_associateFloatingIp,"self:" + ManagementServer.object2ref(this));
try {
controller.associateFloatingIp(projectName,ipId,portId);
}
@@ -352,8 +368,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "associateFloatingIp", ApiRequestStatus.ERROR, duration_,projectName,ipId,portId);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.associateFloatingIp, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_associateFloatingIp, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_associateFloatingIp,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_associateFloatingIp, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -368,9 +386,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createServer", ApiRequestStatus.START, duration_,request);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.createServer);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_createServer,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createServer,"self:" + ManagementServer.object2ref(this));
try {
controller.createServer(request);
}
@@ -379,8 +396,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createServer", ApiRequestStatus.ERROR, duration_,request);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.createServer, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_createServer, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_createServer,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_createServer, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -395,9 +414,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deleteServer", ApiRequestStatus.START, duration_,projectName,name);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.deleteServer);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_deleteServer,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deleteServer,"self:" + ManagementServer.object2ref(this));
try {
controller.deleteServer(projectName,name);
}
@@ -406,8 +424,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deleteServer", ApiRequestStatus.ERROR, duration_,projectName,name);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.deleteServer, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_deleteServer, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_deleteServer,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_deleteServer, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -422,9 +442,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createKeyPair", ApiRequestStatus.START, duration_,request);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.createKeyPair);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_createKeyPair,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createKeyPair,"self:" + ManagementServer.object2ref(this));
try {
controller.createKeyPair(request);
}
@@ -433,8 +452,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createKeyPair", ApiRequestStatus.ERROR, duration_,request);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.createKeyPair, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_createKeyPair, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_createKeyPair,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_createKeyPair, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -449,9 +470,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "delete", ApiRequestStatus.START, duration_,request);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.delete);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_delete,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_delete,"self:" + ManagementServer.object2ref(this));
try {
controller.delete(request);
}
@@ -460,8 +480,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "delete", ApiRequestStatus.ERROR, duration_,request);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.delete, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_delete, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_delete,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_delete, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -476,9 +498,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createFlavor", ApiRequestStatus.START, duration_,request);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.createFlavor);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_createFlavor,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createFlavor,"self:" + ManagementServer.object2ref(this));
try {
controller.createFlavor(request);
}
@@ -487,8 +508,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createFlavor", ApiRequestStatus.ERROR, duration_,request);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.createFlavor, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_createFlavor, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_createFlavor,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_createFlavor, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -503,9 +526,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createSecurityGroup", ApiRequestStatus.START, duration_,request);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.createSecurityGroup);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_createSecurityGroup,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createSecurityGroup,"self:" + ManagementServer.object2ref(this));
try {
controller.createSecurityGroup(request);
}
@@ -514,8 +536,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createSecurityGroup", ApiRequestStatus.ERROR, duration_,request);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.createSecurityGroup, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_createSecurityGroup, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_createSecurityGroup,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_createSecurityGroup, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -530,9 +554,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "serverAction", ApiRequestStatus.START, duration_,request);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.serverAction);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_serverAction,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_serverAction,"self:" + ManagementServer.object2ref(this));
try {
controller.serverAction(request);
}
@@ -541,8 +564,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "serverAction", ApiRequestStatus.ERROR, duration_,request);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.serverAction, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_serverAction, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_serverAction,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_serverAction, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -557,9 +582,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deployVmType", ApiRequestStatus.START, duration_,vmTypeName,projectName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.deployVmType);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_deployVmType,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deployVmType,"self:" + ManagementServer.object2ref(this));
try {
controller.deployVmType(vmTypeName,projectName);
}
@@ -568,8 +592,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deployVmType", ApiRequestStatus.ERROR, duration_,vmTypeName,projectName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.deployVmType, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_deployVmType, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_deployVmType,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_deployVmType, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -584,9 +610,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "undeployVmType", ApiRequestStatus.START, duration_,vmTypeName,projectName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.undeployVmType);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_undeployVmType,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_undeployVmType,"self:" + ManagementServer.object2ref(this));
try {
controller.undeployVmType(vmTypeName,projectName);
}
@@ -595,8 +620,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "undeployVmType", ApiRequestStatus.ERROR, duration_,vmTypeName,projectName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.undeployVmType, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_undeployVmType, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_undeployVmType,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_undeployVmType, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -611,9 +638,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deployUser", ApiRequestStatus.START, duration_,user,projectName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.deployUser);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_deployUser,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deployUser,"self:" + ManagementServer.object2ref(this));
try {
controller.deployUser(user,projectName);
}
@@ -622,8 +648,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deployUser", ApiRequestStatus.ERROR, duration_,user,projectName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.deployUser, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_deployUser, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_deployUser,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_deployUser, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -638,9 +666,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "undeployUser", ApiRequestStatus.START, duration_,user,projectName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.undeployUser);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_undeployUser,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_undeployUser,"self:" + ManagementServer.object2ref(this));
try {
controller.undeployUser(user,projectName);
}
@@ -649,8 +676,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "undeployUser", ApiRequestStatus.ERROR, duration_,user,projectName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.undeployUser, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_undeployUser, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_undeployUser,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_undeployUser, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -665,9 +694,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createAlarm", ApiRequestStatus.START, duration_,request);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.createAlarm);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_createAlarm,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createAlarm,"self:" + ManagementServer.object2ref(this));
try {
res = controller.createAlarm(request);
}
@@ -676,8 +704,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createAlarm", ApiRequestStatus.ERROR, duration_,request);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.createAlarm, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_createAlarm, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_createAlarm,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_createAlarm, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -692,9 +722,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deleteAlarm", ApiRequestStatus.START, duration_,projectName,name);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.deleteAlarm);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_deleteAlarm,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deleteAlarm,"self:" + ManagementServer.object2ref(this));
try {
controller.deleteAlarm(projectName,name);
}
@@ -703,8 +732,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "deleteAlarm", ApiRequestStatus.ERROR, duration_,projectName,name);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.deleteAlarm, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_deleteAlarm, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_deleteAlarm,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_deleteAlarm, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -719,9 +750,8 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createAlarm", ApiRequestStatus.START, duration_,request);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.createAlarm);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(OpenStackLocationOperationEnum.OpenStackLocation_createAlarm,server,this);
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createAlarm,"self:" + ManagementServer.object2ref(this));
try {
res = controller.createAlarm(request);
}
@@ -730,8 +760,10 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
if (server != null)
server.getServer().recordApi(null, this, "createAlarm", ApiRequestStatus.ERROR, duration_,request);
System.err.println("ERROR: " + e);
- ecomplogger.warn(OpenStackLocationMessageEnum.createAlarm, e.toString());
- throw e;
+ ecomplogger.warn(OpenStackLocationMessageEnum.REQUEST_FAILED_createAlarm, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REQUEST_FAILED_createAlarm,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, OpenStackLocationMessageEnum.REQUEST_FAILED_createAlarm, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -745,10 +777,12 @@ public class OsOpenStackLocation extends OpenStackLocationImpl {
+
+
public static void ecoreSetup() {
OsOpenStackLocationProvider.ecoreSetup();
}
- public OsOpenStackLocationProvider getSomfProvider() {
+ public OsOpenStackLocationProvider getSiriusProvider() {
return controller;
}
}
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/OsOpenStackLocationClient.java b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/OsOpenStackLocationClient.java
index 92bfacc..24e8bee 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/OsOpenStackLocationClient.java
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/OsOpenStackLocationClient.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 OsOpenStackLocationClient extends OpenStackLocationImpl {
OsOpenStackController.ecoreSetup();
client = new GenericHttpClient(file,name);
client.add("/loc", this);
+ client.setVersion("ONAP-R2");
}
public OsOpenStackLocationClient(String file, String name1, String name2) {
HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2);
client = client1.all; // requests should be forwarded to all.
client.add("/loc", this);
+ client.setVersion("ONAP-R2");
}
public OsOpenStackLocationClient(AbstractClient c) {
client = c;
client.add("/resources", this);
+ client.setVersion("ONAP-R2");
}
@Override
public void poll() {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_poll);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_poll,client.getRemote());
try {
client.operationPath("/loc", c, "poll", null);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_poll, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@poll: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_poll, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_poll,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_poll,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -89,16 +95,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void mergeLocation(org.openecomp.ncomp.openstack.location.OpenStackLocation loc) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_mergeLocation);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_mergeLocation,client.getRemote());
try {
client.operationPath("/loc", c, "mergeLocation", null, loc);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_mergeLocation, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@mergeLocation: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_mergeLocation, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_mergeLocation,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_mergeLocation,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -106,16 +113,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public org.openecomp.ncomp.openstack.neutron.Network createNetwork(org.openecomp.ncomp.openstack.neutron.CreateNetworkRequest request) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_createNetwork);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createNetwork,client.getRemote());
org.openecomp.ncomp.openstack.neutron.Network res;
try {
res = (org.openecomp.ncomp.openstack.neutron.Network) client.operationPath("/loc", c, "createNetwork", null, request);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_createNetwork, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@createNetwork: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createNetwork, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createNetwork,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createNetwork,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -123,16 +131,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public org.openecomp.ncomp.openstack.neutron.Subnet createSubnet(org.openecomp.ncomp.openstack.neutron.CreateSubnetRequest request) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_createSubnet);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createSubnet,client.getRemote());
org.openecomp.ncomp.openstack.neutron.Subnet res;
try {
res = (org.openecomp.ncomp.openstack.neutron.Subnet) client.operationPath("/loc", c, "createSubnet", null, request);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_createSubnet, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@createSubnet: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createSubnet, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createSubnet,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createSubnet,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -140,16 +149,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public org.openecomp.ncomp.openstack.neutron.Port createPort(org.openecomp.ncomp.openstack.neutron.CreatePortRequest request) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_createPort);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createPort,client.getRemote());
org.openecomp.ncomp.openstack.neutron.Port res;
try {
res = (org.openecomp.ncomp.openstack.neutron.Port) client.operationPath("/loc", c, "createPort", null, request);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_createPort, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@createPort: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createPort, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createPort,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createPort,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -157,16 +167,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public org.openecomp.ncomp.openstack.neutron.Router createRouter(org.openecomp.ncomp.openstack.neutron.CreateRouterRequest request) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_createRouter);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createRouter,client.getRemote());
org.openecomp.ncomp.openstack.neutron.Router res;
try {
res = (org.openecomp.ncomp.openstack.neutron.Router) client.operationPath("/loc", c, "createRouter", null, request);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_createRouter, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@createRouter: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createRouter, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createRouter,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createRouter,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -174,16 +185,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void deleteNetwork(java.lang.String projectName, java.lang.String name) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_deleteNetwork);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deleteNetwork,client.getRemote());
try {
client.operationPath("/loc", c, "deleteNetwork", null, projectName,name);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_deleteNetwork, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@deleteNetwork: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteNetwork, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteNetwork,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteNetwork,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -191,16 +203,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void deleteSubnet(java.lang.String projectName, java.lang.String name) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_deleteSubnet);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deleteSubnet,client.getRemote());
try {
client.operationPath("/loc", c, "deleteSubnet", null, projectName,name);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_deleteSubnet, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@deleteSubnet: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteSubnet, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteSubnet,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteSubnet,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -208,16 +221,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void deletePort(java.lang.String projectName, java.lang.String name) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_deletePort);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deletePort,client.getRemote());
try {
client.operationPath("/loc", c, "deletePort", null, projectName,name);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_deletePort, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@deletePort: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deletePort, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deletePort,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deletePort,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -225,16 +239,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void deleteRouter(java.lang.String projectName, java.lang.String name) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_deleteRouter);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deleteRouter,client.getRemote());
try {
client.operationPath("/loc", c, "deleteRouter", null, projectName,name);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_deleteRouter, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@deleteRouter: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteRouter, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteRouter,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteRouter,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -242,16 +257,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void associateFloatingIp(java.lang.String projectName, java.lang.String ipId, java.lang.String portId) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_associateFloatingIp);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_associateFloatingIp,client.getRemote());
try {
client.operationPath("/loc", c, "associateFloatingIp", null, projectName,ipId,portId);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_associateFloatingIp, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@associateFloatingIp: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_associateFloatingIp, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_associateFloatingIp,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_associateFloatingIp,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -259,16 +275,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void createServer(org.openecomp.ncomp.openstack.compute.OpenstackRequestNewServer request) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_createServer);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createServer,client.getRemote());
try {
client.operationPath("/loc", c, "createServer", null, request);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_createServer, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@createServer: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createServer, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createServer,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createServer,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -276,16 +293,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void deleteServer(java.lang.String projectName, java.lang.String name) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_deleteServer);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deleteServer,client.getRemote());
try {
client.operationPath("/loc", c, "deleteServer", null, projectName,name);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_deleteServer, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@deleteServer: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteServer, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteServer,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteServer,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -293,16 +311,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void createKeyPair(org.openecomp.ncomp.openstack.compute.OpenstackRequestKeyPair request) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_createKeyPair);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createKeyPair,client.getRemote());
try {
client.operationPath("/loc", c, "createKeyPair", null, request);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_createKeyPair, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@createKeyPair: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createKeyPair, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createKeyPair,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createKeyPair,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -310,16 +329,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void delete(org.openecomp.ncomp.openstack.core.OpenstackRequestDelete request) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_delete);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_delete,client.getRemote());
try {
client.operationPath("/loc", c, "delete", null, request);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_delete, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@delete: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_delete, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_delete,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_delete,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -327,16 +347,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void createFlavor(org.openecomp.ncomp.openstack.compute.OpenstackRequestFlavor request) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_createFlavor);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createFlavor,client.getRemote());
try {
client.operationPath("/loc", c, "createFlavor", null, request);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_createFlavor, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@createFlavor: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createFlavor, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createFlavor,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createFlavor,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -344,16 +365,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void createSecurityGroup(org.openecomp.ncomp.openstack.compute.OpenstackRequestSecurityGroup request) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_createSecurityGroup);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createSecurityGroup,client.getRemote());
try {
client.operationPath("/loc", c, "createSecurityGroup", null, request);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_createSecurityGroup, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@createSecurityGroup: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createSecurityGroup, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createSecurityGroup,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createSecurityGroup,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -361,16 +383,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void serverAction(org.openecomp.ncomp.openstack.compute.OpenstackRequestServerAction request) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_serverAction);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_serverAction,client.getRemote());
try {
client.operationPath("/loc", c, "serverAction", null, request);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_serverAction, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@serverAction: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_serverAction, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_serverAction,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_serverAction,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -378,16 +401,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void deployVmType(java.lang.String vmTypeName, java.lang.String projectName) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_deployVmType);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deployVmType,client.getRemote());
try {
client.operationPath("/loc", c, "deployVmType", null, vmTypeName,projectName);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_deployVmType, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@deployVmType: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deployVmType, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deployVmType,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deployVmType,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -395,16 +419,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void undeployVmType(java.lang.String vmTypeName, java.lang.String projectName) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_undeployVmType);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_undeployVmType,client.getRemote());
try {
client.operationPath("/loc", c, "undeployVmType", null, vmTypeName,projectName);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_undeployVmType, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@undeployVmType: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_undeployVmType, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_undeployVmType,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_undeployVmType,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -412,16 +437,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void deployUser(org.openecomp.ncomp.core.User user, java.lang.String projectName) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_deployUser);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deployUser,client.getRemote());
try {
client.operationPath("/loc", c, "deployUser", null, user,projectName);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_deployUser, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@deployUser: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deployUser, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deployUser,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deployUser,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -429,16 +455,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void undeployUser(org.openecomp.ncomp.core.User user, java.lang.String projectName) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_undeployUser);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_undeployUser,client.getRemote());
try {
client.operationPath("/loc", c, "undeployUser", null, user,projectName);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_undeployUser, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@undeployUser: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_undeployUser, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_undeployUser,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_undeployUser,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -446,16 +473,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public org.openecomp.ncomp.openstack.ceilometer.CeilometerAlarm createAlarm(org.openecomp.ncomp.openstack.ceilometer.CreateAlarmRequest request) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_createAlarm);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createAlarm,client.getRemote());
org.openecomp.ncomp.openstack.ceilometer.CeilometerAlarm res;
try {
res = (org.openecomp.ncomp.openstack.ceilometer.CeilometerAlarm) client.operationPath("/loc", c, "createAlarm", null, request);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_createAlarm, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@createAlarm: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createAlarm, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createAlarm,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createAlarm,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -463,16 +491,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public void deleteAlarm(java.lang.String projectName, java.lang.String name) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_deleteAlarm);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_deleteAlarm,client.getRemote());
try {
client.operationPath("/loc", c, "deleteAlarm", null, projectName,name);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_deleteAlarm, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@deleteAlarm: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteAlarm, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteAlarm,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_deleteAlarm,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -480,16 +509,17 @@ public class OsOpenStackLocationClient extends OpenStackLocationImpl {
@Override
public EList<org.openecomp.ncomp.openstack.ceilometer.CeilometerSample> createAlarm(org.openecomp.ncomp.openstack.ceilometer.SampleRequest request) {
- EClass c = LocationPackage.eINSTANCE.getOpenStackLocation(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(OpenStackLocationOperationEnum.REMOTE_createAlarm);
+ EClass c = LocationPackage.eINSTANCE.getOpenStackLocation();
+ ecomplogger.recordMetricEventStart(OpenStackLocationOperationEnum.OpenStackLocation_createAlarm,client.getRemote());
EList<org.openecomp.ncomp.openstack.ceilometer.CeilometerSample> res;
try {
res = (EList<org.openecomp.ncomp.openstack.ceilometer.CeilometerSample>) client.operationPath("/loc", c, "createAlarm", null, request);
}
catch (Exception e) {
- ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_createAlarm, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@createAlarm: " + e);
+ ecomplogger.warn(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createAlarm, e.toString());
+ EcompException e1 = EcompException.create(OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createAlarm,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,OpenStackLocationMessageEnum.REMOTE_CALL_FAILED_createAlarm,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocation.properties b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocation.properties
index 1329d77..a14de40 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocation.properties
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocation.properties
@@ -1,294 +1,294 @@
dummy=\
- null|\
+ dummy-null|\
null|\
null|\
null
-createNetwork=\
- createNetwork-FAILED-5001W|\
+REQUEST_FAILED_createNetwork=\
+ REQUEST-FAILED-createNetwork-4001W|\
{0}|\
null|\
Operation Failed with Exception
-createSubnet=\
- createSubnet-FAILED-5001W|\
+REQUEST_FAILED_createSubnet=\
+ REQUEST-FAILED-createSubnet-4001W|\
{0}|\
null|\
Operation Failed with Exception
-createPort=\
- createPort-FAILED-5001W|\
+REQUEST_FAILED_createPort=\
+ REQUEST-FAILED-createPort-4001W|\
{0}|\
null|\
Operation Failed with Exception
-createRouter=\
- createRouter-FAILED-5001W|\
+REQUEST_FAILED_createRouter=\
+ REQUEST-FAILED-createRouter-4001W|\
{0}|\
null|\
Operation Failed with Exception
-deleteNetwork=\
- deleteNetwork-FAILED-5001W|\
+REQUEST_FAILED_deleteNetwork=\
+ REQUEST-FAILED-deleteNetwork-4001W|\
{0}|\
null|\
Operation Failed with Exception
-deleteSubnet=\
- deleteSubnet-FAILED-5001W|\
+REQUEST_FAILED_deleteSubnet=\
+ REQUEST-FAILED-deleteSubnet-4001W|\
{0}|\
null|\
Operation Failed with Exception
-deletePort=\
- deletePort-FAILED-5001W|\
+REQUEST_FAILED_deletePort=\
+ REQUEST-FAILED-deletePort-4001W|\
{0}|\
null|\
Operation Failed with Exception
-deleteRouter=\
- deleteRouter-FAILED-5001W|\
+REQUEST_FAILED_deleteRouter=\
+ REQUEST-FAILED-deleteRouter-4001W|\
{0}|\
null|\
Operation Failed with Exception
-associateFloatingIp=\
- associateFloatingIp-FAILED-5001W|\
+REQUEST_FAILED_associateFloatingIp=\
+ REQUEST-FAILED-associateFloatingIp-4001W|\
{0}|\
null|\
Operation Failed with Exception
-createServer=\
- createServer-FAILED-5001W|\
+REQUEST_FAILED_createServer=\
+ REQUEST-FAILED-createServer-4001W|\
{0}|\
null|\
Operation Failed with Exception
-deleteServer=\
- deleteServer-FAILED-5001W|\
+REQUEST_FAILED_deleteServer=\
+ REQUEST-FAILED-deleteServer-4001W|\
{0}|\
null|\
Operation Failed with Exception
-createKeyPair=\
- createKeyPair-FAILED-5001W|\
+REQUEST_FAILED_createKeyPair=\
+ REQUEST-FAILED-createKeyPair-4001W|\
{0}|\
null|\
Operation Failed with Exception
-delete=\
- delete-FAILED-5001W|\
+REQUEST_FAILED_delete=\
+ REQUEST-FAILED-delete-4001W|\
{0}|\
null|\
Operation Failed with Exception
-createFlavor=\
- createFlavor-FAILED-5001W|\
+REQUEST_FAILED_createFlavor=\
+ REQUEST-FAILED-createFlavor-4001W|\
{0}|\
null|\
Operation Failed with Exception
-createSecurityGroup=\
- createSecurityGroup-FAILED-5001W|\
+REQUEST_FAILED_createSecurityGroup=\
+ REQUEST-FAILED-createSecurityGroup-4001W|\
{0}|\
null|\
Operation Failed with Exception
-serverAction=\
- serverAction-FAILED-5001W|\
+REQUEST_FAILED_serverAction=\
+ REQUEST-FAILED-serverAction-4001W|\
{0}|\
null|\
Operation Failed with Exception
-deployVmType=\
- deployVmType-FAILED-5001W|\
+REQUEST_FAILED_deployVmType=\
+ REQUEST-FAILED-deployVmType-4001W|\
{0}|\
null|\
Operation Failed with Exception
-undeployVmType=\
- undeployVmType-FAILED-5001W|\
+REQUEST_FAILED_undeployVmType=\
+ REQUEST-FAILED-undeployVmType-4001W|\
{0}|\
null|\
Operation Failed with Exception
-deployUser=\
- deployUser-FAILED-5001W|\
+REQUEST_FAILED_deployUser=\
+ REQUEST-FAILED-deployUser-4001W|\
{0}|\
null|\
Operation Failed with Exception
-undeployUser=\
- undeployUser-FAILED-5001W|\
+REQUEST_FAILED_undeployUser=\
+ REQUEST-FAILED-undeployUser-4001W|\
{0}|\
null|\
Operation Failed with Exception
-createAlarm=\
- createAlarm-FAILED-5001W|\
+REQUEST_FAILED_createAlarm=\
+ REQUEST-FAILED-createAlarm-4001W|\
{0}|\
null|\
Operation Failed with Exception
-deleteAlarm=\
- deleteAlarm-FAILED-5001W|\
+REQUEST_FAILED_deleteAlarm=\
+ REQUEST-FAILED-deleteAlarm-4001W|\
{0}|\
null|\
Operation Failed with Exception
-poll=\
- poll-FAILED-5001W|\
+REQUEST_FAILED_poll=\
+ REQUEST-FAILED-poll-4001W|\
{0}|\
null|\
Operation Failed with Exception
-mergeLocation=\
- mergeLocation-FAILED-5001W|\
+REQUEST_FAILED_mergeLocation=\
+ REQUEST-FAILED-mergeLocation-4001W|\
{0}|\
null|\
Operation Failed with Exception
-REMOTE_createNetwork=\
- REMOTE-createNetwork-FAILED-5001W|\
+REMOTE_CALL_FAILED_createNetwork=\
+ REMOTE-CALL-FAILED-createNetwork-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_createSubnet=\
- REMOTE-createSubnet-FAILED-5001W|\
+REMOTE_CALL_FAILED_createSubnet=\
+ REMOTE-CALL-FAILED-createSubnet-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_createPort=\
- REMOTE-createPort-FAILED-5001W|\
+REMOTE_CALL_FAILED_createPort=\
+ REMOTE-CALL-FAILED-createPort-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_createRouter=\
- REMOTE-createRouter-FAILED-5001W|\
+REMOTE_CALL_FAILED_createRouter=\
+ REMOTE-CALL-FAILED-createRouter-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_deleteNetwork=\
- REMOTE-deleteNetwork-FAILED-5001W|\
+REMOTE_CALL_FAILED_deleteNetwork=\
+ REMOTE-CALL-FAILED-deleteNetwork-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_deleteSubnet=\
- REMOTE-deleteSubnet-FAILED-5001W|\
+REMOTE_CALL_FAILED_deleteSubnet=\
+ REMOTE-CALL-FAILED-deleteSubnet-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_deletePort=\
- REMOTE-deletePort-FAILED-5001W|\
+REMOTE_CALL_FAILED_deletePort=\
+ REMOTE-CALL-FAILED-deletePort-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_deleteRouter=\
- REMOTE-deleteRouter-FAILED-5001W|\
+REMOTE_CALL_FAILED_deleteRouter=\
+ REMOTE-CALL-FAILED-deleteRouter-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_associateFloatingIp=\
- REMOTE-associateFloatingIp-FAILED-5001W|\
+REMOTE_CALL_FAILED_associateFloatingIp=\
+ REMOTE-CALL-FAILED-associateFloatingIp-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_createServer=\
- REMOTE-createServer-FAILED-5001W|\
+REMOTE_CALL_FAILED_createServer=\
+ REMOTE-CALL-FAILED-createServer-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_deleteServer=\
- REMOTE-deleteServer-FAILED-5001W|\
+REMOTE_CALL_FAILED_deleteServer=\
+ REMOTE-CALL-FAILED-deleteServer-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_createKeyPair=\
- REMOTE-createKeyPair-FAILED-5001W|\
+REMOTE_CALL_FAILED_createKeyPair=\
+ REMOTE-CALL-FAILED-createKeyPair-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_delete=\
- REMOTE-delete-FAILED-5001W|\
+REMOTE_CALL_FAILED_delete=\
+ REMOTE-CALL-FAILED-delete-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_createFlavor=\
- REMOTE-createFlavor-FAILED-5001W|\
+REMOTE_CALL_FAILED_createFlavor=\
+ REMOTE-CALL-FAILED-createFlavor-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_createSecurityGroup=\
- REMOTE-createSecurityGroup-FAILED-5001W|\
+REMOTE_CALL_FAILED_createSecurityGroup=\
+ REMOTE-CALL-FAILED-createSecurityGroup-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_serverAction=\
- REMOTE-serverAction-FAILED-5001W|\
+REMOTE_CALL_FAILED_serverAction=\
+ REMOTE-CALL-FAILED-serverAction-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_deployVmType=\
- REMOTE-deployVmType-FAILED-5001W|\
+REMOTE_CALL_FAILED_deployVmType=\
+ REMOTE-CALL-FAILED-deployVmType-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_undeployVmType=\
- REMOTE-undeployVmType-FAILED-5001W|\
+REMOTE_CALL_FAILED_undeployVmType=\
+ REMOTE-CALL-FAILED-undeployVmType-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_deployUser=\
- REMOTE-deployUser-FAILED-5001W|\
+REMOTE_CALL_FAILED_deployUser=\
+ REMOTE-CALL-FAILED-deployUser-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_undeployUser=\
- REMOTE-undeployUser-FAILED-5001W|\
+REMOTE_CALL_FAILED_undeployUser=\
+ REMOTE-CALL-FAILED-undeployUser-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_createAlarm=\
- REMOTE-createAlarm-FAILED-5001W|\
+REMOTE_CALL_FAILED_createAlarm=\
+ REMOTE-CALL-FAILED-createAlarm-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_deleteAlarm=\
- REMOTE-deleteAlarm-FAILED-5001W|\
+REMOTE_CALL_FAILED_deleteAlarm=\
+ REMOTE-CALL-FAILED-deleteAlarm-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_poll=\
- REMOTE-poll-FAILED-5001W|\
+REMOTE_CALL_FAILED_poll=\
+ REMOTE-CALL-FAILED-poll-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_mergeLocation=\
- REMOTE-mergeLocation-FAILED-5001W|\
+REMOTE_CALL_FAILED_mergeLocation=\
+ REMOTE-CALL-FAILED-mergeLocation-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocationMessageEnum.java b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocationMessageEnum.java
index b0f7851..8c7031f 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocationMessageEnum.java
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocationMessageEnum.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.ncomp.servers.openstack.loc.logging;
import com.att.eelf.i18n.EELFResourceManager;
@@ -28,56 +7,56 @@ import org.openecomp.logger.EcompMessageEnum;
public enum OpenStackLocationMessageEnum implements EcompMessageEnum {
dummy,
- createNetwork,
- createSubnet,
- createPort,
- createRouter,
- deleteNetwork,
- deleteSubnet,
- deletePort,
- deleteRouter,
- associateFloatingIp,
- createServer,
- deleteServer,
- createKeyPair,
- delete,
- createFlavor,
- createSecurityGroup,
- serverAction,
- deployVmType,
- undeployVmType,
- deployUser,
- undeployUser,
- createAlarm,
- deleteAlarm,
- poll,
- mergeLocation,
- REMOTE_createNetwork,
- REMOTE_createSubnet,
- REMOTE_createPort,
- REMOTE_createRouter,
- REMOTE_deleteNetwork,
- REMOTE_deleteSubnet,
- REMOTE_deletePort,
- REMOTE_deleteRouter,
- REMOTE_associateFloatingIp,
- REMOTE_createServer,
- REMOTE_deleteServer,
- REMOTE_createKeyPair,
- REMOTE_delete,
- REMOTE_createFlavor,
- REMOTE_createSecurityGroup,
- REMOTE_serverAction,
- REMOTE_deployVmType,
- REMOTE_undeployVmType,
- REMOTE_deployUser,
- REMOTE_undeployUser,
- REMOTE_createAlarm,
- REMOTE_deleteAlarm,
- REMOTE_poll,
- REMOTE_mergeLocation;
+ REQUEST_FAILED_createNetwork,
+ REQUEST_FAILED_createSubnet,
+ REQUEST_FAILED_createPort,
+ REQUEST_FAILED_createRouter,
+ REQUEST_FAILED_deleteNetwork,
+ REQUEST_FAILED_deleteSubnet,
+ REQUEST_FAILED_deletePort,
+ REQUEST_FAILED_deleteRouter,
+ REQUEST_FAILED_associateFloatingIp,
+ REQUEST_FAILED_createServer,
+ REQUEST_FAILED_deleteServer,
+ REQUEST_FAILED_createKeyPair,
+ REQUEST_FAILED_delete,
+ REQUEST_FAILED_createFlavor,
+ REQUEST_FAILED_createSecurityGroup,
+ REQUEST_FAILED_serverAction,
+ REQUEST_FAILED_deployVmType,
+ REQUEST_FAILED_undeployVmType,
+ REQUEST_FAILED_deployUser,
+ REQUEST_FAILED_undeployUser,
+ REQUEST_FAILED_createAlarm,
+ REQUEST_FAILED_deleteAlarm,
+ REQUEST_FAILED_poll,
+ REQUEST_FAILED_mergeLocation,
+ REMOTE_CALL_FAILED_createNetwork,
+ REMOTE_CALL_FAILED_createSubnet,
+ REMOTE_CALL_FAILED_createPort,
+ REMOTE_CALL_FAILED_createRouter,
+ REMOTE_CALL_FAILED_deleteNetwork,
+ REMOTE_CALL_FAILED_deleteSubnet,
+ REMOTE_CALL_FAILED_deletePort,
+ REMOTE_CALL_FAILED_deleteRouter,
+ REMOTE_CALL_FAILED_associateFloatingIp,
+ REMOTE_CALL_FAILED_createServer,
+ REMOTE_CALL_FAILED_deleteServer,
+ REMOTE_CALL_FAILED_createKeyPair,
+ REMOTE_CALL_FAILED_delete,
+ REMOTE_CALL_FAILED_createFlavor,
+ REMOTE_CALL_FAILED_createSecurityGroup,
+ REMOTE_CALL_FAILED_serverAction,
+ REMOTE_CALL_FAILED_deployVmType,
+ REMOTE_CALL_FAILED_undeployVmType,
+ REMOTE_CALL_FAILED_deployUser,
+ REMOTE_CALL_FAILED_undeployUser,
+ REMOTE_CALL_FAILED_createAlarm,
+ REMOTE_CALL_FAILED_deleteAlarm,
+ REMOTE_CALL_FAILED_poll,
+ REMOTE_CALL_FAILED_mergeLocation;
static {
- EELFResourceManager.loadMessageBundle("org.openecomp.ncomp.servers.openstack.loc.logging.OpenStackLocation");
+ EELFResourceManager.loadMessageBundle("org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocation");
}
}
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocationOperationEnum.java b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocationOperationEnum.java
index 5c37fc3..0b88fa0 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocationOperationEnum.java
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/loc/logging/OpenStackLocationOperationEnum.java
@@ -1,77 +1,45 @@
-/*-
- * ============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.ncomp.servers.openstack.loc.logging;
import org.openecomp.entity.EcompOperationEnum;
public enum OpenStackLocationOperationEnum implements EcompOperationEnum {
- createNetwork,
- createSubnet,
- createPort,
- createRouter,
- deleteNetwork,
- deleteSubnet,
- deletePort,
- deleteRouter,
- associateFloatingIp,
- createServer,
- deleteServer,
- createKeyPair,
- delete,
- createFlavor,
- createSecurityGroup,
- serverAction,
- deployVmType,
- undeployVmType,
- deployUser,
- undeployUser,
- createAlarm,
- deleteAlarm,
- poll,
- mergeLocation,
- REMOTE_createNetwork,
- REMOTE_createSubnet,
- REMOTE_createPort,
- REMOTE_createRouter,
- REMOTE_deleteNetwork,
- REMOTE_deleteSubnet,
- REMOTE_deletePort,
- REMOTE_deleteRouter,
- REMOTE_associateFloatingIp,
- REMOTE_createServer,
- REMOTE_deleteServer,
- REMOTE_createKeyPair,
- REMOTE_delete,
- REMOTE_createFlavor,
- REMOTE_createSecurityGroup,
- REMOTE_serverAction,
- REMOTE_deployVmType,
- REMOTE_undeployVmType,
- REMOTE_deployUser,
- REMOTE_undeployUser,
- REMOTE_createAlarm,
- REMOTE_deleteAlarm,
- REMOTE_poll,
- REMOTE_mergeLocation;
+ OpenStackLocation_createNetwork("OpenStackLocation@createNetwork"),
+ OpenStackLocation_createSubnet("OpenStackLocation@createSubnet"),
+ OpenStackLocation_createPort("OpenStackLocation@createPort"),
+ OpenStackLocation_createRouter("OpenStackLocation@createRouter"),
+ OpenStackLocation_deleteNetwork("OpenStackLocation@deleteNetwork"),
+ OpenStackLocation_deleteSubnet("OpenStackLocation@deleteSubnet"),
+ OpenStackLocation_deletePort("OpenStackLocation@deletePort"),
+ OpenStackLocation_deleteRouter("OpenStackLocation@deleteRouter"),
+ OpenStackLocation_associateFloatingIp("OpenStackLocation@associateFloatingIp"),
+ OpenStackLocation_createServer("OpenStackLocation@createServer"),
+ OpenStackLocation_deleteServer("OpenStackLocation@deleteServer"),
+ OpenStackLocation_createKeyPair("OpenStackLocation@createKeyPair"),
+ OpenStackLocation_delete("OpenStackLocation@delete"),
+ OpenStackLocation_createFlavor("OpenStackLocation@createFlavor"),
+ OpenStackLocation_createSecurityGroup("OpenStackLocation@createSecurityGroup"),
+ OpenStackLocation_serverAction("OpenStackLocation@serverAction"),
+ OpenStackLocation_deployVmType("OpenStackLocation@deployVmType"),
+ OpenStackLocation_undeployVmType("OpenStackLocation@undeployVmType"),
+ OpenStackLocation_deployUser("OpenStackLocation@deployUser"),
+ OpenStackLocation_undeployUser("OpenStackLocation@undeployUser"),
+ OpenStackLocation_createAlarm("OpenStackLocation@createAlarm"),
+ OpenStackLocation_deleteAlarm("OpenStackLocation@deleteAlarm"),
+ OpenStackLocation_poll("OpenStackLocation@poll"),
+ OpenStackLocation_mergeLocation("OpenStackLocation@mergeLocation") ;
+
+
+ private String n;
+
+ private OpenStackLocationOperationEnum(String n) {
+ this.n = n;
+ }
+
+ @Override
+ public String toString() {
+ return n;
+ }
+
}
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptor.properties b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptor.properties
index 47c5487..b0eb8e5 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptor.properties
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptor.properties
@@ -1,6 +1,6 @@
POLLING_FAILED=\
- NCOMP-OPENSTACK-POLLING-FAILED-5001W|\
+ POLLING_FAILED-NCOMP-OPENSTACK-POLLING-FAILED-5001W|\
{0}|\
Verify Openstack setup.|\
Openstack Polling fails.
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptorMessageEnum.java b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptorMessageEnum.java
index e412d6d..6190c89 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptorMessageEnum.java
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptorMessageEnum.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.ncomp.servers.openstack.logging;
import com.att.eelf.i18n.EELFResourceManager;
@@ -30,6 +9,6 @@ public enum OpenStackAdaptorMessageEnum implements EcompMessageEnum {
POLLING_FAILED;
static {
- EELFResourceManager.loadMessageBundle("org.openecomp.ncomp.servers.openstack.logging.OpenStackAdaptor");
+ EELFResourceManager.loadMessageBundle("org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptor");
}
}
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptorOperationEnum.java b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptorOperationEnum.java
index e83d584..c5231bd 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptorOperationEnum.java
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackAdaptorOperationEnum.java
@@ -1,30 +1,22 @@
-/*-
- * ============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.ncomp.servers.openstack.logging;
import org.openecomp.entity.EcompOperationEnum;
public enum OpenStackAdaptorOperationEnum implements EcompOperationEnum {
- POLLING;
+ POLLING("POLLING") ;
+
+
+ private String n;
+
+ private OpenStackAdaptorOperationEnum(String n) {
+ this.n = n;
+ }
+
+ @Override
+ public String toString() {
+ return n;
+ }
+
}
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackController.properties b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackController.properties
index 5825f57..102f6a9 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackController.properties
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackController.properties
@@ -1,18 +1,18 @@
dummy=\
- null|\
+ dummy-null|\
null|\
null|\
null
-uploadOpenstackConfiguration=\
- uploadOpenstackConfiguration-FAILED-5001W|\
+REQUEST_FAILED_uploadOpenstackConfiguration=\
+ REQUEST-FAILED-uploadOpenstackConfiguration-4001W|\
{0}|\
null|\
Operation Failed with Exception
-REMOTE_uploadOpenstackConfiguration=\
- REMOTE-uploadOpenstackConfiguration-FAILED-5001W|\
+REMOTE_CALL_FAILED_uploadOpenstackConfiguration=\
+ REMOTE-CALL-FAILED-uploadOpenstackConfiguration-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackControllerMessageEnum.java b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackControllerMessageEnum.java
index ee93bf2..9e24296 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackControllerMessageEnum.java
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackControllerMessageEnum.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.ncomp.servers.openstack.logging;
import com.att.eelf.i18n.EELFResourceManager;
@@ -28,10 +7,10 @@ import org.openecomp.logger.EcompMessageEnum;
public enum OpenStackControllerMessageEnum implements EcompMessageEnum {
dummy,
- uploadOpenstackConfiguration,
- REMOTE_uploadOpenstackConfiguration;
+ REQUEST_FAILED_uploadOpenstackConfiguration,
+ REMOTE_CALL_FAILED_uploadOpenstackConfiguration;
static {
- EELFResourceManager.loadMessageBundle("org.openecomp.ncomp.servers.openstack.logging.OpenStackController");
+ EELFResourceManager.loadMessageBundle("org/openecomp/ncomp/servers/openstack/logging/OpenStackController");
}
}
diff --git a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackControllerOperationEnum.java b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackControllerOperationEnum.java
index 069aa56..fcb82c8 100644
--- a/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackControllerOperationEnum.java
+++ b/ncomp-openstack-controller/src/main/sirius-gen/org/openecomp/ncomp/servers/openstack/logging/OpenStackControllerOperationEnum.java
@@ -1,31 +1,22 @@
-/*-
- * ============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.ncomp.servers.openstack.logging;
import org.openecomp.entity.EcompOperationEnum;
public enum OpenStackControllerOperationEnum implements EcompOperationEnum {
- uploadOpenstackConfiguration,
- REMOTE_uploadOpenstackConfiguration;
+ OpenStackController_uploadOpenstackConfiguration("OpenStackController@uploadOpenstackConfiguration") ;
+
+
+ private String n;
+
+ private OpenStackControllerOperationEnum(String n) {
+ this.n = n;
+ }
+
+ @Override
+ public String toString() {
+ return n;
+ }
+
}