aboutsummaryrefslogtreecommitdiffstats
path: root/dcae-controller-core
diff options
context:
space:
mode:
Diffstat (limited to 'dcae-controller-core')
-rw-r--r--dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServer.java85
-rw-r--r--dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerPackage.java83
-rw-r--r--dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerImpl.java163
-rw-r--r--dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerPackageImpl.java39
-rw-r--r--dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamAuthentication.java12
-rw-r--r--dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicImpl.java2
-rw-r--r--dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamPackageImpl.java2
-rw-r--r--dcae-controller-core/dcae-controller-core-model/src/main/xcore/server.xcore4
-rw-r--r--dcae-controller-core/dcae-controller-core-utils/.classpath18
-rw-r--r--dcae-controller-core/dcae-controller-core-utils/src/assembly/assemble_zip.xml4
-rw-r--r--dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/fs-init.py15
-rw-r--r--dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup-logrotation.sh47
-rw-r--r--dcae-controller-core/dcae-controller-operation-utils/.classpath2
-rw-r--r--dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--dcae-controller-core/dcae-controller-operation-utils/META-INF/MANIFEST.MF7
-rw-r--r--dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/GenControllerConfiguration.groovy6
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/.classpath2
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/META-INF/MANIFEST.MF15
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/assembly/assemble_zip.xml5
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/server/tools/Generator.java7
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProvider.java37
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProvider.java140
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/resources/DcaeController.yaml23
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-services-from-directory.groovy30
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/verify-controller-state.groovy203
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerCluster.yaml24
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerVirtualMachineService.yaml144
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/DcaePlatformController.yaml144
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/GuiClientApi.yaml72
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerCluster.java34
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterClient.java27
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineService.java144
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceClient.java137
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformController.java148
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerClient.java137
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProviderTemplate.java2
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerServer.java24
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApi.java78
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiClient.java71
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApi.properties50
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiMessageEnum.java47
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiOperationEnum.java52
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerCluster.properties18
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterMessageEnum.java31
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterOperationEnum.java40
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineService.properties98
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceMessageEnum.java71
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceOperationEnum.java70
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeController.properties14
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerMessageEnum.java24
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerOperationEnum.java42
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformController.properties98
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerMessageEnum.java71
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerOperationEnum.java70
54 files changed, 1724 insertions, 1211 deletions
diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServer.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServer.java
index 5c1beb3..13a2d73 100644
--- a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServer.java
+++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/DcaeBasicServer.java
@@ -23,6 +23,7 @@
*/
package org.openecomp.dcae.controller.core.server;
+import org.openecomp.dcae.controller.core.service.HealthTestStatus;
import org.openecomp.ncomp.core.HasOperationalState;
import org.openecomp.ncomp.core.NamedEntity;
import org.openecomp.ncomp.core.logs.LogMessageContainer;
@@ -53,6 +54,9 @@ import org.eclipse.emf.common.util.EList;
* <li>{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHypervisor <em>Hypervisor</em>}</li>
* <li>{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getVmType <em>Vm Type</em>}</li>
* <li>{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getCertificatePassword <em>Certificate Password</em>}</li>
+ * <li>{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getLastHealthTest <em>Last Health Test</em>}</li>
+ * <li>{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHealthTestStatus <em>Health Test Status</em>}</li>
+ * <li>{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHealthTestMessageCode <em>Health Test Message Code</em>}</li>
* </ul>
* </p>
*
@@ -328,4 +332,85 @@ public interface DcaeBasicServer extends NamedEntity, HasOperationalState, LogMe
*/
void setCertificatePassword(String value);
+ /**
+ * Returns the value of the '<em><b>Last Health Test</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Last Health Test</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Last Health Test</em>' attribute.
+ * @see #setLastHealthTest(DateMetricAttribute)
+ * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_LastHealthTest()
+ * @model unique="false" dataType="org.openecomp.ncomp.core.DateMetricAttribute" transient="true"
+ * @generated
+ */
+ DateMetricAttribute getLastHealthTest();
+
+ /**
+ * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getLastHealthTest <em>Last Health Test</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Last Health Test</em>' attribute.
+ * @see #getLastHealthTest()
+ * @generated
+ */
+ void setLastHealthTest(DateMetricAttribute value);
+
+ /**
+ * Returns the value of the '<em><b>Health Test Status</b></em>' attribute.
+ * The literals are from the enumeration {@link org.openecomp.dcae.controller.core.service.HealthTestStatus}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Health Test Status</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Health Test Status</em>' attribute.
+ * @see org.openecomp.dcae.controller.core.service.HealthTestStatus
+ * @see #setHealthTestStatus(HealthTestStatus)
+ * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_HealthTestStatus()
+ * @model unique="false"
+ * @generated
+ */
+ HealthTestStatus getHealthTestStatus();
+
+ /**
+ * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHealthTestStatus <em>Health Test Status</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Health Test Status</em>' attribute.
+ * @see org.openecomp.dcae.controller.core.service.HealthTestStatus
+ * @see #getHealthTestStatus()
+ * @generated
+ */
+ void setHealthTestStatus(HealthTestStatus value);
+
+ /**
+ * Returns the value of the '<em><b>Health Test Message Code</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Health Test Message Code</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Health Test Message Code</em>' attribute.
+ * @see #setHealthTestMessageCode(String)
+ * @see org.openecomp.dcae.controller.core.server.ServerPackage#getDcaeBasicServer_HealthTestMessageCode()
+ * @model unique="false"
+ * @generated
+ */
+ String getHealthTestMessageCode();
+
+ /**
+ * Sets the value of the '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHealthTestMessageCode <em>Health Test Message Code</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Health Test Message Code</em>' attribute.
+ * @see #getHealthTestMessageCode()
+ * @generated
+ */
+ void setHealthTestMessageCode(String value);
+
} // DcaeBasicServer
diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerPackage.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerPackage.java
index 31ca18d..97f8482 100644
--- a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerPackage.java
+++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/ServerPackage.java
@@ -261,13 +261,40 @@ public interface ServerPackage extends EPackage {
int DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 14;
/**
+ * The feature id for the '<em><b>Last Health Test</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DCAE_BASIC_SERVER__LAST_HEALTH_TEST = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 15;
+
+ /**
+ * The feature id for the '<em><b>Health Test Status</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DCAE_BASIC_SERVER__HEALTH_TEST_STATUS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 16;
+
+ /**
+ * The feature id for the '<em><b>Health Test Message Code</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DCAE_BASIC_SERVER__HEALTH_TEST_MESSAGE_CODE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 17;
+
+ /**
* The number of structural features of the '<em>Dcae Basic Server</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int DCAE_BASIC_SERVER_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 15;
+ int DCAE_BASIC_SERVER_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 18;
/**
* The number of operations of the '<em>Dcae Basic Server</em>' class.
@@ -494,6 +521,39 @@ public interface ServerPackage extends EPackage {
EAttribute getDcaeBasicServer_CertificatePassword();
/**
+ * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getLastHealthTest <em>Last Health Test</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Last Health Test</em>'.
+ * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getLastHealthTest()
+ * @see #getDcaeBasicServer()
+ * @generated
+ */
+ EAttribute getDcaeBasicServer_LastHealthTest();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHealthTestStatus <em>Health Test Status</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Health Test Status</em>'.
+ * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHealthTestStatus()
+ * @see #getDcaeBasicServer()
+ * @generated
+ */
+ EAttribute getDcaeBasicServer_HealthTestStatus();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHealthTestMessageCode <em>Health Test Message Code</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Health Test Message Code</em>'.
+ * @see org.openecomp.dcae.controller.core.server.DcaeBasicServer#getHealthTestMessageCode()
+ * @see #getDcaeBasicServer()
+ * @generated
+ */
+ EAttribute getDcaeBasicServer_HealthTestMessageCode();
+
+ /**
* Returns the meta object for class '{@link org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork <em>Dcae Basic Server Network</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -635,6 +695,27 @@ public interface ServerPackage extends EPackage {
*/
EAttribute DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD = eINSTANCE.getDcaeBasicServer_CertificatePassword();
/**
+ * The meta object literal for the '<em><b>Last Health Test</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DCAE_BASIC_SERVER__LAST_HEALTH_TEST = eINSTANCE.getDcaeBasicServer_LastHealthTest();
+ /**
+ * The meta object literal for the '<em><b>Health Test Status</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DCAE_BASIC_SERVER__HEALTH_TEST_STATUS = eINSTANCE.getDcaeBasicServer_HealthTestStatus();
+ /**
+ * The meta object literal for the '<em><b>Health Test Message Code</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DCAE_BASIC_SERVER__HEALTH_TEST_MESSAGE_CODE = eINSTANCE.getDcaeBasicServer_HealthTestMessageCode();
+ /**
* The meta object literal for the '{@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerNetworkImpl <em>Dcae Basic Server Network</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerImpl.java
index 3da755c..515e297 100644
--- a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerImpl.java
+++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/DcaeBasicServerImpl.java
@@ -26,6 +26,7 @@ package org.openecomp.dcae.controller.core.server.impl;
import org.openecomp.dcae.controller.core.server.DcaeBasicServer;
import org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork;
import org.openecomp.dcae.controller.core.server.ServerPackage;
+import org.openecomp.dcae.controller.core.service.HealthTestStatus;
import org.openecomp.ncomp.core.CorePackage;
import org.openecomp.ncomp.core.HasOperationalState;
import org.openecomp.ncomp.core.OperationalState;
@@ -73,6 +74,9 @@ import org.eclipse.emf.ecore.util.InternalEList;
* <li>{@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getHypervisor <em>Hypervisor</em>}</li>
* <li>{@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getVmType <em>Vm Type</em>}</li>
* <li>{@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getCertificatePassword <em>Certificate Password</em>}</li>
+ * <li>{@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getLastHealthTest <em>Last Health Test</em>}</li>
+ * <li>{@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getHealthTestStatus <em>Health Test Status</em>}</li>
+ * <li>{@link org.openecomp.dcae.controller.core.server.impl.DcaeBasicServerImpl#getHealthTestMessageCode <em>Health Test Message Code</em>}</li>
* </ul>
* </p>
*
@@ -290,6 +294,66 @@ public class DcaeBasicServerImpl extends NamedEntityImpl implements DcaeBasicSer
protected String certificatePassword = CERTIFICATE_PASSWORD_EDEFAULT;
/**
+ * The default value of the '{@link #getLastHealthTest() <em>Last Health Test</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLastHealthTest()
+ * @generated
+ * @ordered
+ */
+ protected static final DateMetricAttribute LAST_HEALTH_TEST_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLastHealthTest() <em>Last Health Test</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLastHealthTest()
+ * @generated
+ * @ordered
+ */
+ protected DateMetricAttribute lastHealthTest = LAST_HEALTH_TEST_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getHealthTestStatus() <em>Health Test Status</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHealthTestStatus()
+ * @generated
+ * @ordered
+ */
+ protected static final HealthTestStatus HEALTH_TEST_STATUS_EDEFAULT = HealthTestStatus.GREEN;
+
+ /**
+ * The cached value of the '{@link #getHealthTestStatus() <em>Health Test Status</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHealthTestStatus()
+ * @generated
+ * @ordered
+ */
+ protected HealthTestStatus healthTestStatus = HEALTH_TEST_STATUS_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getHealthTestMessageCode() <em>Health Test Message Code</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHealthTestMessageCode()
+ * @generated
+ * @ordered
+ */
+ protected static final String HEALTH_TEST_MESSAGE_CODE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getHealthTestMessageCode() <em>Health Test Message Code</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHealthTestMessageCode()
+ * @generated
+ * @ordered
+ */
+ protected String healthTestMessageCode = HEALTH_TEST_MESSAGE_CODE_EDEFAULT;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -687,6 +751,69 @@ public class DcaeBasicServerImpl extends NamedEntityImpl implements DcaeBasicSer
* <!-- end-user-doc -->
* @generated
*/
+ public DateMetricAttribute getLastHealthTest() {
+ return lastHealthTest;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLastHealthTest(DateMetricAttribute newLastHealthTest) {
+ DateMetricAttribute oldLastHealthTest = lastHealthTest;
+ lastHealthTest = newLastHealthTest;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__LAST_HEALTH_TEST, oldLastHealthTest, lastHealthTest));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HealthTestStatus getHealthTestStatus() {
+ return healthTestStatus;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHealthTestStatus(HealthTestStatus newHealthTestStatus) {
+ HealthTestStatus oldHealthTestStatus = healthTestStatus;
+ healthTestStatus = newHealthTestStatus == null ? HEALTH_TEST_STATUS_EDEFAULT : newHealthTestStatus;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__HEALTH_TEST_STATUS, oldHealthTestStatus, healthTestStatus));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getHealthTestMessageCode() {
+ return healthTestMessageCode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHealthTestMessageCode(String newHealthTestMessageCode) {
+ String oldHealthTestMessageCode = healthTestMessageCode;
+ healthTestMessageCode = newHealthTestMessageCode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.DCAE_BASIC_SERVER__HEALTH_TEST_MESSAGE_CODE, oldHealthTestMessageCode, healthTestMessageCode));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
@@ -747,6 +874,12 @@ public class DcaeBasicServerImpl extends NamedEntityImpl implements DcaeBasicSer
return basicGetVmType();
case ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD:
return getCertificatePassword();
+ case ServerPackage.DCAE_BASIC_SERVER__LAST_HEALTH_TEST:
+ return getLastHealthTest();
+ case ServerPackage.DCAE_BASIC_SERVER__HEALTH_TEST_STATUS:
+ return getHealthTestStatus();
+ case ServerPackage.DCAE_BASIC_SERVER__HEALTH_TEST_MESSAGE_CODE:
+ return getHealthTestMessageCode();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -809,6 +942,15 @@ public class DcaeBasicServerImpl extends NamedEntityImpl implements DcaeBasicSer
case ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD:
setCertificatePassword((String)newValue);
return;
+ case ServerPackage.DCAE_BASIC_SERVER__LAST_HEALTH_TEST:
+ setLastHealthTest((DateMetricAttribute)newValue);
+ return;
+ case ServerPackage.DCAE_BASIC_SERVER__HEALTH_TEST_STATUS:
+ setHealthTestStatus((HealthTestStatus)newValue);
+ return;
+ case ServerPackage.DCAE_BASIC_SERVER__HEALTH_TEST_MESSAGE_CODE:
+ setHealthTestMessageCode((String)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -866,6 +1008,15 @@ public class DcaeBasicServerImpl extends NamedEntityImpl implements DcaeBasicSer
case ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD:
setCertificatePassword(CERTIFICATE_PASSWORD_EDEFAULT);
return;
+ case ServerPackage.DCAE_BASIC_SERVER__LAST_HEALTH_TEST:
+ setLastHealthTest(LAST_HEALTH_TEST_EDEFAULT);
+ return;
+ case ServerPackage.DCAE_BASIC_SERVER__HEALTH_TEST_STATUS:
+ setHealthTestStatus(HEALTH_TEST_STATUS_EDEFAULT);
+ return;
+ case ServerPackage.DCAE_BASIC_SERVER__HEALTH_TEST_MESSAGE_CODE:
+ setHealthTestMessageCode(HEALTH_TEST_MESSAGE_CODE_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -908,6 +1059,12 @@ public class DcaeBasicServerImpl extends NamedEntityImpl implements DcaeBasicSer
return vmType != null;
case ServerPackage.DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD:
return CERTIFICATE_PASSWORD_EDEFAULT == null ? certificatePassword != null : !CERTIFICATE_PASSWORD_EDEFAULT.equals(certificatePassword);
+ case ServerPackage.DCAE_BASIC_SERVER__LAST_HEALTH_TEST:
+ return LAST_HEALTH_TEST_EDEFAULT == null ? lastHealthTest != null : !LAST_HEALTH_TEST_EDEFAULT.equals(lastHealthTest);
+ case ServerPackage.DCAE_BASIC_SERVER__HEALTH_TEST_STATUS:
+ return healthTestStatus != HEALTH_TEST_STATUS_EDEFAULT;
+ case ServerPackage.DCAE_BASIC_SERVER__HEALTH_TEST_MESSAGE_CODE:
+ return HEALTH_TEST_MESSAGE_CODE_EDEFAULT == null ? healthTestMessageCode != null : !HEALTH_TEST_MESSAGE_CODE_EDEFAULT.equals(healthTestMessageCode);
}
return super.eIsSet(featureID);
}
@@ -982,6 +1139,12 @@ public class DcaeBasicServerImpl extends NamedEntityImpl implements DcaeBasicSer
result.append(usingMonitoringAgent);
result.append(", certificatePassword: ");
result.append(certificatePassword);
+ result.append(", lastHealthTest: ");
+ result.append(lastHealthTest);
+ result.append(", healthTestStatus: ");
+ result.append(healthTestStatus);
+ result.append(", healthTestMessageCode: ");
+ result.append(healthTestMessageCode);
result.append(')');
return result.toString();
}
diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerPackageImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerPackageImpl.java
index 1ed91e4..b524685 100644
--- a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerPackageImpl.java
+++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/server/impl/ServerPackageImpl.java
@@ -27,6 +27,7 @@ import org.openecomp.dcae.controller.core.server.DcaeBasicServer;
import org.openecomp.dcae.controller.core.server.DcaeBasicServerNetwork;
import org.openecomp.dcae.controller.core.server.ServerFactory;
import org.openecomp.dcae.controller.core.server.ServerPackage;
+import org.openecomp.dcae.controller.core.service.ServicePackage;
import org.openecomp.ncomp.core.CorePackage;
import org.openecomp.ncomp.core.logs.LogsPackage;
import org.openecomp.ncomp.openstack.compute.ComputePackage;
@@ -106,9 +107,9 @@ public class ServerPackageImpl extends EPackageImpl implements ServerPackage {
isInited = true;
// Initialize simple dependencies
- CollectdPackage.eINSTANCE.eClass();
+ ServicePackage.eINSTANCE.eClass();
PropertiesPackage.eINSTANCE.eClass();
- LocationPackage.eINSTANCE.eClass();
+ CollectdPackage.eINSTANCE.eClass();
// Create package meta-data objects
theServerPackage.createPackageContents();
@@ -238,6 +239,33 @@ public class ServerPackageImpl extends EPackageImpl implements ServerPackage {
* <!-- end-user-doc -->
* @generated
*/
+ public EAttribute getDcaeBasicServer_LastHealthTest() {
+ return (EAttribute)dcaeBasicServerEClass.getEStructuralFeatures().get(11);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDcaeBasicServer_HealthTestStatus() {
+ return (EAttribute)dcaeBasicServerEClass.getEStructuralFeatures().get(12);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDcaeBasicServer_HealthTestMessageCode() {
+ return (EAttribute)dcaeBasicServerEClass.getEStructuralFeatures().get(13);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getDcaeBasicServerNetwork() {
return dcaeBasicServerNetworkEClass;
}
@@ -300,6 +328,9 @@ public class ServerPackageImpl extends EPackageImpl implements ServerPackage {
createEReference(dcaeBasicServerEClass, DCAE_BASIC_SERVER__HYPERVISOR);
createEReference(dcaeBasicServerEClass, DCAE_BASIC_SERVER__VM_TYPE);
createEAttribute(dcaeBasicServerEClass, DCAE_BASIC_SERVER__CERTIFICATE_PASSWORD);
+ createEAttribute(dcaeBasicServerEClass, DCAE_BASIC_SERVER__LAST_HEALTH_TEST);
+ createEAttribute(dcaeBasicServerEClass, DCAE_BASIC_SERVER__HEALTH_TEST_STATUS);
+ createEAttribute(dcaeBasicServerEClass, DCAE_BASIC_SERVER__HEALTH_TEST_MESSAGE_CODE);
dcaeBasicServerNetworkEClass = createEClass(DCAE_BASIC_SERVER_NETWORK);
createEAttribute(dcaeBasicServerNetworkEClass, DCAE_BASIC_SERVER_NETWORK__IP);
@@ -338,6 +369,7 @@ public class ServerPackageImpl extends EPackageImpl implements ServerPackage {
ComputePackage theComputePackage = (ComputePackage)EPackage.Registry.INSTANCE.getEPackage(ComputePackage.eNS_URI);
LocationPackage theLocationPackage = (LocationPackage)EPackage.Registry.INSTANCE.getEPackage(LocationPackage.eNS_URI);
org.openecomp.ncomp.openstack.core.CorePackage theCorePackage_1 = (org.openecomp.ncomp.openstack.core.CorePackage)EPackage.Registry.INSTANCE.getEPackage(org.openecomp.ncomp.openstack.core.CorePackage.eNS_URI);
+ ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI);
// Create type parameters
@@ -362,6 +394,9 @@ public class ServerPackageImpl extends EPackageImpl implements ServerPackage {
initEReference(getDcaeBasicServer_Hypervisor(), theLocationPackage.getHypervisor(), null, "hypervisor", null, 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getDcaeBasicServer_VmType(), theCorePackage_1.getVirtualMachineType(), null, "vmType", null, 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getDcaeBasicServer_CertificatePassword(), theEcorePackage.getEString(), "certificatePassword", null, 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getDcaeBasicServer_LastHealthTest(), theCorePackage.getDateMetricAttribute(), "lastHealthTest", null, 0, 1, DcaeBasicServer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getDcaeBasicServer_HealthTestStatus(), theServicePackage.getHealthTestStatus(), "healthTestStatus", null, 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getDcaeBasicServer_HealthTestMessageCode(), theEcorePackage.getEString(), "healthTestMessageCode", null, 0, 1, DcaeBasicServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(dcaeBasicServerNetworkEClass, DcaeBasicServerNetwork.class, "DcaeBasicServerNetwork", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getDcaeBasicServerNetwork_Ip(), theEcorePackage.getEString(), "ip", null, 0, 1, DcaeBasicServerNetwork.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamAuthentication.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamAuthentication.java
index f798a33..597fbc9 100644
--- a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamAuthentication.java
+++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/StreamAuthentication.java
@@ -31,7 +31,7 @@ import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Topic Authentication</b></em>',
+ * A representation of the literals of the enumeration '<em><b>Authentication</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.openecomp.dcae.controller.core.stream.StreamPackage#getStreamAuthentication()
@@ -47,7 +47,9 @@ public enum StreamAuthentication implements Enumerator {
* @generated
* @ordered
*/
- AAF(0, "AAF", "aaf"), /**
+ AAF(0, "AAF", "aaf"),
+
+ /**
* The '<em><b>NONE</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -55,7 +57,9 @@ public enum StreamAuthentication implements Enumerator {
* @generated
* @ordered
*/
- NONE(0, "NONE", "none"), /**
+ NONE(0, "NONE", "none"),
+
+ /**
* The '<em><b>PASSWORD</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -247,4 +251,4 @@ public enum StreamAuthentication implements Enumerator {
return literal;
}
-} //TopicAuthentication
+} //StreamAuthentication
diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicImpl.java
index 38eaff3..a5a3fb8 100644
--- a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicImpl.java
+++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/DatabusStreamTopicImpl.java
@@ -25,9 +25,9 @@ package org.openecomp.dcae.controller.core.stream.impl;
import org.openecomp.dcae.controller.core.stream.DatabusStreamTopic;
import org.openecomp.dcae.controller.core.stream.DatabusStreamTopicClient;
+import org.openecomp.dcae.controller.core.stream.StreamAuthentication;
import org.openecomp.dcae.controller.core.stream.StreamPackage;
-import org.openecomp.dcae.controller.core.stream.StreamAuthentication;
import java.util.Collection;
import java.util.Date;
import org.eclipse.emf.common.notify.Notification;
diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamPackageImpl.java b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamPackageImpl.java
index 9523175..a3e6ef7 100644
--- a/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamPackageImpl.java
+++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore-gen/org/openecomp/dcae/controller/core/stream/impl/StreamPackageImpl.java
@@ -45,10 +45,10 @@ import org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriber;
import org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberExternal;
import org.openecomp.dcae.controller.core.stream.DcaeStreamSubscriberInternal;
import org.openecomp.dcae.controller.core.stream.DmaapStream;
+import org.openecomp.dcae.controller.core.stream.StreamAuthentication;
import org.openecomp.dcae.controller.core.stream.StreamFactory;
import org.openecomp.dcae.controller.core.stream.StreamPackage;
-import org.openecomp.dcae.controller.core.stream.StreamAuthentication;
import org.openecomp.ncomp.core.CorePackage;
import org.eclipse.emf.ecore.EAttribute;
diff --git a/dcae-controller-core/dcae-controller-core-model/src/main/xcore/server.xcore b/dcae-controller-core/dcae-controller-core-model/src/main/xcore/server.xcore
index 0cfddf5..05fd0c3 100644
--- a/dcae-controller-core/dcae-controller-core-model/src/main/xcore/server.xcore
+++ b/dcae-controller-core/dcae-controller-core-model/src/main/xcore/server.xcore
@@ -32,6 +32,7 @@ import org.openecomp.ncomp.core.NamedEntity
import org.openecomp.ncomp.openstack.core.VirtualMachineType
import org.openecomp.ncomp.openstack.compute.Server
import org.openecomp.ncomp.openstack.location.Hypervisor
+import org.openecomp.dcae.controller.core.service.HealthTestStatus
class DcaeBasicServer extends NamedEntity, HasOperationalState, LogMessageContainer {
String privateIp
@@ -45,6 +46,9 @@ class DcaeBasicServer extends NamedEntity, HasOperationalState, LogMessageContai
refers Hypervisor hypervisor
refers VirtualMachineType vmType
String certificatePassword
+ transient DateMetricAttribute lastHealthTest
+ HealthTestStatus healthTestStatus
+ String healthTestMessageCode
}
class DcaeBasicServerNetwork extends NamedEntity {
diff --git a/dcae-controller-core/dcae-controller-core-utils/.classpath b/dcae-controller-core/dcae-controller-core-utils/.classpath
index 6d9bfdd..e4af655 100644
--- a/dcae-controller-core/dcae-controller-core-utils/.classpath
+++ b/dcae-controller-core/dcae-controller-core-utils/.classpath
@@ -6,6 +6,17 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="src" path="src/main/server"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<attributes>
@@ -19,13 +30,6 @@
</classpathentry>
<classpathentry kind="src" path="/ncomp-sirius-manager-server"/>
<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 kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/dcae-controller-core/dcae-controller-core-utils/src/assembly/assemble_zip.xml b/dcae-controller-core/dcae-controller-core-utils/src/assembly/assemble_zip.xml
index 09531dc..4bf763b 100644
--- a/dcae-controller-core/dcae-controller-core-utils/src/assembly/assemble_zip.xml
+++ b/dcae-controller-core/dcae-controller-core-utils/src/assembly/assemble_zip.xml
@@ -38,6 +38,7 @@
<directory>src/main/server-gen/bin</directory>
<outputDirectory>bin</outputDirectory>
<fileMode>0744</fileMode>
+ <lineEnding>unix</lineEnding>
<excludes>
</excludes>
</fileSet>
@@ -45,16 +46,19 @@
<directory>src/main/server/bin</directory>
<outputDirectory>bin</outputDirectory>
<fileMode>0744</fileMode>
+ <lineEnding>unix</lineEnding>
<excludes>
</excludes>
</fileSet>
<fileSet>
<directory>src/main/server-gen/scripts</directory>
<outputDirectory>scripts</outputDirectory>
+ <lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<directory>src/main/server/scripts</directory>
<outputDirectory>scripts</outputDirectory>
+ <lineEnding>unix</lineEnding>
</fileSet>
</fileSets>
diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/fs-init.py b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/fs-init.py
index 271f7c9..16a5d59 100644
--- a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/fs-init.py
+++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/fs-init.py
@@ -70,11 +70,15 @@ with open(YamlFile, 'r') as stream:
# Enumerate work
vol = pinfo["volumes"]
+ do_cinder=do_ephem=False
for name in vol.keys():
eph = 'ephemeral' if vol[name]["uuid"] == "ephemeral" else 'cinder'
print "\tVolume %s size %s type %s" % (name, vol[name]["size"], eph)
if( eph == "ephemeral" ):
ephvol = name
+ do_ephem=True
+ else:
+ do_cinder=True
# Parse ephemeral from cloud-init log
if( not os.access(CloudInitLog, os.R_OK) ):
@@ -88,8 +92,8 @@ with open(YamlFile, 'r') as stream:
ephem_found = True
fh.close()
- if( not ephem_found ):
- sys.exit("Error: ephemeral device not found in cloud-init.log");
+ if( do_ephem and not ephem_found ):
+ sys.exit("Error: ephemeral required and device not found in cloud-init.log");
# Read block device info
dev_config=dev_root=cinder_dev=""
@@ -123,6 +127,7 @@ with open(YamlFile, 'r') as stream:
print "\tConfig: %s" % ( dev_config )
print "\tEphemeral: %s" % ( dev_ephem )
print "\tCinder: %s" % ( cinder_dev )
+ print "\tDoEphem? %s DoCinder? %s" % ( do_ephem, do_cinder )
# Handle ephemeral already mounted
if( not os.access("/etc/fstab", os.R_OK) ):
@@ -141,7 +146,7 @@ with open(YamlFile, 'r') as stream:
fh.close()
# Handle ephemeral
- if 'ephvol' in locals() and not DryRun:
+ if do_ephem and not DryRun:
print "Processing ephemeral volume \"%s\"" % ephvol
if( ephem_mounted == True ):
if( os.path.ismount(mp_ephem) ):
@@ -172,10 +177,10 @@ with open(YamlFile, 'r') as stream:
update_fstab(dev_ephem,k)
else:
if( not DryRun ):
- print "No ephemeral disk defined."
+ print "No ephemeral volumes defined."
# Handle cinder volume(s)
- if( not 'cinder_dev' in locals() ):
+ if( do_cinder and not 'cinder_dev' in locals() ):
sys.exit("Error: cinder volume not found")
for name in vol.keys():
diff --git a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup-logrotation.sh b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup-logrotation.sh
index aff11b1..b46f420 100644
--- a/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup-logrotation.sh
+++ b/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup-logrotation.sh
@@ -1,28 +1,23 @@
#!/bin/bash
-APP=$1
-
-LOG1=$(echo $APP | sed s/dcae-//).err
-LOG2=$(echo $APP | sed s/dcae-//).out
-
-cat > | /etc/logrotate.d/$APP << EOF
-
-/opt/app/$APP/logs/$LOG1 {
- missingok
- compress
- daily
- rotate 14
- dateext
- copytruncate
-}
-
-/opt/app/$APP/logs/$LOG2 {
- missingok
- compress
- daily
- rotate 14
- dateext
- copytruncate
-}
-
-EOF \ No newline at end of file
+case $(hostname) in
+ *coll??)
+ /opt/app/dcae-controller-core-utils/bin/controller-setup-logrotation.sh dcae-controller-service-docker-host-manager
+ ;;
+ *tplg??)
+ /opt/app/dcae-controller-core-utils/bin/controller-setup-logrotation.sh dcae-controller-service-common-vm-manager
+ ;;
+ *pstg??)
+ /opt/app/dcae-controller-core-utils/bin/controller-setup-logrotation.sh dcae-controller-service-common-vm-manager
+ ;;
+ *pgda??)
+ /opt/app/dcae-controller-core-utils/bin/controller-setup-logrotation.sh dcae-controller-service-common-vm-manager
+ ;;
+ *cdap??)
+ /opt/app/dcae-controller-core-utils/bin/controller-setup-logrotation.sh dcae-controller-service-cdap-cluster-manager
+ /opt/app/dcae-controller-core-utils/bin/controller-setup-logrotation.sh dcae-controller-service-dmaap-drsub-manager
+ ;;
+ *cont??)
+ /opt/app/dcae-controller-core-utils/bin/controller-setup-logrotation.sh dcae-controller-platform-server
+ ;;
+esac
diff --git a/dcae-controller-core/dcae-controller-operation-utils/.classpath b/dcae-controller-core/dcae-controller-operation-utils/.classpath
index b14f8a5..af62a1c 100644
--- a/dcae-controller-core/dcae-controller-operation-utils/.classpath
+++ b/dcae-controller-core/dcae-controller-operation-utils/.classpath
@@ -12,7 +12,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="src" path="config"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<attributes>
<attribute name="maven.pomderived" value="true"/>
@@ -24,7 +23,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
- <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.core.resources.prefs b/dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/dcae-controller-core/dcae-controller-operation-utils/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/dcae-controller-core/dcae-controller-operation-utils/META-INF/MANIFEST.MF b/dcae-controller-core/dcae-controller-operation-utils/META-INF/MANIFEST.MF
index a0c1ab8..ed5086e 100644
--- a/dcae-controller-core/dcae-controller-operation-utils/META-INF/MANIFEST.MF
+++ b/dcae-controller-core/dcae-controller-operation-utils/META-INF/MANIFEST.MF
@@ -4,9 +4,4 @@ Bundle-Name: dcae-controller-operation-utils
Bundle-SymbolicName: dcae-controller-operation-utils
Bundle-Version: 1.0.0.qualifier
Export-Package: org.openecomp.dcae.controller.operation.utils
-Require-Bundle: dcae-controller-service-vm-model;bundle-version="0.1.0",
- dcae-controller-service-vm-adaptor;bundle-version="0.1.0",
- dcae-controller-platform-model;bundle-version="0.1.0",
- ncomp-sirius-manager-console;bundle-version="0.1.0",
- ncomp-sirius-manager-server;bundle-version="0.1.0",
- dcae-controller-core-model;bundle-version="0.1.0"
+
diff --git a/dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/GenControllerConfiguration.groovy b/dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/GenControllerConfiguration.groovy
index 38f48b0..c007a68 100644
--- a/dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/GenControllerConfiguration.groovy
+++ b/dcae-controller-core/dcae-controller-operation-utils/src/main/java/org/openecomp/dcae/controller/operation/utils/GenControllerConfiguration.groovy
@@ -336,6 +336,12 @@ class GenControllerConfiguration extends DocUtils {
}
save("/databus",[streams : platformConfig.streams2bus()])
save("/cluster",platformConfig.controllerCluster())
+ // version
+ def version = file2object("$release/version.yaml", false)
+ System.err.println "version=$version"
+ if (version != null) {
+ save("/configuration/version",version)
+ }
}
void createLocations() {
diff --git a/dcae-controller-core/dcae-controller-platform-server/.classpath b/dcae-controller-core/dcae-controller-platform-server/.classpath
index 5d4cb9c..a481937 100644
--- a/dcae-controller-core/dcae-controller-platform-server/.classpath
+++ b/dcae-controller-core/dcae-controller-platform-server/.classpath
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="config"/>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
@@ -23,7 +22,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
- <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/dcae-controller-core/dcae-controller-platform-server/META-INF/MANIFEST.MF b/dcae-controller-core/dcae-controller-platform-server/META-INF/MANIFEST.MF
index c8db2b0..e4782f4 100644
--- a/dcae-controller-core/dcae-controller-platform-server/META-INF/MANIFEST.MF
+++ b/dcae-controller-core/dcae-controller-platform-server/META-INF/MANIFEST.MF
@@ -5,17 +5,4 @@ Bundle-SymbolicName: dcae-controller-platform-server
Bundle-Version: 0.1.0.qualifier
Export-Package: org.openecomp.dcae.controller.platform.server.tools,
org.openecomp.dcae.controller.platform.servers.controller
-Require-Bundle: ncomp-core-types,
- ncomp-sirius-manager-model,
- ncomp-sirius-manager-server,
- ncomp-sirius-manager-console,
- ncomp-sirius-manager-generator,
- dcae-controller-platform-model;bundle-version="0.1.0",
- ncomp-utils-java;bundle-version="0.1.0",
- ncomp-openstack-controller;bundle-version="0.1.0",
- ncomp-openstack-model;bundle-version="0.1.0",
- dcae-controller-core-model;bundle-version="0.1.0",
- dcae-controller-service-vm-model,
- operation-utils;bundle-version="0.1.0",
- dcae-controller-service-cdap-model,
- dcae-controller-service-docker-model
+
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/assembly/assemble_zip.xml b/dcae-controller-core/dcae-controller-platform-server/src/assembly/assemble_zip.xml
index 298661d..439d36d 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/assembly/assemble_zip.xml
+++ b/dcae-controller-core/dcae-controller-platform-server/src/assembly/assemble_zip.xml
@@ -38,6 +38,7 @@
<directory>src/main/server-gen/bin</directory>
<outputDirectory>bin</outputDirectory>
<fileMode>0744</fileMode>
+ <lineEnding>unix</lineEnding>
<excludes>
</excludes>
</fileSet>
@@ -45,18 +46,20 @@
<directory>src/main/server/bin</directory>
<outputDirectory>bin</outputDirectory>
<fileMode>0744</fileMode>
+ <lineEnding>unix</lineEnding>
<excludes>
</excludes>
</fileSet>
<fileSet>
<directory>src/main/server-gen/scripts</directory>
<outputDirectory>scripts</outputDirectory>
+ <lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<directory>src/main/server/scripts</directory>
<outputDirectory>scripts</outputDirectory>
+ <lineEnding>unix</lineEnding>
</fileSet>
-
</fileSets>
</assembly>
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/server/tools/Generator.java b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/server/tools/Generator.java
index d9bd272..4cba375 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/server/tools/Generator.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/server/tools/Generator.java
@@ -44,13 +44,14 @@ public class Generator {
String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix();
dir= "src/main/sirius-gen/" + dir.replace('.', '/');
ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel();
- m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates");
+ m.setTemplateDirectory("../../../ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates");
m.setPrefix("Dcae");
m.setPluginName(p.getNsURI());
m.setName("ControllerPlatformServer");
m.setTitle("ControllerPlatformServer");
- ControllerGenerator g = new ControllerGenerator(o,m);
- g.setEnableIRequestHandler(true);
+ ControllerGenerator g = new ControllerGenerator(o,m);
+ g.setVersion("ONAP-R2");
+ g.setEnableIRequestHandler(true);
g.setEnableISiriusPlugin(true);
g.setEnableISwaggerHandler(true);
EObject cluster = ControllerFactory.eINSTANCE.createControllerCluster();
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProvider.java b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProvider.java
index 69644fd..ab1cff1 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProvider.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterProvider.java
@@ -28,36 +28,30 @@ import java.util.Date;
import org.openecomp.ncomp.sirius.manager.GenericHttpClient;
import org.openecomp.ncomp.sirius.manager.ISiriusPlugin;
import org.openecomp.ncomp.sirius.manager.ISiriusServer;
-import org.openecomp.ncomp.sirius.manager.Jetty8Client;
-import org.openecomp.ncomp.sirius.manager.Jetty8ClientOld;
import org.openecomp.ncomp.sirius.manager.ManagementServer;
import org.openecomp.ncomp.sirius.manager.ManagementServerUtils;
import org.openecomp.ncomp.sirius.manager.Subject;
import org.apache.log4j.Logger;
-import org.json.JSONException;
import org.json.JSONObject;
import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider;
+import org.openecomp.ncomp.sirius.manager.logging.NcompLogger;
import org.openecomp.ncomp.sirius.manager.metrics.MetricManager;
import org.openecomp.ncomp.webservice.utils.DateUtils;
import org.openecomp.dcae.controller.core.server.DcaeBasicServer;
-import org.openecomp.dcae.controller.core.service.DcaeService;
import org.openecomp.dcae.controller.platform.controller.ControllerCluster;
import org.openecomp.dcae.controller.platform.controller.ControllerClusterServer;
import org.openecomp.dcae.controller.platform.controller.ControllerClusterServerData;
-import org.openecomp.dcae.controller.platform.controller.DcaePlatformController;
import org.openecomp.dcae.controller.platform.controller.ServerRole;
import org.openecomp.dcae.controller.platform.servers.controller.logging.DcaeControllerMessageEnum;
import org.openecomp.dcae.controller.platform.servers.controller.logging.DcaeControllerOperationEnum;
-import org.openecomp.dcae.controller.service.vm.PhysicalMachine;
import org.openecomp.dcae.controller.service.vm.VirtualMachineService;
import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance;
-import org.openecomp.logger.EcompLogger;
public class DcaeControllerClusterProvider extends BasicAdaptorProvider implements ISiriusPlugin {
private static final Logger logger = Logger.getLogger(DcaeControllerClusterProvider.class);
- static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ static final NcompLogger ecomplogger = NcompLogger.getNcompLogger();
ControllerCluster o;
public DcaeControllerClusterProvider(ISiriusServer controller, ControllerCluster o) {
@@ -122,7 +116,7 @@ public class DcaeControllerClusterProvider extends BasicAdaptorProvider implemen
b = b.replaceFirst("localhost", s.getServer().getNetworks().get(0).getDnsName());
client.setBaseAddress(b);
logger.info("using baseAdress: " + client.getBaseAddress());
- System.out.println("CLUSTER: " + client.getBaseAddress());
+// System.out.println("CLUSTER: " + client.getBaseAddress());
return new DcaeControllerClusterConsole(client);
}
@@ -153,7 +147,7 @@ public class DcaeControllerClusterProvider extends BasicAdaptorProvider implemen
@Override
public void start() {
- System.out.println("CLUSTER: start");
+// System.out.println("CLUSTER: start");
try {
String hostname = InetAddress.getLocalHost().getHostName();
if (hostname.indexOf(".") > 0)
@@ -177,43 +171,44 @@ public class DcaeControllerClusterProvider extends BasicAdaptorProvider implemen
} catch (UnknownHostException e) {
e.printStackTrace();
}
- System.out.println("CLUSTER: start");
+// System.out.println("CLUSTER: start");
Thread t = new Thread("cluster replication") {
@Override
public void run() {
- System.out.println("CLUSTER 2: run");
- ecomplogger.setOperation(DcaeControllerOperationEnum.CLUSTER_DATA_REPLICATION);
+// System.out.println("CLUSTER 2: run");
while (true) {
try {
- System.out.println("CLUSTER 3: run");
+// System.out.println("CLUSTER 3: run");
for (ControllerClusterServer s : o.getServers()) {
if (s.getName().equals(o.getMyServerName()))
o.setRole(s.getRole());
}
controller.getServer().isSlave = o.getRole() == ServerRole.SLAVE;
if (o.getRole() == ServerRole.MASTER) {
- System.out.println("CLUSTER 3: run");
+// System.out.println("CLUSTER 3: run");
+ ecomplogger.setOperation(DcaeControllerOperationEnum.CLUSTER_DATA_REPLICATION);
ecomplogger.newRequestId();
+ ecomplogger.setInstanceId(controller, o);
ecomplogger.recordAuditEventStart();
for (ControllerClusterServer s : o.getServers()) {
- System.out.println("CLUSTER 4: run: " + s.getName() + " " + s.getRole());
+// System.out.println("CLUSTER 4: run: " + s.getName() + " " + s.getRole());
if (s.getRole() != ServerRole.SLAVE)
continue;
if (s.getName().equals(o.getMyServerName()))
continue;
- System.out.println("CLUSTER 5: run");
+// System.out.println("CLUSTER 5: run");
for (ControllerClusterServerData d : s.getData()) {
try {
- System.out.println("CLUSTER 6: run: " + d.getName());
+// System.out.println("CLUSTER 6: run: " + d.getName());
Date last = d.getLastPush() == null ? null : d.getLastPush().last;
long i = DateUtils.stringToDuration(d.getPushInterval());
- System.out.println("CLUSTER 7: run");
+// System.out.println("CLUSTER 7: run");
long now = new Date().getTime();
if (last != null && last.getTime() + i > now)
continue;
- System.out.println("CLUSTER 8: run");
+// System.out.println("CLUSTER 8: run");
o.pushData(s.getName(), d.getName());
- System.out.println("CLUSTER 9: run");
+// System.out.println("CLUSTER 9: run");
} catch (Exception e) {
ecomplogger.warn(DcaeControllerMessageEnum.CLUSTER_DATA_REPLICATION_FAILED,
s.getName());
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProvider.java b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProvider.java
index 7574312..24ce479 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProvider.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/java/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProvider.java
@@ -74,7 +74,7 @@ import org.openecomp.dcae.controller.service.docker.DockerService;
import org.openecomp.dcae.controller.service.docker.DockerServiceInstance;
import org.openecomp.dcae.controller.service.vm.VirtualMachineService;
import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance;
-import org.openecomp.logger.EcompLogger;
+import org.openecomp.logger.StatusCodeEnum;
import org.openecomp.ncomp.core.DeploymentStatus;
import org.openecomp.ncomp.core.NamedEntity;
import org.openecomp.ncomp.sirius.manager.BasicManagementServerProvider;
@@ -84,6 +84,7 @@ import org.openecomp.ncomp.sirius.manager.JavaHttpClient;
import org.openecomp.ncomp.sirius.manager.ManagementServer;
import org.openecomp.ncomp.sirius.manager.ManagementServerUtils;
import org.openecomp.ncomp.sirius.manager.Subject;
+import org.openecomp.ncomp.sirius.manager.logging.NcompLogger;
import org.openecomp.ncomp.sirius.manager.SwaggerUtils;
import org.openecomp.ncomp.utils.CryptoUtils;
import org.openecomp.ncomp.utils.PropertyUtil;
@@ -92,7 +93,7 @@ import org.openecomp.ncomp.webservice.utils.JsonUtils;
public class DcaeDcaePlatformControllerProvider extends BasicManagementServerProvider {
private static final Logger logger = Logger.getLogger(DcaeDcaePlatformControllerProvider.class);
- static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ static final NcompLogger ecomplogger = NcompLogger.getNcompLogger();
DcaePlatformController o;
public DcaeDcaePlatformControllerProvider(ISiriusServer controller, DcaePlatformController o) {
@@ -100,6 +101,11 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
this.o = o;
}
+ public static void ecoreSetup() {
+ // TODO Auto-generated method stub
+
+ }
+
public void start() {
if (o.getCluster() == null) {
DcaeControllerFactory f3 = new DcaeControllerFactory(controller);
@@ -108,11 +114,12 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
Thread t = new Thread("health checks") {
@Override
public void run() {
- ecomplogger.setOperation(DcaeControllerOperationEnum.HEALTHCHECK);
while (true) {
try {
if (!controller.getServer().isSlave) {
+ ecomplogger.setOperation(DcaeControllerOperationEnum.HEALTHCHECK);
ecomplogger.newRequestId();
+ ecomplogger.setInstanceId(controller, o);
ecomplogger.recordAuditEventStart();
for (DcaeService s : o.getServices()) {
try {
@@ -150,15 +157,15 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
} catch (Exception e) {
e.printStackTrace();
}
- ecomplogger.setOperation(DcaeControllerOperationEnum.POLICY_POLLING);
while (true) {
try {
- System.out.println("PPPPPPPPPPP polling start");
switch (o.getCluster().getRole()) {
case MASTER:
case UNKNOWN:
case STANDALONE:
+ ecomplogger.setOperation(DcaeControllerOperationEnum.POLICY_POLLING);
ecomplogger.newRequestId();
+ ecomplogger.setInstanceId(controller, o);
ecomplogger.recordAuditEventStart();
System.out.println("PPPPPPPPPPP polling start");
for (DcaeService s : o.getServices()) {
@@ -205,22 +212,24 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
Thread t3 = new Thread("databus polling") {
@Override
public void run() {
- ecomplogger.setOperation(DcaeControllerOperationEnum.DATABUS_POLLING);
while (true) {
try {
switch (o.getCluster().getRole()) {
case MASTER:
case UNKNOWN:
case STANDALONE:
+ ecomplogger.setOperation(DcaeControllerOperationEnum.DATABUS_POLLING);
ecomplogger.newRequestId();
+ ecomplogger.setInstanceId(controller, o);
ecomplogger.recordAuditEventStart();
try {
updateDatabusInformation();
+ ecomplogger.recordAuditEventEnd();
} catch (Exception e) {
ecomplogger.warn(DcaeControllerMessageEnum.DATABUS_POLLING_FAILED, e.toString());
ManagementServerUtils.printStackTrace(e);
+ ecomplogger.recordAuditEventEnd(StatusCodeEnum.ERROR);
}
- ecomplogger.recordAuditEventEnd();
break;
case SLAVE:
break;
@@ -269,8 +278,6 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
HashMap<DcaeServiceInstance, List<DmaapStream>> inputs = new HashMap<DcaeServiceInstance, List<DmaapStream>>();
HashMap<DcaeServiceInstance, List<DmaapStream>> outputs = new HashMap<DcaeServiceInstance, List<DmaapStream>>();
for (DatabusStream stream : o.getDatabus().getStreams()) {
- // if (!stream.getName().startsWith("local:"))
- // continue;
if (stream instanceof DatabusStreamFeed) {
DatabusStreamFeed feed = (DatabusStreamFeed) stream;
for (DatabusStreamFeedPublisher p : feed.getPublishers()) {
@@ -285,8 +292,6 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
if (stream instanceof DatabusStreamTopic) {
DatabusStreamTopic topic = (DatabusStreamTopic) stream;
for (DatabusStreamTopicClient p : topic.getClients()) {
- // System.err.println("UPDATE: " + p.getName() + " " +
- // p.getTopicURL());
if (p.getAction().contains(DatabusStreamTopicAction.PUB))
addStream(outputs, "message", "publish", p.getName(), p.getLocalStreamId(), p.getUsername(),
p.getUserpwd(), p.getTopicURL(), topic.getAuthenticationMethod().toString());
@@ -301,6 +306,10 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
if (inputs.get(i) == null && outputs.get(i) == null)
continue;
String before = streamsHash(i);
+ List<DcaeStream> in = new ArrayList<DcaeStream>();
+ in.addAll(i.getInputStreams());
+ List<DcaeStream> out = new ArrayList<DcaeStream>();
+ out.addAll(i.getOutputStreams());
i.getInputStreams().clear();
if (inputs.get(i) != null)
i.getInputStreams().addAll(inputs.get(i));
@@ -308,8 +317,25 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
if (outputs.get(i) != null)
i.getOutputStreams().addAll(outputs.get(i));
String after = streamsHash(i);
+ boolean okay = false;
if (i.getStatus() == DeploymentStatus.DEPLOYED && !before.equals(after)) {
- s.pushManagerConfiguration(i.getName());
+ try {
+ s.pushManagerConfiguration(i.getName());
+ okay = true;
+ } catch (Exception e) {
+ logger.warn("Unable to push configuration: " + ManagementServer.object2ref(i));
+ e.printStackTrace();
+ }
+ }
+ else {
+ okay = true;
+ }
+ if (! okay && !before.equals(after)) {
+ // need to restore previous state so next attempt will be made.
+ i.getInputStreams().clear();
+ i.getInputStreams().addAll(in);
+ i.getOutputStreams().clear();
+ i.getOutputStreams().addAll(out);
}
}
}
@@ -349,7 +375,7 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
json2.put("dmaapName", client.props.get("databus.dmaapName"));
json2.put("drProvUrl", client.props.get("databus.drProvUrl"));
json2.put("version", "1");
- json2.put("topicNsRoot", "org.openecomp.dcae.dmaap");
+ json2.put("topicNsRoot", client.props.getProperty("databus.topicNsRoot","org.openecomp.dcae.dmaap"));
json2.put("bridgeAdminTopic", "DCAE_MM_AGENT");
try {
client.httpJsonTransaction("/webapi/dmaap", "PUT", headers, json2);
@@ -384,7 +410,8 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
System.err.println("DATABUS: add dr node: " + server.getName() + " " + time);
}
if (found && i.getStatus() != DeploymentStatus.DEPLOYED) {
- client.httpJsonTransaction("/webapi/dr_nodes/" + server.getName(), "DELETE", headers, null);
+ client.httpJsonTransaction("/webapi/dr_nodes/" + server.getNetworks().get(0).getDnsName(),
+ "DELETE", headers, null);
System.err.println("DATABUS: delete dr node: " + server.getName() + " " + time);
}
}
@@ -417,9 +444,33 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
}
}
}
+ databusCheckConsistency(databus);
}
- private <T extends NamedEntity> T findNamed(EList<? extends T> l, String name) {
+ private void databusCheckConsistency(DcaeDataBus databus) {
+ for (DatabusStream s : databus.getStreams()) {
+ if (s instanceof DatabusStreamFeed) {
+ DatabusStreamFeed feed = (DatabusStreamFeed) s;
+ for (DatabusStreamFeedSubscriber sub : feed.getSubscribers()) {
+ if (!sub.getName().startsWith("forward:"))
+ continue;
+ String forwardStreamName = sub.getName().replace("forward:", "");
+ DatabusStream s2 = findNamed(databus.getStreams(), forwardStreamName);
+ if (!(s2 instanceof DatabusStreamFeed))
+ continue;
+ DatabusStreamFeed feed2 = (DatabusStreamFeed) s2;
+ if (feed2.getPublishURL() == null) continue;
+ if (! feed2.getPublishURL().equals(sub.getDeliveryURL())) {
+ System.err.println("FEED: forward URL wrong: " + feed.getName() + " " + sub.getDeliveryURL()
+ + " != " + feed2.getPublishURL());
+ o.refreshDataBus(feed.getName());
+ }
+ }
+ }
+ }
+ }
+
+ protected <T extends NamedEntity> T findNamed(EList<? extends T> l, String name) {
for (T t : l) {
if (t.getName() != null && t.getName().equals(name))
return t;
@@ -435,8 +486,9 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
return;
String path = "/services/" + a[0];
Subject s = controller.getServer().find(path);
- if (s == null || s.o == null)
+ if (s == null || s.o == null) {
return;
+ }
DcaeService s1 = (DcaeService) s.o;
for (DcaeServiceInstance i : instances(s1)) {
if (!a[1].equals(location(i)))
@@ -648,7 +700,6 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
}
// XX remove static
- @SuppressWarnings("unused")
private void databusAddTopic(DatabusStreamTopic topic) {
if (topic.getTopicName() != null)
return;
@@ -683,7 +734,12 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
headers.put("Content-Type", "application/json");
JSONObject json = ManagementServer.ecore2json(topic, 100, topic.eClass(), true);
if (topic.getFqtn() != null) {
- client.httpJsonTransaction("/webapi/topics/" + topic.getFqtn(), "DELETE", headers, null);
+ try {
+ client.httpJsonTransaction("/webapi/topics/" + topic.getFqtn(), "DELETE", headers, null);
+ }
+ catch (Exception e) {
+ System.err.println("TOPIC0: delete existing topic: " + topicName + " " + e);
+ }
System.err.println("TOPIC0: delete existing topic: " + topicName);
} else
System.err.println("TOPIC0: new topic: " + topicName);
@@ -878,42 +934,41 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
}
HashMap<String, String> headers = new HashMap<String, String>();
JSONObject json = new JSONObject();
- headers.put("ClientAuth", "cHl0aG9uOnRlc3Q=");
- headers.put("Environment", "TEST");
+ headers.put("ClientAuth", client.props.getProperty("policy.clientAuth"));
+ headers.put("Environment", client.props.getProperty("policy.environment"));
JSONObject json2 = new JSONObject();
// json.put("configAttributes", json2);
String uuid = ManagementServer.object2ref(o2).toLowerCase();
- for (Object k : client.props.keySet()) {
- String key = (String) k;
- if (key.startsWith("policy.substitution.")) {
- uuid = uuid.replace(key.substring(20), client.props.getProperty(key));
- }
- }
+ String pName = o2.getPolicyName();
+ String matchPolicyName = pName;
json2.put("uuid", uuid);
- json.put("policyName", ".*");
- JSONObject res = client.httpJsonTransaction("/PyPDPServer/getConfig", "POST", headers, json);
+ json.put("policyName", matchPolicyName);
+ JSONObject res = client.httpJsonTransaction("/getConfig", "POST", headers, json);
System.out.println("PPPPPPPPPPP 0: " + uuid);
JSONArray a = res.getJSONArray("$list");
+ switch (a.length()) {
+ case 0:
+ System.out.println("PPPPPPPPPPP 0 no policies: " + matchPolicyName + " " + uuid);
+ return;
+ case 1: break;
+ default:
+ System.out.println("PPPPPPPPPPP 0 too many policies: " + matchPolicyName + " " + uuid + " " + a.length());
+ return;
+ }
for (int j = 0; j < a.length(); j++) {
JSONObject c1 = a.getJSONObject(j);
-// if (c1.has("matchingConditions") && c1.getJSONObject("matchingConditions").has("ECOMPName")) {
-// if (c1.getJSONObject("matchingConditions").getString("ECOMPName").equals("DCAE"))
-// continue;
-// }
- System.out.println("PPPPPPPPPPP 1: " + c1.toString(2));
JSONObject newConfig;
try {
newConfig = new JSONObject(c1.getString("config"));
} catch (Exception e) {
- System.out.println("PPPPPPPPPPP 1.1: " + c1.toString(2));
+ System.out.println("PPPPPPPPPPP 1: " + c1.toString(2));
continue;
}
System.out.println("PPPPPPPPPPP 2: " + newConfig.toString(2) + " uuid:" + newConfig.get("uuid"));
- if (!uuid.equals(newConfig.getString("uuid").toLowerCase()))
- continue;
+// if (!uuid.equals(newConfig.getString("uuid").toLowerCase()))
+// continue;
JSONObject content = new JSONObject(newConfig.getString("content"));
System.out.println("PPPPPPPPPPP 3: " + content.toString(2));
- content.put("policyName", newConfig.getString("policyName"));
content.put("policyDescription", newConfig.getString("description"));
content.put("policyConfigName", newConfig.getString("configName"));
content.put("policyTemplateVersion", newConfig.getString("templateVersion"));
@@ -926,11 +981,12 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
// System.out.println("PPPPPPPPPPP 4_1: " +
// ManagementServer.ecore2json(oo, 1000, null, true).toString(2));
JSONObject before = cleanJson(o2);
- ManagementServer.merge(o2, oo, null, true, null);
+ ManagementServer.merge(o2, oo, content, true, null);
+ o2.setPolicyName(pName);
JSONObject after = cleanJson(o2);
ManagementServer.ecore2json(o2, 1000, null, true);
if (!before.toString(2).equals(after.toString(2))) {
- System.out.println("PPPPPPPPPPP configuration change 5: " + ManagementServer.object2ref(i));
+ System.out.println("PPPPPPPPPPP configuration change 5: " + ManagementServer.object2ref(i) + " using: " + c1.getString("policyName"));
System.out.println("PPPPPPPPPPP before: " + before.toString(2));
System.out.println("PPPPPPPPPPP after: " + after.toString(2));
s.pushManagerConfiguration(i.getName());
@@ -1059,9 +1115,11 @@ public class DcaeDcaePlatformControllerProvider extends BasicManagementServerPro
}
}
- public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context) {
- System.err.println("XXXXXX handleJson: " + action + " " + resourcePath + " " + context);
+ public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context, String clientVersion) {
+ // System.err.println("XXXXXX handleJson: " + action + " " +
+ // resourcePath + " " + context);
switch ((String) context.get("path")) {
+ case "/test/":
case "/test":
if (o.getCluster().getRole() == ServerRole.MASTER) {
return new JSONObject("{ status: 'OKAY'}");
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/resources/DcaeController.yaml b/dcae-controller-core/dcae-controller-platform-server/src/main/resources/DcaeController.yaml
index 120d5ad..432a2a1 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/resources/DcaeController.yaml
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/resources/DcaeController.yaml
@@ -8,16 +8,16 @@ operations:
CLUSTER_DATA_REPLICATION:
description: Data replication from master to slave controllers.
messages:
- HEALTHCHECK_SERVICE_FAILED:
- errorCode: DCAE-CONTROLLER-HEALTHCHECK-SERVICE-FAILED-5001W
+ HEALTHCHECK-SERVICE-FAILED:
+ errorCode: 5001W
messageFormat: '{0}'
parameters:
service-name:
description: Name of Service for which the health check fails.
resolution: Contact Tier 4. This is a software bug.
description: Heath Check on the service level fails.
- POLICY_POLLING_FAILED:
- errorCode: DCAE-CONTROLLER-POLICY-POLLING-FAILED-5001W
+ POLICY-POLLING-FAILED:
+ errorCode: 5001W
messageFormat: '{0} {1}'
parameters:
object-path:
@@ -26,17 +26,22 @@ messages:
description: Exception that happened.
resolution: Contact Tier 4. This is a software bug.
description: Police Polling on the service level fails.
- DATABUS_POLLING_FAILED:
- errorCode: DCAE-CONTROLLER-DATABUS-POLLING-FAILED-5001W
+ DATABUS-POLLING-FAILED:
+ errorCode: 5001W
messageFormat: '{0}'
parameters:
exception:
description: Exception that happened.
resolution: Contact Tier 4. This is a software bug.
description: Databus Polling on the service level fails.
-
- CLUSTER_DATA_REPLICATION_FAILED:
- errorCode: DCAE-CONTROLLER-CLUSTER_DATA_REPLICATION-FAILED-5001W
+ DATABUS-UNABLE-TO-ADD-STREAM:
+ errorCode: 5001W
+ messageFormat: stream={0} issue={1}
+ resolution: Verify configuration.
+ description: Unable to find service instance for a stream pub/sub.
+
+ CLUSTER-DATA-REPLICATION-FAILED:
+ errorCode: 5001W
messageFormat: '{0}'
parameters:
exception:
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-services-from-directory.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-services-from-directory.groovy
index 845b510..a43de43 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-services-from-directory.groovy
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/sync-services-from-directory.groovy
@@ -49,12 +49,17 @@ org.openecomp.dcae.controller.service.vm.VmPackage.eINSTANCE
m.addFactory(org.openecomp.dcae.controller.service.vm.VmFactory.eINSTANCE)
m.addRuntimeFactories(null)
-def o = m.load(options.directory)
-o = Utils.json2object(Utils.object2json(o))
+try {
+ def o = m.load(options.directory)
+ o = Utils.json2object(Utils.object2json(o))
+ if (options.debug) { println Utils.object2json(o).toString(2) }
+}
+catch (e) {
+ println "load error: $e"
+}
def rootFile = new File("$options.directory/services")
-if (options.debug) { println Utils.object2json(o).toString(2) }
def services = server.list("/services").services
@@ -75,13 +80,18 @@ rootFile.listFiles().each { File f ->
// println "json ${instance.toString(2)}"
instance.put('$nosave',1);
// instance.put('$useNull',1);
- if (instances.contains(iname)) {
- server.update("/services/$sname/instances/$iname",instance)
- println "updating instance $iname"
- } else {
- server.create("/services/$sname/instances/$iname",instance)
- println "creating instance $iname"
- }
+ try {
+ if (instances.contains(iname)) {
+ server.update("/services/$sname/instances/$iname",instance)
+ println "updating instance $sname@$iname"
+ } else {
+ server.create("/services/$sname/instances/$iname",instance)
+ println "creating instance $sname@$iname"
+ }
+ }
+ catch (e) {
+ println "error instance $sname@$iname: $e"
+ }
}
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/verify-controller-state.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/verify-controller-state.groovy
new file mode 100644
index 0000000..a240cbd
--- /dev/null
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/verify-controller-state.groovy
@@ -0,0 +1,203 @@
+
+/*-
+ * ============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============================================
+ */
+
+import org.openecomp.dcae.controller.platform.servers.controller.DcaeDcaePlatformControllerConsole
+import org.openecomp.ncomp.sirius.manager.console.Utils
+import org.json.JSONObject
+import org.openecomp.ncomp.utils.CryptoUtils
+import org.yaml.snakeyaml.Yaml
+import groovy.io.FileType
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.openecomp.ncomp.sirius.manager.JavaHttpClient;
+
+import java.security.*;
+import java.security.cert.Certificate;
+import java.security.cert.X509Certificate;
+import java.security.cert.CertificateException;
+import javax.crypto.SecretKey;
+import javax.security.auth.callback.*;
+import javax.net.ssl.*
+
+
+
+def p(x) {
+ Utils.object2json(x).toString(2)
+}
+
+
+// http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder.html
+def cli = new CliBuilder(usage:'dcae-controller.sh verify-controller-state OPTIONS')
+cli._(longOpt:'debug', args:0, 'Debug')
+cli.v(longOpt:'verbose', args:0, 'Verbose output')
+cli.t(longOpt:'type', args:1, 'Type of verification rsa, certs, config, all')
+
+def options = cli.parse(args)
+
+if (options == null || ! options.type ) {
+ cli.usage()
+ System.exit(1)
+}
+
+
+class A {
+ static def verbose
+ static def server = new DcaeDcaePlatformControllerConsole("console.properties","localhost")
+ static def k = CryptoUtils.getKey("config/server.private")
+ static def checkRsa ( o = server.list("/",1000) , path = "") {
+ //println "o=$o path=$path"
+ switch (o) {
+ case Map:
+ o.each { n , v ->
+ checkRsa(v,"$path/$n")
+ if (v instanceof String && !v.startsWith("rsa:")) {
+ switch ("$path/${n.toLowerCase()}") {
+ case ~/\/openstack\/.*\/metadata\/X\/key/:
+ case ~/\/users\/.*\/publickey/: break
+ case ~/.*password.*/:
+ case ~/.*pwd.*/:
+ case ~/.*cred.*/:
+ case ~/.*secret.*/:
+ case ~/.*key/:
+ println "unencrypted password path=$path/$n ${verbose ? v : ''}"
+ }
+ }
+ }
+ break
+ case List: o.each { v -> checkRsa(v,"$path/X") }; break
+ case String:
+ // println "path=$path o=$o"
+ if (o.startsWith("rsa:")) {
+ try { CryptoUtils.decryptPrivate(k,o.substring(4)) } catch (e) {
+ println "bad encryption path=$path"
+ }
+ }
+ break
+ }
+ }
+ static def file2object(path) {
+ Yaml yaml = new Yaml();
+ String s = new String(Files.readAllBytes(Paths.get(path)), StandardCharsets.UTF_8);
+ return yaml.load(s);
+ }
+ static def recurseFiles(File dir) {
+ def l = []
+ dir.eachFileRecurse (FileType.FILES) { file -> l += file }
+ return l.sort { it }
+ }
+ static def servers() {
+ def servers = []
+ server.listAll("/services/vm-.*/instances/.*/servers/.*/networks/.*").sort{it}.each { p ->
+ def x = server.list(p)
+ if ( x.dnsName == null) return
+ servers += x.dnsName
+ }
+ return servers
+ }
+
+
+ static def checkPKCS12(file, pw) {
+ try {
+ KeyManagerFactory kmf = javax.net.ssl.KeyManagerFactory.getInstance("SunX509");
+ KeyStore keystore = KeyStore.getInstance("PKCS12");
+ char[] password= pw.toCharArray();
+ keystore.load(new FileInputStream(file),password);
+ kmf.init(keystore, password);
+ Enumeration<String> aliases = keystore.aliases();
+ while(aliases.hasMoreElements()){
+ String alias = aliases.nextElement();
+ if(keystore.getCertificate(alias).getType().equals("X.509")){
+ Date expDate = ((X509Certificate) keystore.getCertificate(alias)).getNotAfter();
+ Date fromDate= ((X509Certificate) keystore.getCertificate(alias)).getNotBefore();
+ if (verbose) {
+ println "================== $file ========================"
+ println "Alias: $alias"
+ println("From Date: "+fromDate);
+ println("To Date: "+expDate );
+ keystore.getCertificate(alias).getSubjectAlternativeNames().each { println "SAN: ${it[1]}" }
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+}
+
+
+ static def checkCerts() {
+ def passwords = file2object("config/passwords.yaml")
+ // println passwords
+ server.listAll("/services/vm-.*/instances/.*/servers/.*").each { p ->
+ def x = server.list("$p")
+ def xx = server.list("$p/networks/public")
+ def name = new File(p).name
+ if (passwords[name] == null) {
+ println "server $name has not password defined in config/passwords.yaml"
+ return
+ }
+ try { CryptoUtils.decryptPrivate(k,passwords[name].substring(4)) } catch (e) {
+ println "badly encrypted password for server $name"
+ return
+ }
+ def pw = CryptoUtils.decryptPrivate(k,passwords[name].substring(4))
+ def f = new File("config/${name}.pkcs12")
+ if (! f.exists() ) {
+ println "no certificate file $f"
+ return
+ }
+ checkPKCS12("$f",pw)
+ }
+ }
+
+ static String decryptString(String content) {
+ Pattern p = Pattern.compile("(rsa:[A-Za-z0-9+/]+ *[A-Za-z0-9+/]+ *[A-Za-z0-9+/]+=*)");
+ Matcher m = p.matcher(content);
+ StringBuffer s = new StringBuffer();
+ while (m.find()) {
+ String k = m.group(1);
+ m.appendReplacement(s, JavaHttpClient.decryptPassword(k));
+ }
+ m.appendTail(s);
+ return s.toString();
+ }
+ static def checkConfig() {
+ // verify encryption of files.
+ recurseFiles(new File("config/instances")).each { File f ->
+ try { decryptString(f.text) } catch (e) {
+ println "bad encryption in configuration file $f"
+ }
+ }
+ }
+}
+
+A.verbose = options.verbose
+
+if (options.type == "all" || options.type == "rsa")
+ A.checkRsa()
+
+if (options.type == "all" || options.type == "certs")
+ A.checkCerts()
+
+if (options.type == "all" || options.type == "config")
+ A.checkConfig()
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerCluster.yaml b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerCluster.yaml
index a3d8f3d..8b69050 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerCluster.yaml
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerCluster.yaml
@@ -1,25 +1,21 @@
operations:
- pushData: {}
- receiveData: {}
- REMOTE_pushData:
- decription: Remote call pushData
- REMOTE_receiveData:
- decription: Remote call receiveData
+ ControllerCluster@pushData: {}
+ ControllerCluster@receiveData: {}
messages:
dummy: {}
- pushData:
- errorCode: pushData-FAILED-5001W
+ REQUEST-FAILED-pushData:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- receiveData:
- errorCode: receiveData-FAILED-5001W
+ REQUEST-FAILED-receiveData:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- REMOTE_pushData:
- errorCode: REMOTE-pushData-FAILED-5001W
+ REMOTE-CALL-FAILED-pushData:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_receiveData:
- errorCode: REMOTE-receiveData-FAILED-5001W
+ REMOTE-CALL-FAILED-receiveData:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerVirtualMachineService.yaml b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerVirtualMachineService.yaml
index 6ac8c34..8a7e8eb 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerVirtualMachineService.yaml
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/ControllerVirtualMachineService.yaml
@@ -1,135 +1,111 @@
operations:
- deploy: {}
- undeploy: {}
- test: {}
- suspend: {}
- resume: {}
- pushManagerConfiguration: {}
- pollManagerConfiguration: {}
- managerConfiguration: {}
- managerOperation: {}
- updateConfigurationFromPolicy: {}
- runHealthTests: {}
- updateDeploymentStatus: {}
- REMOTE_deploy:
- decription: Remote call deploy
- REMOTE_undeploy:
- decription: Remote call undeploy
- REMOTE_test:
- decription: Remote call test
- REMOTE_suspend:
- decription: Remote call suspend
- REMOTE_resume:
- decription: Remote call resume
- REMOTE_pushManagerConfiguration:
- decription: Remote call pushManagerConfiguration
- REMOTE_pollManagerConfiguration:
- decription: Remote call pollManagerConfiguration
- REMOTE_managerConfiguration:
- decription: Remote call managerConfiguration
- REMOTE_managerOperation:
- decription: Remote call managerOperation
- REMOTE_updateConfigurationFromPolicy:
- decription: Remote call updateConfigurationFromPolicy
- REMOTE_runHealthTests:
- decription: Remote call runHealthTests
- REMOTE_updateDeploymentStatus:
- decription: Remote call updateDeploymentStatus
+ ControllerVirtualMachineService@deploy: {}
+ ControllerVirtualMachineService@undeploy: {}
+ ControllerVirtualMachineService@test: {}
+ ControllerVirtualMachineService@suspend: {}
+ ControllerVirtualMachineService@resume: {}
+ ControllerVirtualMachineService@pushManagerConfiguration: {}
+ ControllerVirtualMachineService@pollManagerConfiguration: {}
+ ControllerVirtualMachineService@managerConfiguration: {}
+ ControllerVirtualMachineService@managerOperation: {}
+ ControllerVirtualMachineService@updateConfigurationFromPolicy: {}
+ ControllerVirtualMachineService@runHealthTests: {}
+ ControllerVirtualMachineService@updateDeploymentStatus: {}
messages:
dummy: {}
- deploy:
- errorCode: deploy-FAILED-5001W
+ REQUEST-FAILED-deploy:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- undeploy:
- errorCode: undeploy-FAILED-5001W
+ REQUEST-FAILED-undeploy:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- test:
- errorCode: test-FAILED-5001W
+ REQUEST-FAILED-test:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- suspend:
- errorCode: suspend-FAILED-5001W
+ REQUEST-FAILED-suspend:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- resume:
- errorCode: resume-FAILED-5001W
+ REQUEST-FAILED-resume:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- pushManagerConfiguration:
- errorCode: pushManagerConfiguration-FAILED-5001W
+ REQUEST-FAILED-pushManagerConfiguration:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- pollManagerConfiguration:
- errorCode: pollManagerConfiguration-FAILED-5001W
+ REQUEST-FAILED-pollManagerConfiguration:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- managerConfiguration:
- errorCode: managerConfiguration-FAILED-5001W
+ REQUEST-FAILED-managerConfiguration:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- managerOperation:
- errorCode: managerOperation-FAILED-5001W
+ REQUEST-FAILED-managerOperation:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- updateConfigurationFromPolicy:
- errorCode: updateConfigurationFromPolicy-FAILED-5001W
+ REQUEST-FAILED-updateConfigurationFromPolicy:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- runHealthTests:
- errorCode: runHealthTests-FAILED-5001W
+ REQUEST-FAILED-runHealthTests:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- updateDeploymentStatus:
- errorCode: updateDeploymentStatus-FAILED-5001W
+ REQUEST-FAILED-updateDeploymentStatus:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- REMOTE_deploy:
- errorCode: REMOTE-deploy-FAILED-5001W
+ REMOTE-CALL-FAILED-deploy:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_undeploy:
- errorCode: REMOTE-undeploy-FAILED-5001W
+ REMOTE-CALL-FAILED-undeploy:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_test:
- errorCode: REMOTE-test-FAILED-5001W
+ REMOTE-CALL-FAILED-test:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_suspend:
- errorCode: REMOTE-suspend-FAILED-5001W
+ REMOTE-CALL-FAILED-suspend:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_resume:
- errorCode: REMOTE-resume-FAILED-5001W
+ REMOTE-CALL-FAILED-resume:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_pushManagerConfiguration:
- errorCode: REMOTE-pushManagerConfiguration-FAILED-5001W
+ REMOTE-CALL-FAILED-pushManagerConfiguration:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_pollManagerConfiguration:
- errorCode: REMOTE-pollManagerConfiguration-FAILED-5001W
+ REMOTE-CALL-FAILED-pollManagerConfiguration:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_managerConfiguration:
- errorCode: REMOTE-managerConfiguration-FAILED-5001W
+ REMOTE-CALL-FAILED-managerConfiguration:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_managerOperation:
- errorCode: REMOTE-managerOperation-FAILED-5001W
+ REMOTE-CALL-FAILED-managerOperation:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_updateConfigurationFromPolicy:
- errorCode: REMOTE-updateConfigurationFromPolicy-FAILED-5001W
+ REMOTE-CALL-FAILED-updateConfigurationFromPolicy:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_runHealthTests:
- errorCode: REMOTE-runHealthTests-FAILED-5001W
+ REMOTE-CALL-FAILED-runHealthTests:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_updateDeploymentStatus:
- errorCode: REMOTE-updateDeploymentStatus-FAILED-5001W
+ REMOTE-CALL-FAILED-updateDeploymentStatus:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/DcaePlatformController.yaml b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/DcaePlatformController.yaml
index 08497ed..29abd9e 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/DcaePlatformController.yaml
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/DcaePlatformController.yaml
@@ -1,135 +1,111 @@
operations:
- logs: {}
- metrics: {}
- properties: {}
- uploadInfo: {}
- getValues: {}
- getValuesAll: {}
- getMessages: {}
- getRequestLogger: {}
- evaluate: {}
- update: {}
- deployDescriptor: {}
- refreshDataBus: {}
- REMOTE_logs:
- decription: Remote call logs
- REMOTE_metrics:
- decription: Remote call metrics
- REMOTE_properties:
- decription: Remote call properties
- REMOTE_uploadInfo:
- decription: Remote call uploadInfo
- REMOTE_getValues:
- decription: Remote call getValues
- REMOTE_getValuesAll:
- decription: Remote call getValuesAll
- REMOTE_getMessages:
- decription: Remote call getMessages
- REMOTE_getRequestLogger:
- decription: Remote call getRequestLogger
- REMOTE_evaluate:
- decription: Remote call evaluate
- REMOTE_update:
- decription: Remote call update
- REMOTE_deployDescriptor:
- decription: Remote call deployDescriptor
- REMOTE_refreshDataBus:
- decription: Remote call refreshDataBus
+ DcaePlatformController@logs: {}
+ DcaePlatformController@metrics: {}
+ DcaePlatformController@properties: {}
+ DcaePlatformController@uploadInfo: {}
+ DcaePlatformController@getValues: {}
+ DcaePlatformController@getValuesAll: {}
+ DcaePlatformController@getMessages: {}
+ DcaePlatformController@getRequestLogger: {}
+ DcaePlatformController@evaluate: {}
+ DcaePlatformController@update: {}
+ DcaePlatformController@deployDescriptor: {}
+ DcaePlatformController@refreshDataBus: {}
messages:
dummy: {}
- logs:
- errorCode: logs-FAILED-5001W
+ REQUEST-FAILED-logs:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- metrics:
- errorCode: metrics-FAILED-5001W
+ REQUEST-FAILED-metrics:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- properties:
- errorCode: properties-FAILED-5001W
+ REQUEST-FAILED-properties:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- uploadInfo:
- errorCode: uploadInfo-FAILED-5001W
+ REQUEST-FAILED-uploadInfo:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- getValues:
- errorCode: getValues-FAILED-5001W
+ REQUEST-FAILED-getValues:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- getValuesAll:
- errorCode: getValuesAll-FAILED-5001W
+ REQUEST-FAILED-getValuesAll:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- getMessages:
- errorCode: getMessages-FAILED-5001W
+ REQUEST-FAILED-getMessages:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- getRequestLogger:
- errorCode: getRequestLogger-FAILED-5001W
+ REQUEST-FAILED-getRequestLogger:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- evaluate:
- errorCode: evaluate-FAILED-5001W
+ REQUEST-FAILED-evaluate:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- update:
- errorCode: update-FAILED-5001W
+ REQUEST-FAILED-update:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- deployDescriptor:
- errorCode: deployDescriptor-FAILED-5001W
+ REQUEST-FAILED-deployDescriptor:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- refreshDataBus:
- errorCode: refreshDataBus-FAILED-5001W
+ REQUEST-FAILED-refreshDataBus:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- REMOTE_logs:
- errorCode: REMOTE-logs-FAILED-5001W
+ REMOTE-CALL-FAILED-logs:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_metrics:
- errorCode: REMOTE-metrics-FAILED-5001W
+ REMOTE-CALL-FAILED-metrics:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_properties:
- errorCode: REMOTE-properties-FAILED-5001W
+ REMOTE-CALL-FAILED-properties:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_uploadInfo:
- errorCode: REMOTE-uploadInfo-FAILED-5001W
+ REMOTE-CALL-FAILED-uploadInfo:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getValues:
- errorCode: REMOTE-getValues-FAILED-5001W
+ REMOTE-CALL-FAILED-getValues:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getValuesAll:
- errorCode: REMOTE-getValuesAll-FAILED-5001W
+ REMOTE-CALL-FAILED-getValuesAll:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getMessages:
- errorCode: REMOTE-getMessages-FAILED-5001W
+ REMOTE-CALL-FAILED-getMessages:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getRequestLogger:
- errorCode: REMOTE-getRequestLogger-FAILED-5001W
+ REMOTE-CALL-FAILED-getRequestLogger:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_evaluate:
- errorCode: REMOTE-evaluate-FAILED-5001W
+ REMOTE-CALL-FAILED-evaluate:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_update:
- errorCode: REMOTE-update-FAILED-5001W
+ REMOTE-CALL-FAILED-update:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_deployDescriptor:
- errorCode: REMOTE-deployDescriptor-FAILED-5001W
+ REMOTE-CALL-FAILED-deployDescriptor:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_refreshDataBus:
- errorCode: REMOTE-refreshDataBus-FAILED-5001W
+ REMOTE-CALL-FAILED-refreshDataBus:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/GuiClientApi.yaml b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/GuiClientApi.yaml
index bf3d69d..1489339 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/GuiClientApi.yaml
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/GuiClientApi.yaml
@@ -1,69 +1,57 @@
operations:
- getTree: {}
- getObject: {}
- getTimeSerie: {}
- getTable: {}
- getHtml: {}
- getGraph: {}
- REMOTE_getTree:
- decription: Remote call getTree
- REMOTE_getObject:
- decription: Remote call getObject
- REMOTE_getTimeSerie:
- decription: Remote call getTimeSerie
- REMOTE_getTable:
- decription: Remote call getTable
- REMOTE_getHtml:
- decription: Remote call getHtml
- REMOTE_getGraph:
- decription: Remote call getGraph
+ GuiClientApi@getTree: {}
+ GuiClientApi@getObject: {}
+ GuiClientApi@getTimeSerie: {}
+ GuiClientApi@getTable: {}
+ GuiClientApi@getHtml: {}
+ GuiClientApi@getGraph: {}
messages:
dummy: {}
- getTree:
- errorCode: getTree-FAILED-5001W
+ REQUEST-FAILED-getTree:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- getObject:
- errorCode: getObject-FAILED-5001W
+ REQUEST-FAILED-getObject:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- getTimeSerie:
- errorCode: getTimeSerie-FAILED-5001W
+ REQUEST-FAILED-getTimeSerie:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- getTable:
- errorCode: getTable-FAILED-5001W
+ REQUEST-FAILED-getTable:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- getHtml:
- errorCode: getHtml-FAILED-5001W
+ REQUEST-FAILED-getHtml:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- getGraph:
- errorCode: getGraph-FAILED-5001W
+ REQUEST-FAILED-getGraph:
+ errorCode: 4001W
messageFormat: '{0}'
description: Operation Failed with Exception
- REMOTE_getTree:
- errorCode: REMOTE-getTree-FAILED-5001W
+ REMOTE-CALL-FAILED-getTree:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getObject:
- errorCode: REMOTE-getObject-FAILED-5001W
+ REMOTE-CALL-FAILED-getObject:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getTimeSerie:
- errorCode: REMOTE-getTimeSerie-FAILED-5001W
+ REMOTE-CALL-FAILED-getTimeSerie:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getTable:
- errorCode: REMOTE-getTable-FAILED-5001W
+ REMOTE-CALL-FAILED-getTable:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getHtml:
- errorCode: REMOTE-getHtml-FAILED-5001W
+ REMOTE-CALL-FAILED-getHtml:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
- REMOTE_getGraph:
- errorCode: REMOTE-getGraph-FAILED-5001W
+ REMOTE-CALL-FAILED-getGraph:
+ errorCode: 4001W
messageFormat: '{0}'
description: Remote Operation Failed with Exception
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerCluster.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerCluster.java
index 05b41bf..893d909 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerCluster.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerCluster.java
@@ -27,13 +27,13 @@ package org.openecomp.dcae.controller.platform.servers.controller;
-
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;
@@ -41,7 +41,9 @@ 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;
@@ -59,9 +61,9 @@ import org.openecomp.dcae.controller.platform.controller.impl.ControllerClusterI
-public class DcaeControllerCluster extends ControllerClusterImpl implements ISiriusPlugin {
+public class DcaeControllerCluster extends ControllerClusterImpl implements ISiriusProvider, ISiriusPlugin {
public static final Logger logger = Logger.getLogger(DcaeControllerCluster.class);
- static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ static final NcompLogger ecomplogger = NcompLogger.getNcompLogger();
public DcaeControllerClusterProvider controller;
ISiriusServer server;
@@ -76,9 +78,8 @@ public class DcaeControllerCluster extends ControllerClusterImpl implements ISir
if (server != null)
server.getServer().recordApi(null, this, "pushData", ApiRequestStatus.START, duration_,serverName,dataName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerClusterOperationEnum.pushData);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerClusterOperationEnum.ControllerCluster_pushData,server,this);
+ ecomplogger.recordMetricEventStart(ControllerClusterOperationEnum.ControllerCluster_pushData,"self:" + ManagementServer.object2ref(this));
try {
controller.pushData(serverName,dataName);
}
@@ -87,8 +88,10 @@ public class DcaeControllerCluster extends ControllerClusterImpl implements ISir
if (server != null)
server.getServer().recordApi(null, this, "pushData", ApiRequestStatus.ERROR, duration_,serverName,dataName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerClusterMessageEnum.pushData, e.toString());
- throw e;
+ ecomplogger.warn(ControllerClusterMessageEnum.REQUEST_FAILED_pushData, e.toString());
+ EcompException e1 = EcompException.create(ControllerClusterMessageEnum.REQUEST_FAILED_pushData,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerClusterMessageEnum.REQUEST_FAILED_pushData, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -103,9 +106,8 @@ public class DcaeControllerCluster extends ControllerClusterImpl implements ISir
if (server != null)
server.getServer().recordApi(null, this, "receiveData", ApiRequestStatus.START, duration_,serverName,dataName,time,content);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerClusterOperationEnum.receiveData);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerClusterOperationEnum.ControllerCluster_receiveData,server,this);
+ ecomplogger.recordMetricEventStart(ControllerClusterOperationEnum.ControllerCluster_receiveData,"self:" + ManagementServer.object2ref(this));
try {
controller.receiveData(serverName,dataName,time,content);
}
@@ -114,8 +116,10 @@ public class DcaeControllerCluster extends ControllerClusterImpl implements ISir
if (server != null)
server.getServer().recordApi(null, this, "receiveData", ApiRequestStatus.ERROR, duration_,serverName,dataName,time,content);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerClusterMessageEnum.receiveData, e.toString());
- throw e;
+ ecomplogger.warn(ControllerClusterMessageEnum.REQUEST_FAILED_receiveData, e.toString());
+ EcompException e1 = EcompException.create(ControllerClusterMessageEnum.REQUEST_FAILED_receiveData,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerClusterMessageEnum.REQUEST_FAILED_receiveData, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -139,7 +143,7 @@ public class DcaeControllerCluster extends ControllerClusterImpl implements ISir
public static void ecoreSetup() {
DcaeControllerClusterProvider.ecoreSetup();
}
- public DcaeControllerClusterProvider getSomfProvider() {
+ public DcaeControllerClusterProvider getSiriusProvider() {
return controller;
}
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterClient.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterClient.java
index a274556..4b710a0 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterClient.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerClusterClient.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 DcaeControllerClusterClient extends ControllerClusterImpl {
DcaeDcaePlatformController.ecoreSetup();
client = new GenericHttpClient(file,name);
client.add("/cluster", this);
+ client.setVersion("ONAP-R2");
}
public DcaeControllerClusterClient(String file, String name1, String name2) {
HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2);
client = client1.all; // requests should be forwarded to all.
client.add("/cluster", this);
+ client.setVersion("ONAP-R2");
}
public DcaeControllerClusterClient(AbstractClient c) {
client = c;
client.add("/resources", this);
+ client.setVersion("ONAP-R2");
}
public void pushData(String path, java.lang.String serverName, java.lang.String dataName) {
- EClass c = ControllerPackage.eINSTANCE.getControllerCluster(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerClusterOperationEnum.REMOTE_pushData);
+ EClass c = ControllerPackage.eINSTANCE.getControllerCluster();
+ ecomplogger.recordMetricEventStart(ControllerClusterOperationEnum.ControllerCluster_pushData,client.getRemote());
try {
client.operationPath(path, c, "pushData", null, serverName,dataName);
}
catch (Exception e) {
- ecomplogger.warn(ControllerClusterMessageEnum.REMOTE_pushData, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@pushData: " + e);
+ ecomplogger.warn(ControllerClusterMessageEnum.REMOTE_CALL_FAILED_pushData, e.toString());
+ EcompException e1 = EcompException.create(ControllerClusterMessageEnum.REMOTE_CALL_FAILED_pushData,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerClusterMessageEnum.REMOTE_CALL_FAILED_pushData,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -89,16 +95,17 @@ public class DcaeControllerClusterClient extends ControllerClusterImpl {
public void receiveData(String path, java.lang.String serverName, java.lang.String dataName, java.util.Date time, java.lang.String content) {
- EClass c = ControllerPackage.eINSTANCE.getControllerCluster(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerClusterOperationEnum.REMOTE_receiveData);
+ EClass c = ControllerPackage.eINSTANCE.getControllerCluster();
+ ecomplogger.recordMetricEventStart(ControllerClusterOperationEnum.ControllerCluster_receiveData,client.getRemote());
try {
client.operationPath(path, c, "receiveData", null, serverName,dataName,time,content);
}
catch (Exception e) {
- ecomplogger.warn(ControllerClusterMessageEnum.REMOTE_receiveData, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@receiveData: " + e);
+ ecomplogger.warn(ControllerClusterMessageEnum.REMOTE_CALL_FAILED_receiveData, e.toString());
+ EcompException e1 = EcompException.create(ControllerClusterMessageEnum.REMOTE_CALL_FAILED_receiveData,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerClusterMessageEnum.REMOTE_CALL_FAILED_receiveData,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineService.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineService.java
index f83bac3..a44f9bd 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineService.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineService.java
@@ -27,13 +27,13 @@ package org.openecomp.dcae.controller.platform.servers.controller;
-
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;
@@ -41,7 +41,9 @@ 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;
@@ -59,9 +61,9 @@ import org.openecomp.dcae.controller.platform.controller.impl.ControllerVirtualM
-public class DcaeControllerVirtualMachineService extends ControllerVirtualMachineServiceImpl implements ISiriusPlugin {
+public class DcaeControllerVirtualMachineService extends ControllerVirtualMachineServiceImpl implements ISiriusProvider, ISiriusPlugin {
public static final Logger logger = Logger.getLogger(DcaeControllerVirtualMachineService.class);
- static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ static final NcompLogger ecomplogger = NcompLogger.getNcompLogger();
public DcaeControllerVirtualMachineServiceProvider controller;
ISiriusServer server;
@@ -76,9 +78,8 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.START, duration_,instanceName,containerPath);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.deploy);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_deploy,server,this);
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_deploy,"self:" + ManagementServer.object2ref(this));
try {
controller.deploy(instanceName,containerPath);
}
@@ -87,8 +88,10 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "deploy", ApiRequestStatus.ERROR, duration_,instanceName,containerPath);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.deploy, e.toString());
- throw e;
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_deploy, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_deploy,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_deploy, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -103,9 +106,8 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.undeploy);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_undeploy,server,this);
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_undeploy,"self:" + ManagementServer.object2ref(this));
try {
controller.undeploy(instanceName);
}
@@ -114,8 +116,10 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "undeploy", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.undeploy, e.toString());
- throw e;
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_undeploy, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_undeploy,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_undeploy, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -130,9 +134,8 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "test", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.test);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_test,server,this);
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_test,"self:" + ManagementServer.object2ref(this));
try {
res = controller.test(instanceName);
}
@@ -141,8 +144,10 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "test", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.test, e.toString());
- throw e;
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_test, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_test,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_test, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -157,9 +162,8 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.suspend);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_suspend,server,this);
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_suspend,"self:" + ManagementServer.object2ref(this));
try {
controller.suspend(instanceName);
}
@@ -168,8 +172,10 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "suspend", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.suspend, e.toString());
- throw e;
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_suspend, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_suspend,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_suspend, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -184,9 +190,8 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "resume", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.resume);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_resume,server,this);
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_resume,"self:" + ManagementServer.object2ref(this));
try {
controller.resume(instanceName);
}
@@ -195,8 +200,10 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "resume", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.resume, e.toString());
- throw e;
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_resume, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_resume,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_resume, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -211,9 +218,8 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.pushManagerConfiguration);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_pushManagerConfiguration,server,this);
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_pushManagerConfiguration,"self:" + ManagementServer.object2ref(this));
try {
controller.pushManagerConfiguration(instanceName);
}
@@ -222,8 +228,10 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "pushManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.pushManagerConfiguration, e.toString());
- throw e;
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_pushManagerConfiguration, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_pushManagerConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_pushManagerConfiguration, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -238,9 +246,8 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.pollManagerConfiguration);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_pollManagerConfiguration,server,this);
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_pollManagerConfiguration,"self:" + ManagementServer.object2ref(this));
try {
controller.pollManagerConfiguration(instanceName);
}
@@ -249,8 +256,10 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "pollManagerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.pollManagerConfiguration, e.toString());
- throw e;
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_pollManagerConfiguration, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_pollManagerConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_pollManagerConfiguration, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -265,9 +274,8 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.managerConfiguration);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_managerConfiguration,server,this);
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_managerConfiguration,"self:" + ManagementServer.object2ref(this));
try {
res = controller.managerConfiguration(instanceName);
}
@@ -276,8 +284,10 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "managerConfiguration", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.managerConfiguration, e.toString());
- throw e;
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_managerConfiguration, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_managerConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_managerConfiguration, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -292,9 +302,8 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.START, duration_,instanceName,operation,parameters);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.managerOperation);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_managerOperation,server,this);
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_managerOperation,"self:" + ManagementServer.object2ref(this));
try {
res = controller.managerOperation(instanceName,operation,parameters);
}
@@ -303,8 +312,10 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "managerOperation", ApiRequestStatus.ERROR, duration_,instanceName,operation,parameters);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.managerOperation, e.toString());
- throw e;
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_managerOperation, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_managerOperation,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_managerOperation, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -319,9 +330,8 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.START, duration_,instanceName);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.updateConfigurationFromPolicy);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_updateConfigurationFromPolicy,server,this);
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_updateConfigurationFromPolicy,"self:" + ManagementServer.object2ref(this));
try {
controller.updateConfigurationFromPolicy(instanceName);
}
@@ -330,8 +340,10 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "updateConfigurationFromPolicy", ApiRequestStatus.ERROR, duration_,instanceName);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.updateConfigurationFromPolicy, e.toString());
- throw e;
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_updateConfigurationFromPolicy, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_updateConfigurationFromPolicy,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_updateConfigurationFromPolicy, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -346,9 +358,8 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.START, duration_);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.runHealthTests);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_runHealthTests,server,this);
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_runHealthTests,"self:" + ManagementServer.object2ref(this));
try {
controller.runHealthTests();
}
@@ -357,8 +368,10 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "runHealthTests", ApiRequestStatus.ERROR, duration_);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.runHealthTests, e.toString());
- throw e;
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_runHealthTests, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_runHealthTests,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_runHealthTests, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -373,9 +386,8 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.START, duration_);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.updateDeploymentStatus);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_updateDeploymentStatus,server,this);
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_updateDeploymentStatus,"self:" + ManagementServer.object2ref(this));
try {
controller.updateDeploymentStatus();
}
@@ -384,8 +396,10 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
if (server != null)
server.getServer().recordApi(null, this, "updateDeploymentStatus", ApiRequestStatus.ERROR, duration_);
System.err.println("ERROR: " + e);
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.updateDeploymentStatus, e.toString());
- throw e;
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_updateDeploymentStatus, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_updateDeploymentStatus,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, ControllerVirtualMachineServiceMessageEnum.REQUEST_FAILED_updateDeploymentStatus, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -409,7 +423,7 @@ public class DcaeControllerVirtualMachineService extends ControllerVirtualMachin
public static void ecoreSetup() {
DcaeControllerVirtualMachineServiceProvider.ecoreSetup();
}
- public DcaeControllerVirtualMachineServiceProvider getSomfProvider() {
+ public DcaeControllerVirtualMachineServiceProvider getSiriusProvider() {
return controller;
}
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceClient.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceClient.java
index 09d2371..ea64327 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceClient.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeControllerVirtualMachineServiceClient.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 DcaeControllerVirtualMachineServiceClient extends ControllerVirtual
DcaeDcaePlatformController.ecoreSetup();
client = new GenericHttpClient(file,name);
client.add("/cont", this);
+ client.setVersion("ONAP-R2");
}
public DcaeControllerVirtualMachineServiceClient(String file, String name1, String name2) {
HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2);
client = client1.all; // requests should be forwarded to all.
client.add("/cont", this);
+ client.setVersion("ONAP-R2");
}
public DcaeControllerVirtualMachineServiceClient(AbstractClient c) {
client = c;
client.add("/resources", this);
+ client.setVersion("ONAP-R2");
}
public void deploy(String path, java.lang.String instanceName, java.lang.String containerPath) {
- EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_deploy);
+ EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService();
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_deploy,client.getRemote());
try {
client.operationPath(path, c, "deploy", null, instanceName,containerPath);
}
catch (Exception e) {
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_deploy, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@deploy: " + e);
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_deploy, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_deploy,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_deploy,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -89,16 +95,17 @@ public class DcaeControllerVirtualMachineServiceClient extends ControllerVirtual
public void undeploy(String path, java.lang.String instanceName) {
- EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_undeploy);
+ EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService();
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_undeploy,client.getRemote());
try {
client.operationPath(path, c, "undeploy", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_undeploy, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@undeploy: " + e);
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_undeploy, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_undeploy,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_undeploy,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -106,16 +113,17 @@ public class DcaeControllerVirtualMachineServiceClient extends ControllerVirtual
public org.openecomp.dcae.controller.core.service.HealthTestResponse test(String path, java.lang.String instanceName) {
- EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_test);
+ EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService();
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_test,client.getRemote());
org.openecomp.dcae.controller.core.service.HealthTestResponse res;
try {
res = (org.openecomp.dcae.controller.core.service.HealthTestResponse) client.operationPath(path, c, "test", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_test, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@test: " + e);
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_test, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_test,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_test,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -123,16 +131,17 @@ public class DcaeControllerVirtualMachineServiceClient extends ControllerVirtual
public void suspend(String path, java.lang.String instanceName) {
- EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_suspend);
+ EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService();
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_suspend,client.getRemote());
try {
client.operationPath(path, c, "suspend", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_suspend, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@suspend: " + e);
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_suspend, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_suspend,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_suspend,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -140,16 +149,17 @@ public class DcaeControllerVirtualMachineServiceClient extends ControllerVirtual
public void resume(String path, java.lang.String instanceName) {
- EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_resume);
+ EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService();
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_resume,client.getRemote());
try {
client.operationPath(path, c, "resume", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_resume, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@resume: " + e);
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_resume, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_resume,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_resume,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -157,16 +167,17 @@ public class DcaeControllerVirtualMachineServiceClient extends ControllerVirtual
public void pushManagerConfiguration(String path, java.lang.String instanceName) {
- EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_pushManagerConfiguration);
+ EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService();
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_pushManagerConfiguration,client.getRemote());
try {
client.operationPath(path, c, "pushManagerConfiguration", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_pushManagerConfiguration, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@pushManagerConfiguration: " + e);
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_pushManagerConfiguration, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_pushManagerConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_pushManagerConfiguration,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -174,16 +185,17 @@ public class DcaeControllerVirtualMachineServiceClient extends ControllerVirtual
public void pollManagerConfiguration(String path, java.lang.String instanceName) {
- EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_pollManagerConfiguration);
+ EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService();
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_pollManagerConfiguration,client.getRemote());
try {
client.operationPath(path, c, "pollManagerConfiguration", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_pollManagerConfiguration, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@pollManagerConfiguration: " + e);
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_pollManagerConfiguration, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_pollManagerConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_pollManagerConfiguration,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -191,16 +203,17 @@ public class DcaeControllerVirtualMachineServiceClient extends ControllerVirtual
public org.eclipse.emf.ecore.EObject managerConfiguration(String path, java.lang.String instanceName) {
- EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_managerConfiguration);
+ EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService();
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_managerConfiguration,client.getRemote());
org.eclipse.emf.ecore.EObject res;
try {
res = (org.eclipse.emf.ecore.EObject) client.operationPath(path, c, "managerConfiguration", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_managerConfiguration, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerConfiguration: " + e);
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_managerConfiguration, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_managerConfiguration,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_managerConfiguration,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -208,16 +221,17 @@ public class DcaeControllerVirtualMachineServiceClient extends ControllerVirtual
public org.json.JSONObject managerOperation(String path, java.lang.String instanceName, java.lang.String operation, org.json.JSONObject parameters) {
- EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_managerOperation);
+ EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService();
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_managerOperation,client.getRemote());
org.json.JSONObject res;
try {
res = (org.json.JSONObject) client.operationPath(path, c, "managerOperation", null, instanceName,operation,parameters);
}
catch (Exception e) {
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_managerOperation, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@managerOperation: " + e);
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_managerOperation, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_managerOperation,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_managerOperation,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -225,16 +239,17 @@ public class DcaeControllerVirtualMachineServiceClient extends ControllerVirtual
public void updateConfigurationFromPolicy(String path, java.lang.String instanceName) {
- EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_updateConfigurationFromPolicy);
+ EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService();
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_updateConfigurationFromPolicy,client.getRemote());
try {
client.operationPath(path, c, "updateConfigurationFromPolicy", null, instanceName);
}
catch (Exception e) {
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_updateConfigurationFromPolicy, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateConfigurationFromPolicy: " + e);
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_updateConfigurationFromPolicy, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_updateConfigurationFromPolicy,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_updateConfigurationFromPolicy,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -242,16 +257,17 @@ public class DcaeControllerVirtualMachineServiceClient extends ControllerVirtual
public void runHealthTests(String path) {
- EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_runHealthTests);
+ EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService();
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_runHealthTests,client.getRemote());
try {
client.operationPath(path, c, "runHealthTests", null);
}
catch (Exception e) {
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_runHealthTests, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@runHealthTests: " + e);
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_runHealthTests, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_runHealthTests,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_runHealthTests,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -259,16 +275,17 @@ public class DcaeControllerVirtualMachineServiceClient extends ControllerVirtual
public void updateDeploymentStatus(String path) {
- EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(ControllerVirtualMachineServiceOperationEnum.REMOTE_updateDeploymentStatus);
+ EClass c = ControllerPackage.eINSTANCE.getControllerVirtualMachineService();
+ ecomplogger.recordMetricEventStart(ControllerVirtualMachineServiceOperationEnum.ControllerVirtualMachineService_updateDeploymentStatus,client.getRemote());
try {
client.operationPath(path, c, "updateDeploymentStatus", null);
}
catch (Exception e) {
- ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_updateDeploymentStatus, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@updateDeploymentStatus: " + e);
+ ecomplogger.warn(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_updateDeploymentStatus, e.toString());
+ EcompException e1 = EcompException.create(ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_updateDeploymentStatus,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,ControllerVirtualMachineServiceMessageEnum.REMOTE_CALL_FAILED_updateDeploymentStatus,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformController.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformController.java
index 402f708..bbaa185 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformController.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformController.java
@@ -27,13 +27,13 @@ package org.openecomp.dcae.controller.platform.servers.controller;
-
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;
@@ -41,7 +41,9 @@ 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;
@@ -77,9 +79,9 @@ import org.openecomp.dcae.controller.platform.controller.impl.DcaePlatformContro
-public class DcaeDcaePlatformController extends DcaePlatformControllerImpl implements IRequestHandler, ISwaggerHandler, ISiriusPlugin {
+public class DcaeDcaePlatformController extends DcaePlatformControllerImpl implements ISiriusProvider, IRequestHandler, ISwaggerHandler, ISiriusPlugin {
public static final Logger logger = Logger.getLogger(DcaeDcaePlatformController.class);
- static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ static final NcompLogger ecomplogger = NcompLogger.getNcompLogger();
public DcaeDcaePlatformControllerProvider controller;
ISiriusServer server;
@@ -94,9 +96,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "deployDescriptor", ApiRequestStatus.START, duration_,name);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.deployDescriptor);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(DcaePlatformControllerOperationEnum.DcaePlatformController_deployDescriptor,server,this);
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_deployDescriptor,"self:" + ManagementServer.object2ref(this));
try {
controller.deployDescriptor(name);
}
@@ -105,8 +106,10 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "deployDescriptor", ApiRequestStatus.ERROR, duration_,name);
System.err.println("ERROR: " + e);
- ecomplogger.warn(DcaePlatformControllerMessageEnum.deployDescriptor, e.toString());
- throw e;
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REQUEST_FAILED_deployDescriptor, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REQUEST_FAILED_deployDescriptor,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, DcaePlatformControllerMessageEnum.REQUEST_FAILED_deployDescriptor, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -121,9 +124,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "refreshDataBus", ApiRequestStatus.START, duration_,nameMatch);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.refreshDataBus);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(DcaePlatformControllerOperationEnum.DcaePlatformController_refreshDataBus,server,this);
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_refreshDataBus,"self:" + ManagementServer.object2ref(this));
try {
controller.refreshDataBus(nameMatch);
}
@@ -132,8 +134,10 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "refreshDataBus", ApiRequestStatus.ERROR, duration_,nameMatch);
System.err.println("ERROR: " + e);
- ecomplogger.warn(DcaePlatformControllerMessageEnum.refreshDataBus, e.toString());
- throw e;
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REQUEST_FAILED_refreshDataBus, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REQUEST_FAILED_refreshDataBus,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, DcaePlatformControllerMessageEnum.REQUEST_FAILED_refreshDataBus, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -148,9 +152,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "logs", ApiRequestStatus.START, duration_,cx,logs);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.logs);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(DcaePlatformControllerOperationEnum.DcaePlatformController_logs,server,this);
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_logs,"self:" + ManagementServer.object2ref(this));
try {
controller.logs(cx,logs);
}
@@ -159,8 +162,10 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "logs", ApiRequestStatus.ERROR, duration_,cx,logs);
System.err.println("ERROR: " + e);
- ecomplogger.warn(DcaePlatformControllerMessageEnum.logs, e.toString());
- throw e;
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REQUEST_FAILED_logs, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REQUEST_FAILED_logs,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, DcaePlatformControllerMessageEnum.REQUEST_FAILED_logs, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -175,9 +180,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.START, duration_,cx,metrics);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.metrics);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(DcaePlatformControllerOperationEnum.DcaePlatformController_metrics,server,this);
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_metrics,"self:" + ManagementServer.object2ref(this));
try {
controller.metrics(cx,metrics);
}
@@ -186,8 +190,10 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.ERROR, duration_,cx,metrics);
System.err.println("ERROR: " + e);
- ecomplogger.warn(DcaePlatformControllerMessageEnum.metrics, e.toString());
- throw e;
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REQUEST_FAILED_metrics, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REQUEST_FAILED_metrics,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, DcaePlatformControllerMessageEnum.REQUEST_FAILED_metrics, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -202,9 +208,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "properties", ApiRequestStatus.START, duration_,cx,l);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.properties);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(DcaePlatformControllerOperationEnum.DcaePlatformController_properties,server,this);
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_properties,"self:" + ManagementServer.object2ref(this));
try {
controller.properties(cx,l);
}
@@ -213,8 +218,10 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "properties", ApiRequestStatus.ERROR, duration_,cx,l);
System.err.println("ERROR: " + e);
- ecomplogger.warn(DcaePlatformControllerMessageEnum.properties, e.toString());
- throw e;
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REQUEST_FAILED_properties, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REQUEST_FAILED_properties,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, DcaePlatformControllerMessageEnum.REQUEST_FAILED_properties, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -229,9 +236,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.START, duration_,cx,info);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.uploadInfo);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(DcaePlatformControllerOperationEnum.DcaePlatformController_uploadInfo,server,this);
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_uploadInfo,"self:" + ManagementServer.object2ref(this));
try {
controller.uploadInfo(cx,info);
}
@@ -240,8 +246,10 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.ERROR, duration_,cx,info);
System.err.println("ERROR: " + e);
- ecomplogger.warn(DcaePlatformControllerMessageEnum.uploadInfo, e.toString());
- throw e;
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REQUEST_FAILED_uploadInfo, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REQUEST_FAILED_uploadInfo,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, DcaePlatformControllerMessageEnum.REQUEST_FAILED_uploadInfo, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -256,9 +264,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.START, duration_,cx,path,start,end,option,relativeInterval);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.getValues);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(DcaePlatformControllerOperationEnum.DcaePlatformController_getValues,server,this);
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_getValues,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getValues(cx,path,start,end,option,relativeInterval);
}
@@ -267,8 +274,10 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.ERROR, duration_,cx,path,start,end,option,relativeInterval);
System.err.println("ERROR: " + e);
- ecomplogger.warn(DcaePlatformControllerMessageEnum.getValues, e.toString());
- throw e;
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REQUEST_FAILED_getValues, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REQUEST_FAILED_getValues,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, DcaePlatformControllerMessageEnum.REQUEST_FAILED_getValues, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -283,9 +292,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.START, duration_,cx,path,metrics,start,end,option,relativeInterval);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.getValuesAll);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(DcaePlatformControllerOperationEnum.DcaePlatformController_getValuesAll,server,this);
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_getValuesAll,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getValuesAll(cx,path,metrics,start,end,option,relativeInterval);
}
@@ -294,8 +302,10 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.ERROR, duration_,cx,path,metrics,start,end,option,relativeInterval);
System.err.println("ERROR: " + e);
- ecomplogger.warn(DcaePlatformControllerMessageEnum.getValuesAll, e.toString());
- throw e;
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REQUEST_FAILED_getValuesAll, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REQUEST_FAILED_getValuesAll,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, DcaePlatformControllerMessageEnum.REQUEST_FAILED_getValuesAll, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -310,9 +320,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.START, duration_,cx,path,start,end);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.getMessages);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(DcaePlatformControllerOperationEnum.DcaePlatformController_getMessages,server,this);
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_getMessages,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getMessages(cx,path,start,end);
}
@@ -321,8 +330,10 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.ERROR, duration_,cx,path,start,end);
System.err.println("ERROR: " + e);
- ecomplogger.warn(DcaePlatformControllerMessageEnum.getMessages, e.toString());
- throw e;
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REQUEST_FAILED_getMessages, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REQUEST_FAILED_getMessages,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, DcaePlatformControllerMessageEnum.REQUEST_FAILED_getMessages, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -337,9 +348,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.START, duration_,userName,action,resourcePath,context);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.getRequestLogger);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(DcaePlatformControllerOperationEnum.DcaePlatformController_getRequestLogger,server,this);
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_getRequestLogger,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getRequestLogger(userName,action,resourcePath,context);
}
@@ -348,8 +358,10 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.ERROR, duration_,userName,action,resourcePath,context);
System.err.println("ERROR: " + e);
- ecomplogger.warn(DcaePlatformControllerMessageEnum.getRequestLogger, e.toString());
- throw e;
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REQUEST_FAILED_getRequestLogger, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REQUEST_FAILED_getRequestLogger,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, DcaePlatformControllerMessageEnum.REQUEST_FAILED_getRequestLogger, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -364,9 +376,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.START, duration_,path,function);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.evaluate);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(DcaePlatformControllerOperationEnum.DcaePlatformController_evaluate,server,this);
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_evaluate,"self:" + ManagementServer.object2ref(this));
try {
res = controller.evaluate(path,function);
}
@@ -375,8 +386,10 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.ERROR, duration_,path,function);
System.err.println("ERROR: " + e);
- ecomplogger.warn(DcaePlatformControllerMessageEnum.evaluate, e.toString());
- throw e;
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REQUEST_FAILED_evaluate, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REQUEST_FAILED_evaluate,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, DcaePlatformControllerMessageEnum.REQUEST_FAILED_evaluate, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -391,9 +404,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "update", ApiRequestStatus.START, duration_,path,function);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.update);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(DcaePlatformControllerOperationEnum.DcaePlatformController_update,server,this);
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_update,"self:" + ManagementServer.object2ref(this));
try {
controller.update(path,function);
}
@@ -402,8 +414,10 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
if (server != null)
server.getServer().recordApi(null, this, "update", ApiRequestStatus.ERROR, duration_,path,function);
System.err.println("ERROR: " + e);
- ecomplogger.warn(DcaePlatformControllerMessageEnum.update, e.toString());
- throw e;
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REQUEST_FAILED_update, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REQUEST_FAILED_update,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, DcaePlatformControllerMessageEnum.REQUEST_FAILED_update, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -415,8 +429,8 @@ public class DcaeDcaePlatformController extends DcaePlatformControllerImpl imple
@Override
- public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context) {
- return controller.handleJson(userName,action,resourcePath,json,context);
+ public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context, String clientVersion) {
+ return controller.handleJson(userName,action,resourcePath,json,context,clientVersion);
}
@Override
@@ -442,7 +456,7 @@ public void updateSwagger(String path, SwaggerUtils swagger) {
public static void ecoreSetup() {
DcaeDcaePlatformControllerProvider.ecoreSetup();
}
- public DcaeDcaePlatformControllerProvider getSomfProvider() {
+ public DcaeDcaePlatformControllerProvider getSiriusProvider() {
return controller;
}
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerClient.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerClient.java
index e9409b3..b74dc43 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerClient.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerClient.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 DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl
DcaeDcaePlatformController.ecoreSetup();
client = new GenericHttpClient(file,name);
client.add("/resources", this);
+ client.setVersion("ONAP-R2");
}
public DcaeDcaePlatformControllerClient(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 DcaeDcaePlatformControllerClient(AbstractClient c) {
client = c;
client.add("/resources", this);
+ client.setVersion("ONAP-R2");
}
@Override
public void deployDescriptor(java.lang.String name) {
- EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_deployDescriptor);
+ EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController();
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_deployDescriptor,client.getRemote());
try {
client.operationPath("/resources", c, "deployDescriptor", null, name);
}
catch (Exception e) {
- ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_deployDescriptor, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@deployDescriptor: " + e);
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_deployDescriptor, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_deployDescriptor,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_deployDescriptor,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -88,16 +94,17 @@ public class DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl
@Override
public void refreshDataBus(java.lang.String nameMatch) {
- EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_refreshDataBus);
+ EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController();
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_refreshDataBus,client.getRemote());
try {
client.operationPath("/resources", c, "refreshDataBus", null, nameMatch);
}
catch (Exception e) {
- ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_refreshDataBus, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@refreshDataBus: " + e);
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_refreshDataBus, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_refreshDataBus,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_refreshDataBus,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -105,16 +112,17 @@ public class DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl
@Override
public void logs(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.logs.LogMessage> logs) {
- EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_logs);
+ EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController();
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_logs,client.getRemote());
try {
client.operationPath("/resources", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs);
}
catch (Exception e) {
- ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_logs, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@logs: " + e);
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_logs, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_logs,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_logs,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -122,16 +130,17 @@ public class DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl
@Override
public void metrics(org.json.JSONObject cx, EList<org.openecomp.ncomp.core.metrics.Metric> metrics) {
- EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_metrics);
+ EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController();
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_metrics,client.getRemote());
try {
client.operationPath("/resources", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics);
}
catch (Exception e) {
- ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_metrics, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@metrics: " + e);
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_metrics, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_metrics,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_metrics,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -139,16 +148,17 @@ public class DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl
@Override
public void properties(org.json.JSONObject cx, EList<org.openecomp.ncomp.sirius.manager.properties.AbstractProperty> l) {
- EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_properties);
+ EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController();
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_properties,client.getRemote());
try {
client.operationPath("/resources", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l);
}
catch (Exception e) {
- ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_properties, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@properties: " + e);
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_properties, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_properties,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_properties,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -156,16 +166,17 @@ public class DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl
@Override
public void uploadInfo(org.json.JSONObject cx, EList<org.openecomp.ncomp.sirius.manager.server.ManagementInfo> info) {
- EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_uploadInfo);
+ EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController();
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_uploadInfo,client.getRemote());
try {
client.operationPath("/resources", c, "uploadInfo", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,info);
}
catch (Exception e) {
- ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_uploadInfo, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@uploadInfo: " + e);
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_uploadInfo, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_uploadInfo,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_uploadInfo,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
@@ -173,16 +184,17 @@ public class DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl
@Override
public EList<org.openecomp.ncomp.core.metrics.DoubleMetric> getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) {
- EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_getValues);
+ EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController();
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_getValues,client.getRemote());
EList<org.openecomp.ncomp.core.metrics.DoubleMetric> res;
try {
res = (EList<org.openecomp.ncomp.core.metrics.DoubleMetric>) client.operationPath("/resources", c, "getValues", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end,option,relativeInterval);
}
catch (Exception e) {
- ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_getValues, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getValues: " + e);
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_getValues, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_getValues,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_getValues,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -190,16 +202,17 @@ public class DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl
@Override
public EList<org.openecomp.ncomp.core.metrics.DoubleMetric> getValuesAll(org.json.JSONObject cx, java.lang.String path, EList<java.lang.String> metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) {
- EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_getValuesAll);
+ EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController();
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_getValuesAll,client.getRemote());
EList<org.openecomp.ncomp.core.metrics.DoubleMetric> res;
try {
res = (EList<org.openecomp.ncomp.core.metrics.DoubleMetric>) client.operationPath("/resources", c, "getValuesAll", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,metrics,start,end,option,relativeInterval);
}
catch (Exception e) {
- ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_getValuesAll, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getValuesAll: " + e);
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_getValuesAll, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_getValuesAll,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_getValuesAll,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -207,16 +220,17 @@ public class DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl
@Override
public EList<org.openecomp.ncomp.core.logs.LogMessage> getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) {
- EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_getMessages);
+ EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController();
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_getMessages,client.getRemote());
EList<org.openecomp.ncomp.core.logs.LogMessage> res;
try {
res = (EList<org.openecomp.ncomp.core.logs.LogMessage>) client.operationPath("/resources", c, "getMessages", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end);
}
catch (Exception e) {
- ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_getMessages, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getMessages: " + e);
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_getMessages, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_getMessages,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_getMessages,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -224,16 +238,17 @@ public class DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl
@Override
public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) {
- EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_getRequestLogger);
+ EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController();
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_getRequestLogger,client.getRemote());
org.openecomp.ncomp.sirius.manager.server.LoggerInfo res;
try {
res = (org.openecomp.ncomp.sirius.manager.server.LoggerInfo) client.operationPath("/resources", c, "getRequestLogger", null, userName,action,resourcePath,context);
}
catch (Exception e) {
- ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_getRequestLogger, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getRequestLogger: " + e);
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_getRequestLogger, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_getRequestLogger,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_getRequestLogger,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -241,16 +256,17 @@ public class DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl
@Override
public EList<org.openecomp.ncomp.core.function.ValuePair> evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) {
- EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_evaluate);
+ EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController();
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_evaluate,client.getRemote());
EList<org.openecomp.ncomp.core.function.ValuePair> res;
try {
res = (EList<org.openecomp.ncomp.core.function.ValuePair>) client.operationPath("/resources", c, "evaluate", null, path,function);
}
catch (Exception e) {
- ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_evaluate, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@evaluate: " + e);
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_evaluate, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_evaluate,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_evaluate,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -258,16 +274,17 @@ public class DcaeDcaePlatformControllerClient extends DcaePlatformControllerImpl
@Override
public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) {
- EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(DcaePlatformControllerOperationEnum.REMOTE_update);
+ EClass c = ControllerPackage.eINSTANCE.getDcaePlatformController();
+ ecomplogger.recordMetricEventStart(DcaePlatformControllerOperationEnum.DcaePlatformController_update,client.getRemote());
try {
client.operationPath("/resources", c, "update", null, path,function);
}
catch (Exception e) {
- ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_update, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@update: " + e);
+ ecomplogger.warn(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_update, e.toString());
+ EcompException e1 = EcompException.create(DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_update,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,DcaePlatformControllerMessageEnum.REMOTE_CALL_FAILED_update,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProviderTemplate.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProviderTemplate.java
index 09a439c..1fadea5 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProviderTemplate.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerProviderTemplate.java
@@ -77,7 +77,7 @@ public class DcaeDcaePlatformControllerProviderTemplate extends BasicManagementS
}
-public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context) {
+public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context, String clientVersion) {
// TODO Auto-generated method stub
return null;
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerServer.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerServer.java
index 2dc725f..a8f99eb 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerServer.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/DcaeDcaePlatformControllerServer.java
@@ -26,17 +26,16 @@ package org.openecomp.dcae.controller.platform.servers.controller;
import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath;
import java.io.IOException;
+import java.io.InputStream;
import java.util.Properties;
import java.util.TimeZone;
import org.apache.log4j.Logger;
import org.eclipse.emf.ecore.EFactory;
-
-import org.openecomp.entity.EcompComponent;
-import org.openecomp.entity.EcompSubComponent;
-import org.openecomp.entity.EcompSubComponentInstance;
+import org.json.JSONObject;
import org.openecomp.ncomp.sirius.manager.Jetty8Server;
import org.openecomp.ncomp.sirius.manager.ManagementServer;
+import org.openecomp.ncomp.sirius.manager.IRequestHandler;
import org.openecomp.ncomp.sirius.manager.ISiriusServer;
import org.openecomp.dcae.controller.platform.controller.DcaePlatformController;
@@ -52,7 +51,7 @@ import org.openecomp.dcae.controller.platform.servers.controller.gui.DcaeModelFa
-public class DcaeDcaePlatformControllerServer implements ISiriusServer {
+public class DcaeDcaePlatformControllerServer implements ISiriusServer, IRequestHandler {
public static final Logger logger = Logger.getLogger(DcaeDcaePlatformControllerServer.class);
String serverPath;
ManagementServer server;
@@ -79,6 +78,7 @@ public class DcaeDcaePlatformControllerServer implements ISiriusServer {
props = getPropertiesFromClasspath(filename);
serverPath = (String) props.get("server.dir");
server = new ManagementServer(f, "DcaePlatformController", serverPath, filename);
+ ManagementServer.setBuildVersion("ONAP-R2");
server.addFactory(f);
server.addFactory(new org.openecomp.ncomp.servers.openstack.OsOpenstackFactory(this));
@@ -94,6 +94,7 @@ public class DcaeDcaePlatformControllerServer implements ISiriusServer {
controller = (DcaeDcaePlatformController) server.find("/").o;
webServer = new Jetty8Server("controller.properties");
webServer.add("/resources",server);
+ webServer.add("/api",this);
webServer.add("/test",controller);
@@ -126,4 +127,17 @@ public class DcaeDcaePlatformControllerServer implements ISiriusServer {
public ManagementServer getServer() {
return server;
}
+ public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context,
+ String clientVersion) {
+ switch ((String) context.get("path")) {
+ case "/api/versions":
+ return server.supportedVersions();
+ }
+ logger.warn("Unknown request action=" + action + " path=" + resourcePath + " context=" + context.toString(2));
+ throw new RuntimeException("Unknown request");
+ }
+ public Object handleBinary(String userName, String action, String resourcePath, InputStream in) {
+ return null;
+ }
+
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApi.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApi.java
index 7fc89db..4749e65 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApi.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApi.java
@@ -27,13 +27,13 @@ package org.openecomp.dcae.controller.platform.servers.controller.gui;
-
import java.io.InputStream;
import org.openecomp.ncomp.sirius.manager.IRequestHandler;
import org.openecomp.ncomp.sirius.manager.ISwaggerHandler;
import org.openecomp.ncomp.sirius.manager.ISiriusPlugin;
import org.openecomp.ncomp.sirius.manager.ISiriusServer;
+import org.openecomp.ncomp.sirius.manager.ISiriusProvider;
import org.openecomp.ncomp.sirius.manager.ManagementServer;
import org.openecomp.ncomp.sirius.manager.SwaggerUtils;
import org.openecomp.ncomp.sirius.function.FunctionUtils;
@@ -41,7 +41,9 @@ 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;
@@ -89,9 +91,9 @@ import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl;
-public class DcaeGuiClientApi extends GuiClientApiImpl {
+public class DcaeGuiClientApi extends GuiClientApiImpl implements ISiriusProvider {
public static final Logger logger = Logger.getLogger(DcaeGuiClientApi.class);
- static final EcompLogger ecomplogger = EcompLogger.getEcompLogger();
+ static final NcompLogger ecomplogger = NcompLogger.getNcompLogger();
public DcaeGuiClientApiProvider controller;
ISiriusServer server;
@@ -106,9 +108,8 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(GuiClientApiOperationEnum.getTree);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getTree,server,this);
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTree,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getTree();
}
@@ -117,8 +118,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_);
System.err.println("ERROR: " + e);
- ecomplogger.warn(GuiClientApiMessageEnum.getTree, e.toString());
- throw e;
+ ecomplogger.warn(GuiClientApiMessageEnum.REQUEST_FAILED_getTree, e.toString());
+ EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REQUEST_FAILED_getTree,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, GuiClientApiMessageEnum.REQUEST_FAILED_getTree, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -133,9 +136,8 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(GuiClientApiOperationEnum.getObject);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getObject,server,this);
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getObject,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getObject(path);
}
@@ -144,8 +146,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path);
System.err.println("ERROR: " + e);
- ecomplogger.warn(GuiClientApiMessageEnum.getObject, e.toString());
- throw e;
+ ecomplogger.warn(GuiClientApiMessageEnum.REQUEST_FAILED_getObject, e.toString());
+ EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REQUEST_FAILED_getObject,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, GuiClientApiMessageEnum.REQUEST_FAILED_getObject, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -160,9 +164,8 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getTimeSerie,server,this);
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTimeSerie,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getTimeSerie(path,start,end,duration);
}
@@ -171,8 +174,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration);
System.err.println("ERROR: " + e);
- ecomplogger.warn(GuiClientApiMessageEnum.getTimeSerie, e.toString());
- throw e;
+ ecomplogger.warn(GuiClientApiMessageEnum.REQUEST_FAILED_getTimeSerie, e.toString());
+ EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REQUEST_FAILED_getTimeSerie,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, GuiClientApiMessageEnum.REQUEST_FAILED_getTimeSerie, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -187,9 +192,8 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(GuiClientApiOperationEnum.getTable);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getTable,server,this);
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTable,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getTable(path,start,end);
}
@@ -198,8 +202,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end);
System.err.println("ERROR: " + e);
- ecomplogger.warn(GuiClientApiMessageEnum.getTable, e.toString());
- throw e;
+ ecomplogger.warn(GuiClientApiMessageEnum.REQUEST_FAILED_getTable, e.toString());
+ EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REQUEST_FAILED_getTable,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, GuiClientApiMessageEnum.REQUEST_FAILED_getTable, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -214,9 +220,8 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getHtml,server,this);
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getHtml,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getHtml(path,start,end);
}
@@ -225,8 +230,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end);
System.err.println("ERROR: " + e);
- ecomplogger.warn(GuiClientApiMessageEnum.getHtml, e.toString());
- throw e;
+ ecomplogger.warn(GuiClientApiMessageEnum.REQUEST_FAILED_getHtml, e.toString());
+ EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REQUEST_FAILED_getHtml,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, GuiClientApiMessageEnum.REQUEST_FAILED_getHtml, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -241,9 +248,8 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end);
Date now_ = new Date();
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph);
- ecomplogger.setInstanceId(ManagementServer.object2ref(this));
+ ecomplogger.recordAuditEventStartIfNeeded(GuiClientApiOperationEnum.GuiClientApi_getGraph,server,this);
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getGraph,"self:" + ManagementServer.object2ref(this));
try {
res = controller.getGraph(path,start,end);
}
@@ -252,8 +258,10 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
if (server != null)
server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end);
System.err.println("ERROR: " + e);
- ecomplogger.warn(GuiClientApiMessageEnum.getGraph, e.toString());
- throw e;
+ ecomplogger.warn(GuiClientApiMessageEnum.REQUEST_FAILED_getGraph, e.toString());
+ EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REQUEST_FAILED_getGraph,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR, GuiClientApiMessageEnum.REQUEST_FAILED_getGraph, e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
duration_ = new Date().getTime()-now_.getTime();
@@ -272,7 +280,7 @@ public class DcaeGuiClientApi extends GuiClientApiImpl {
public static void ecoreSetup() {
DcaeGuiClientApiProvider.ecoreSetup();
}
- public DcaeGuiClientApiProvider getSomfProvider() {
+ public DcaeGuiClientApiProvider getSiriusProvider() {
return controller;
}
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiClient.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiClient.java
index 720cae3..84f883c 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiClient.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/DcaeGuiClientApiClient.java
@@ -30,6 +30,8 @@ import org.openecomp.ncomp.sirius.manager.GenericHttpClient;
import org.apache.log4j.Logger;
import org.openecomp.logger.EcompLogger;
+import org.openecomp.logger.StatusCodeEnum;
+import org.openecomp.logger.EcompException;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
@@ -55,33 +57,37 @@ public class DcaeGuiClientApiClient extends GuiClientApiImpl {
DcaeDcaePlatformController.ecoreSetup();
client = new GenericHttpClient(file,name);
client.add("/gui", this);
+ client.setVersion("ONAP-R2");
}
public DcaeGuiClientApiClient(String file, String name1, String name2) {
HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2);
client = client1.all; // requests should be forwarded to all.
client.add("/gui", this);
+ client.setVersion("ONAP-R2");
}
public DcaeGuiClientApiClient(AbstractClient c) {
client = c;
client.add("/resources", this);
+ client.setVersion("ONAP-R2");
}
@Override
public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() {
- EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree);
+ EClass c = ModelPackage.eINSTANCE.getGuiClientApi();
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTree,client.getRemote());
org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res;
try {
res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null);
}
catch (Exception e) {
- ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTree: " + e);
+ ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTree, e.toString());
+ EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTree,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTree,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -89,16 +95,17 @@ public class DcaeGuiClientApiClient extends GuiClientApiImpl {
@Override
public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) {
- EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject);
+ EClass c = ModelPackage.eINSTANCE.getGuiClientApi();
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getObject,client.getRemote());
org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res;
try {
res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path);
}
catch (Exception e) {
- ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getObject: " + e);
+ ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getObject, e.toString());
+ EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getObject,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getObject,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -106,16 +113,17 @@ public class DcaeGuiClientApiClient extends GuiClientApiImpl {
@Override
public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) {
- EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie);
+ EClass c = ModelPackage.eINSTANCE.getGuiClientApi();
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTimeSerie,client.getRemote());
org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res;
try {
res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration);
}
catch (Exception e) {
- ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTimeSerie: " + e);
+ ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTimeSerie, e.toString());
+ EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTimeSerie,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTimeSerie,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -123,16 +131,17 @@ public class DcaeGuiClientApiClient extends GuiClientApiImpl {
@Override
public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) {
- EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable);
+ EClass c = ModelPackage.eINSTANCE.getGuiClientApi();
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getTable,client.getRemote());
org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res;
try {
res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end);
}
catch (Exception e) {
- ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getTable: " + e);
+ ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTable, e.toString());
+ EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTable,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getTable,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -140,16 +149,17 @@ public class DcaeGuiClientApiClient extends GuiClientApiImpl {
@Override
public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) {
- EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml);
+ EClass c = ModelPackage.eINSTANCE.getGuiClientApi();
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getHtml,client.getRemote());
org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res;
try {
res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end);
}
catch (Exception e) {
- ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getHtml: " + e);
+ ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getHtml, e.toString());
+ EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getHtml,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getHtml,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
@@ -157,16 +167,17 @@ public class DcaeGuiClientApiClient extends GuiClientApiImpl {
@Override
public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) {
- EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo
- ecomplogger.recordMetricEventStart();
- ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph);
+ EClass c = ModelPackage.eINSTANCE.getGuiClientApi();
+ ecomplogger.recordMetricEventStart(GuiClientApiOperationEnum.GuiClientApi_getGraph,client.getRemote());
org.openecomp.ncomp.sirius.manager.graph.GuiGraph res;
try {
res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end);
}
catch (Exception e) {
- ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString());
- throw new RuntimeException("remote call failed: " + client.getRemote() + "@getGraph: " + e);
+ ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getGraph, e.toString());
+ EcompException e1 = EcompException.create(GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getGraph,e,e.getMessage());
+ ecomplogger.recordMetricEventEnd(StatusCodeEnum.ERROR,GuiClientApiMessageEnum.REMOTE_CALL_FAILED_getGraph,e.getMessage());
+ throw e1;
}
ecomplogger.recordMetricEventEnd();
return res;
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApi.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApi.properties
index 8705ab8..3822d29 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApi.properties
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApi.properties
@@ -1,78 +1,78 @@
dummy=\
- null|\
+ dummy-null|\
null|\
null|\
null
-getTree=\
- getTree-FAILED-5001W|\
+REQUEST_FAILED_getTree=\
+ REQUEST-FAILED-getTree-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getObject=\
- getObject-FAILED-5001W|\
+REQUEST_FAILED_getObject=\
+ REQUEST-FAILED-getObject-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getTimeSerie=\
- getTimeSerie-FAILED-5001W|\
+REQUEST_FAILED_getTimeSerie=\
+ REQUEST-FAILED-getTimeSerie-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getTable=\
- getTable-FAILED-5001W|\
+REQUEST_FAILED_getTable=\
+ REQUEST-FAILED-getTable-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getHtml=\
- getHtml-FAILED-5001W|\
+REQUEST_FAILED_getHtml=\
+ REQUEST-FAILED-getHtml-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getGraph=\
- getGraph-FAILED-5001W|\
+REQUEST_FAILED_getGraph=\
+ REQUEST-FAILED-getGraph-4001W|\
{0}|\
null|\
Operation Failed with Exception
-REMOTE_getTree=\
- REMOTE-getTree-FAILED-5001W|\
+REMOTE_CALL_FAILED_getTree=\
+ REMOTE-CALL-FAILED-getTree-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getObject=\
- REMOTE-getObject-FAILED-5001W|\
+REMOTE_CALL_FAILED_getObject=\
+ REMOTE-CALL-FAILED-getObject-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getTimeSerie=\
- REMOTE-getTimeSerie-FAILED-5001W|\
+REMOTE_CALL_FAILED_getTimeSerie=\
+ REMOTE-CALL-FAILED-getTimeSerie-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getTable=\
- REMOTE-getTable-FAILED-5001W|\
+REMOTE_CALL_FAILED_getTable=\
+ REMOTE-CALL-FAILED-getTable-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getHtml=\
- REMOTE-getHtml-FAILED-5001W|\
+REMOTE_CALL_FAILED_getHtml=\
+ REMOTE-CALL-FAILED-getHtml-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getGraph=\
- REMOTE-getGraph-FAILED-5001W|\
+REMOTE_CALL_FAILED_getGraph=\
+ REMOTE-CALL-FAILED-getGraph-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiMessageEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiMessageEnum.java
index 9a5d804..1128277 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiMessageEnum.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiMessageEnum.java
@@ -1,25 +1,4 @@
-/*-
- * ============LICENSE_START==========================================
- * OPENECOMP - DCAE
- * ===================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END============================================
- */
-
-
package org.openecomp.dcae.controller.platform.servers.controller.gui.logging;
import com.att.eelf.i18n.EELFResourceManager;
@@ -28,20 +7,20 @@ import org.openecomp.logger.EcompMessageEnum;
public enum GuiClientApiMessageEnum implements EcompMessageEnum {
dummy,
- getTree,
- getObject,
- getTimeSerie,
- getTable,
- getHtml,
- getGraph,
- REMOTE_getTree,
- REMOTE_getObject,
- REMOTE_getTimeSerie,
- REMOTE_getTable,
- REMOTE_getHtml,
- REMOTE_getGraph;
+ REQUEST_FAILED_getTree,
+ REQUEST_FAILED_getObject,
+ REQUEST_FAILED_getTimeSerie,
+ REQUEST_FAILED_getTable,
+ REQUEST_FAILED_getHtml,
+ REQUEST_FAILED_getGraph,
+ REMOTE_CALL_FAILED_getTree,
+ REMOTE_CALL_FAILED_getObject,
+ REMOTE_CALL_FAILED_getTimeSerie,
+ REMOTE_CALL_FAILED_getTable,
+ REMOTE_CALL_FAILED_getHtml,
+ REMOTE_CALL_FAILED_getGraph;
static {
- EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.platform.servers.controller.gui.logging.GuiClientApi");
+ EELFResourceManager.loadMessageBundle("org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApi");
}
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiOperationEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiOperationEnum.java
index aa3a949..4a4b5c6 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiOperationEnum.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/gui/logging/GuiClientApiOperationEnum.java
@@ -1,41 +1,27 @@
-/*-
- * ============LICENSE_START==========================================
- * OPENECOMP - DCAE
- * ===================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END============================================
- */
-
-
package org.openecomp.dcae.controller.platform.servers.controller.gui.logging;
import org.openecomp.entity.EcompOperationEnum;
public enum GuiClientApiOperationEnum implements EcompOperationEnum {
- getTree,
- getObject,
- getTimeSerie,
- getTable,
- getHtml,
- getGraph,
- REMOTE_getTree,
- REMOTE_getObject,
- REMOTE_getTimeSerie,
- REMOTE_getTable,
- REMOTE_getHtml,
- REMOTE_getGraph;
+ GuiClientApi_getTree("GuiClientApi@getTree"),
+ GuiClientApi_getObject("GuiClientApi@getObject"),
+ GuiClientApi_getTimeSerie("GuiClientApi@getTimeSerie"),
+ GuiClientApi_getTable("GuiClientApi@getTable"),
+ GuiClientApi_getHtml("GuiClientApi@getHtml"),
+ GuiClientApi_getGraph("GuiClientApi@getGraph") ;
+
+
+ private String n;
+
+ private GuiClientApiOperationEnum(String n) {
+ this.n = n;
+ }
+
+ @Override
+ public String toString() {
+ return n;
+ }
+
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerCluster.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerCluster.properties
index 5866f65..2712b33 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerCluster.properties
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerCluster.properties
@@ -1,30 +1,30 @@
dummy=\
- null|\
+ dummy-null|\
null|\
null|\
null
-pushData=\
- pushData-FAILED-5001W|\
+REQUEST_FAILED_pushData=\
+ REQUEST-FAILED-pushData-4001W|\
{0}|\
null|\
Operation Failed with Exception
-receiveData=\
- receiveData-FAILED-5001W|\
+REQUEST_FAILED_receiveData=\
+ REQUEST-FAILED-receiveData-4001W|\
{0}|\
null|\
Operation Failed with Exception
-REMOTE_pushData=\
- REMOTE-pushData-FAILED-5001W|\
+REMOTE_CALL_FAILED_pushData=\
+ REMOTE-CALL-FAILED-pushData-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_receiveData=\
- REMOTE-receiveData-FAILED-5001W|\
+REMOTE_CALL_FAILED_receiveData=\
+ REMOTE-CALL-FAILED-receiveData-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterMessageEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterMessageEnum.java
index 10ec310..40dc69a 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterMessageEnum.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterMessageEnum.java
@@ -1,25 +1,4 @@
-/*-
- * ============LICENSE_START==========================================
- * OPENECOMP - DCAE
- * ===================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END============================================
- */
-
-
package org.openecomp.dcae.controller.platform.servers.controller.logging;
import com.att.eelf.i18n.EELFResourceManager;
@@ -28,12 +7,12 @@ import org.openecomp.logger.EcompMessageEnum;
public enum ControllerClusterMessageEnum implements EcompMessageEnum {
dummy,
- pushData,
- receiveData,
- REMOTE_pushData,
- REMOTE_receiveData;
+ REQUEST_FAILED_pushData,
+ REQUEST_FAILED_receiveData,
+ REMOTE_CALL_FAILED_pushData,
+ REMOTE_CALL_FAILED_receiveData;
static {
- EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.platform.servers.controller.logging.ControllerCluster");
+ EELFResourceManager.loadMessageBundle("org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerCluster");
}
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterOperationEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterOperationEnum.java
index cece429..d2df645 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterOperationEnum.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerClusterOperationEnum.java
@@ -1,33 +1,23 @@
-/*-
- * ============LICENSE_START==========================================
- * OPENECOMP - DCAE
- * ===================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END============================================
- */
-
-
package org.openecomp.dcae.controller.platform.servers.controller.logging;
import org.openecomp.entity.EcompOperationEnum;
public enum ControllerClusterOperationEnum implements EcompOperationEnum {
- pushData,
- receiveData,
- REMOTE_pushData,
- REMOTE_receiveData;
+ ControllerCluster_pushData("ControllerCluster@pushData"),
+ ControllerCluster_receiveData("ControllerCluster@receiveData") ;
+
+
+ private String n;
+
+ private ControllerClusterOperationEnum(String n) {
+ this.n = n;
+ }
+
+ @Override
+ public String toString() {
+ return n;
+ }
+
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineService.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineService.properties
index d32cf07..1218d2a 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineService.properties
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineService.properties
@@ -1,150 +1,150 @@
dummy=\
- null|\
+ dummy-null|\
null|\
null|\
null
-deploy=\
- deploy-FAILED-5001W|\
+REQUEST_FAILED_deploy=\
+ REQUEST-FAILED-deploy-4001W|\
{0}|\
null|\
Operation Failed with Exception
-undeploy=\
- undeploy-FAILED-5001W|\
+REQUEST_FAILED_undeploy=\
+ REQUEST-FAILED-undeploy-4001W|\
{0}|\
null|\
Operation Failed with Exception
-test=\
- test-FAILED-5001W|\
+REQUEST_FAILED_test=\
+ REQUEST-FAILED-test-4001W|\
{0}|\
null|\
Operation Failed with Exception
-suspend=\
- suspend-FAILED-5001W|\
+REQUEST_FAILED_suspend=\
+ REQUEST-FAILED-suspend-4001W|\
{0}|\
null|\
Operation Failed with Exception
-resume=\
- resume-FAILED-5001W|\
+REQUEST_FAILED_resume=\
+ REQUEST-FAILED-resume-4001W|\
{0}|\
null|\
Operation Failed with Exception
-pushManagerConfiguration=\
- pushManagerConfiguration-FAILED-5001W|\
+REQUEST_FAILED_pushManagerConfiguration=\
+ REQUEST-FAILED-pushManagerConfiguration-4001W|\
{0}|\
null|\
Operation Failed with Exception
-pollManagerConfiguration=\
- pollManagerConfiguration-FAILED-5001W|\
+REQUEST_FAILED_pollManagerConfiguration=\
+ REQUEST-FAILED-pollManagerConfiguration-4001W|\
{0}|\
null|\
Operation Failed with Exception
-managerConfiguration=\
- managerConfiguration-FAILED-5001W|\
+REQUEST_FAILED_managerConfiguration=\
+ REQUEST-FAILED-managerConfiguration-4001W|\
{0}|\
null|\
Operation Failed with Exception
-managerOperation=\
- managerOperation-FAILED-5001W|\
+REQUEST_FAILED_managerOperation=\
+ REQUEST-FAILED-managerOperation-4001W|\
{0}|\
null|\
Operation Failed with Exception
-updateConfigurationFromPolicy=\
- updateConfigurationFromPolicy-FAILED-5001W|\
+REQUEST_FAILED_updateConfigurationFromPolicy=\
+ REQUEST-FAILED-updateConfigurationFromPolicy-4001W|\
{0}|\
null|\
Operation Failed with Exception
-runHealthTests=\
- runHealthTests-FAILED-5001W|\
+REQUEST_FAILED_runHealthTests=\
+ REQUEST-FAILED-runHealthTests-4001W|\
{0}|\
null|\
Operation Failed with Exception
-updateDeploymentStatus=\
- updateDeploymentStatus-FAILED-5001W|\
+REQUEST_FAILED_updateDeploymentStatus=\
+ REQUEST-FAILED-updateDeploymentStatus-4001W|\
{0}|\
null|\
Operation Failed with Exception
-REMOTE_deploy=\
- REMOTE-deploy-FAILED-5001W|\
+REMOTE_CALL_FAILED_deploy=\
+ REMOTE-CALL-FAILED-deploy-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_undeploy=\
- REMOTE-undeploy-FAILED-5001W|\
+REMOTE_CALL_FAILED_undeploy=\
+ REMOTE-CALL-FAILED-undeploy-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_test=\
- REMOTE-test-FAILED-5001W|\
+REMOTE_CALL_FAILED_test=\
+ REMOTE-CALL-FAILED-test-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_suspend=\
- REMOTE-suspend-FAILED-5001W|\
+REMOTE_CALL_FAILED_suspend=\
+ REMOTE-CALL-FAILED-suspend-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_resume=\
- REMOTE-resume-FAILED-5001W|\
+REMOTE_CALL_FAILED_resume=\
+ REMOTE-CALL-FAILED-resume-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_pushManagerConfiguration=\
- REMOTE-pushManagerConfiguration-FAILED-5001W|\
+REMOTE_CALL_FAILED_pushManagerConfiguration=\
+ REMOTE-CALL-FAILED-pushManagerConfiguration-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_pollManagerConfiguration=\
- REMOTE-pollManagerConfiguration-FAILED-5001W|\
+REMOTE_CALL_FAILED_pollManagerConfiguration=\
+ REMOTE-CALL-FAILED-pollManagerConfiguration-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_managerConfiguration=\
- REMOTE-managerConfiguration-FAILED-5001W|\
+REMOTE_CALL_FAILED_managerConfiguration=\
+ REMOTE-CALL-FAILED-managerConfiguration-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_managerOperation=\
- REMOTE-managerOperation-FAILED-5001W|\
+REMOTE_CALL_FAILED_managerOperation=\
+ REMOTE-CALL-FAILED-managerOperation-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_updateConfigurationFromPolicy=\
- REMOTE-updateConfigurationFromPolicy-FAILED-5001W|\
+REMOTE_CALL_FAILED_updateConfigurationFromPolicy=\
+ REMOTE-CALL-FAILED-updateConfigurationFromPolicy-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_runHealthTests=\
- REMOTE-runHealthTests-FAILED-5001W|\
+REMOTE_CALL_FAILED_runHealthTests=\
+ REMOTE-CALL-FAILED-runHealthTests-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_updateDeploymentStatus=\
- REMOTE-updateDeploymentStatus-FAILED-5001W|\
+REMOTE_CALL_FAILED_updateDeploymentStatus=\
+ REMOTE-CALL-FAILED-updateDeploymentStatus-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceMessageEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceMessageEnum.java
index 65f5139..4a7aaad 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceMessageEnum.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceMessageEnum.java
@@ -1,25 +1,4 @@
-/*-
- * ============LICENSE_START==========================================
- * OPENECOMP - DCAE
- * ===================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END============================================
- */
-
-
package org.openecomp.dcae.controller.platform.servers.controller.logging;
import com.att.eelf.i18n.EELFResourceManager;
@@ -28,32 +7,32 @@ import org.openecomp.logger.EcompMessageEnum;
public enum ControllerVirtualMachineServiceMessageEnum implements EcompMessageEnum {
dummy,
- deploy,
- undeploy,
- test,
- suspend,
- resume,
- pushManagerConfiguration,
- pollManagerConfiguration,
- managerConfiguration,
- managerOperation,
- updateConfigurationFromPolicy,
- runHealthTests,
- updateDeploymentStatus,
- REMOTE_deploy,
- REMOTE_undeploy,
- REMOTE_test,
- REMOTE_suspend,
- REMOTE_resume,
- REMOTE_pushManagerConfiguration,
- REMOTE_pollManagerConfiguration,
- REMOTE_managerConfiguration,
- REMOTE_managerOperation,
- REMOTE_updateConfigurationFromPolicy,
- REMOTE_runHealthTests,
- REMOTE_updateDeploymentStatus;
+ REQUEST_FAILED_deploy,
+ REQUEST_FAILED_undeploy,
+ REQUEST_FAILED_test,
+ REQUEST_FAILED_suspend,
+ REQUEST_FAILED_resume,
+ REQUEST_FAILED_pushManagerConfiguration,
+ REQUEST_FAILED_pollManagerConfiguration,
+ REQUEST_FAILED_managerConfiguration,
+ REQUEST_FAILED_managerOperation,
+ REQUEST_FAILED_updateConfigurationFromPolicy,
+ REQUEST_FAILED_runHealthTests,
+ REQUEST_FAILED_updateDeploymentStatus,
+ REMOTE_CALL_FAILED_deploy,
+ REMOTE_CALL_FAILED_undeploy,
+ REMOTE_CALL_FAILED_test,
+ REMOTE_CALL_FAILED_suspend,
+ REMOTE_CALL_FAILED_resume,
+ REMOTE_CALL_FAILED_pushManagerConfiguration,
+ REMOTE_CALL_FAILED_pollManagerConfiguration,
+ REMOTE_CALL_FAILED_managerConfiguration,
+ REMOTE_CALL_FAILED_managerOperation,
+ REMOTE_CALL_FAILED_updateConfigurationFromPolicy,
+ REMOTE_CALL_FAILED_runHealthTests,
+ REMOTE_CALL_FAILED_updateDeploymentStatus;
static {
- EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.platform.servers.controller.logging.ControllerVirtualMachineService");
+ EELFResourceManager.loadMessageBundle("org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineService");
}
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceOperationEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceOperationEnum.java
index 771b696..90ad7d0 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceOperationEnum.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/ControllerVirtualMachineServiceOperationEnum.java
@@ -1,53 +1,33 @@
-/*-
- * ============LICENSE_START==========================================
- * OPENECOMP - DCAE
- * ===================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END============================================
- */
-
-
package org.openecomp.dcae.controller.platform.servers.controller.logging;
import org.openecomp.entity.EcompOperationEnum;
public enum ControllerVirtualMachineServiceOperationEnum implements EcompOperationEnum {
- deploy,
- undeploy,
- test,
- suspend,
- resume,
- pushManagerConfiguration,
- pollManagerConfiguration,
- managerConfiguration,
- managerOperation,
- updateConfigurationFromPolicy,
- runHealthTests,
- updateDeploymentStatus,
- REMOTE_deploy,
- REMOTE_undeploy,
- REMOTE_test,
- REMOTE_suspend,
- REMOTE_resume,
- REMOTE_pushManagerConfiguration,
- REMOTE_pollManagerConfiguration,
- REMOTE_managerConfiguration,
- REMOTE_managerOperation,
- REMOTE_updateConfigurationFromPolicy,
- REMOTE_runHealthTests,
- REMOTE_updateDeploymentStatus;
+ ControllerVirtualMachineService_deploy("ControllerVirtualMachineService@deploy"),
+ ControllerVirtualMachineService_undeploy("ControllerVirtualMachineService@undeploy"),
+ ControllerVirtualMachineService_test("ControllerVirtualMachineService@test"),
+ ControllerVirtualMachineService_suspend("ControllerVirtualMachineService@suspend"),
+ ControllerVirtualMachineService_resume("ControllerVirtualMachineService@resume"),
+ ControllerVirtualMachineService_pushManagerConfiguration("ControllerVirtualMachineService@pushManagerConfiguration"),
+ ControllerVirtualMachineService_pollManagerConfiguration("ControllerVirtualMachineService@pollManagerConfiguration"),
+ ControllerVirtualMachineService_managerConfiguration("ControllerVirtualMachineService@managerConfiguration"),
+ ControllerVirtualMachineService_managerOperation("ControllerVirtualMachineService@managerOperation"),
+ ControllerVirtualMachineService_updateConfigurationFromPolicy("ControllerVirtualMachineService@updateConfigurationFromPolicy"),
+ ControllerVirtualMachineService_runHealthTests("ControllerVirtualMachineService@runHealthTests"),
+ ControllerVirtualMachineService_updateDeploymentStatus("ControllerVirtualMachineService@updateDeploymentStatus") ;
+
+
+ private String n;
+
+ private ControllerVirtualMachineServiceOperationEnum(String n) {
+ this.n = n;
+ }
+
+ @Override
+ public String toString() {
+ return n;
+ }
+
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeController.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeController.properties
index b8275ac..883027d 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeController.properties
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeController.properties
@@ -1,24 +1,30 @@
HEALTHCHECK_SERVICE_FAILED=\
- DCAE-CONTROLLER-HEALTHCHECK-SERVICE-FAILED-5001W|\
+ HEALTHCHECK-SERVICE-FAILED-5001W|\
{0}|\
Contact Tier 4. This is a software bug.|\
Heath Check on the service level fails.
POLICY_POLLING_FAILED=\
- DCAE-CONTROLLER-POLICY-POLLING-FAILED-5001W|\
+ POLICY-POLLING-FAILED-5001W|\
{0} {1}|\
Contact Tier 4. This is a software bug.|\
Police Polling on the service level fails.
DATABUS_POLLING_FAILED=\
- DCAE-CONTROLLER-DATABUS-POLLING-FAILED-5001W|\
+ DATABUS-POLLING-FAILED-5001W|\
{0}|\
Contact Tier 4. This is a software bug.|\
Databus Polling on the service level fails.
+DATABUS_UNABLE_TO_ADD_STREAM=\
+ DATABUS-UNABLE-TO-ADD-STREAM-5001W|\
+ stream={0} issue={1}|\
+ Verify configuration.|\
+ Unable to find service instance for a stream pub/sub.
+
CLUSTER_DATA_REPLICATION_FAILED=\
- DCAE-CONTROLLER-CLUSTER_DATA_REPLICATION-FAILED-5001W|\
+ CLUSTER-DATA-REPLICATION-FAILED-5001W|\
{0}|\
Contact Tier 4. This is a software bug.|\
Data Replication fails.
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerMessageEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerMessageEnum.java
index f026d66..4233931 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerMessageEnum.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerMessageEnum.java
@@ -1,25 +1,4 @@
-/*-
- * ============LICENSE_START==========================================
- * OPENECOMP - DCAE
- * ===================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END============================================
- */
-
-
package org.openecomp.dcae.controller.platform.servers.controller.logging;
import com.att.eelf.i18n.EELFResourceManager;
@@ -30,9 +9,10 @@ public enum DcaeControllerMessageEnum implements EcompMessageEnum {
HEALTHCHECK_SERVICE_FAILED,
POLICY_POLLING_FAILED,
DATABUS_POLLING_FAILED,
+ DATABUS_UNABLE_TO_ADD_STREAM,
CLUSTER_DATA_REPLICATION_FAILED;
static {
- EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.platform.servers.controller.logging.DcaeController");
+ EELFResourceManager.loadMessageBundle("org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeController");
}
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerOperationEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerOperationEnum.java
index 44c7454..9285d2c 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerOperationEnum.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaeControllerOperationEnum.java
@@ -1,33 +1,25 @@
-/*-
- * ============LICENSE_START==========================================
- * OPENECOMP - DCAE
- * ===================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END============================================
- */
-
-
package org.openecomp.dcae.controller.platform.servers.controller.logging;
import org.openecomp.entity.EcompOperationEnum;
public enum DcaeControllerOperationEnum implements EcompOperationEnum {
- HEALTHCHECK,
- POLICY_POLLING,
- DATABUS_POLLING,
- CLUSTER_DATA_REPLICATION;
+ HEALTHCHECK("HEALTHCHECK"),
+ POLICY_POLLING("POLICY_POLLING"),
+ DATABUS_POLLING("DATABUS_POLLING"),
+ CLUSTER_DATA_REPLICATION("CLUSTER_DATA_REPLICATION") ;
+
+
+ private String n;
+
+ private DcaeControllerOperationEnum(String n) {
+ this.n = n;
+ }
+
+ @Override
+ public String toString() {
+ return n;
+ }
+
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformController.properties b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformController.properties
index a426ec8..10f75f8 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformController.properties
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformController.properties
@@ -1,150 +1,150 @@
dummy=\
- null|\
+ dummy-null|\
null|\
null|\
null
-logs=\
- logs-FAILED-5001W|\
+REQUEST_FAILED_logs=\
+ REQUEST-FAILED-logs-4001W|\
{0}|\
null|\
Operation Failed with Exception
-metrics=\
- metrics-FAILED-5001W|\
+REQUEST_FAILED_metrics=\
+ REQUEST-FAILED-metrics-4001W|\
{0}|\
null|\
Operation Failed with Exception
-properties=\
- properties-FAILED-5001W|\
+REQUEST_FAILED_properties=\
+ REQUEST-FAILED-properties-4001W|\
{0}|\
null|\
Operation Failed with Exception
-uploadInfo=\
- uploadInfo-FAILED-5001W|\
+REQUEST_FAILED_uploadInfo=\
+ REQUEST-FAILED-uploadInfo-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getValues=\
- getValues-FAILED-5001W|\
+REQUEST_FAILED_getValues=\
+ REQUEST-FAILED-getValues-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getValuesAll=\
- getValuesAll-FAILED-5001W|\
+REQUEST_FAILED_getValuesAll=\
+ REQUEST-FAILED-getValuesAll-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getMessages=\
- getMessages-FAILED-5001W|\
+REQUEST_FAILED_getMessages=\
+ REQUEST-FAILED-getMessages-4001W|\
{0}|\
null|\
Operation Failed with Exception
-getRequestLogger=\
- getRequestLogger-FAILED-5001W|\
+REQUEST_FAILED_getRequestLogger=\
+ REQUEST-FAILED-getRequestLogger-4001W|\
{0}|\
null|\
Operation Failed with Exception
-evaluate=\
- evaluate-FAILED-5001W|\
+REQUEST_FAILED_evaluate=\
+ REQUEST-FAILED-evaluate-4001W|\
{0}|\
null|\
Operation Failed with Exception
-update=\
- update-FAILED-5001W|\
+REQUEST_FAILED_update=\
+ REQUEST-FAILED-update-4001W|\
{0}|\
null|\
Operation Failed with Exception
-deployDescriptor=\
- deployDescriptor-FAILED-5001W|\
+REQUEST_FAILED_deployDescriptor=\
+ REQUEST-FAILED-deployDescriptor-4001W|\
{0}|\
null|\
Operation Failed with Exception
-refreshDataBus=\
- refreshDataBus-FAILED-5001W|\
+REQUEST_FAILED_refreshDataBus=\
+ REQUEST-FAILED-refreshDataBus-4001W|\
{0}|\
null|\
Operation Failed with Exception
-REMOTE_logs=\
- REMOTE-logs-FAILED-5001W|\
+REMOTE_CALL_FAILED_logs=\
+ REMOTE-CALL-FAILED-logs-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_metrics=\
- REMOTE-metrics-FAILED-5001W|\
+REMOTE_CALL_FAILED_metrics=\
+ REMOTE-CALL-FAILED-metrics-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_properties=\
- REMOTE-properties-FAILED-5001W|\
+REMOTE_CALL_FAILED_properties=\
+ REMOTE-CALL-FAILED-properties-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_uploadInfo=\
- REMOTE-uploadInfo-FAILED-5001W|\
+REMOTE_CALL_FAILED_uploadInfo=\
+ REMOTE-CALL-FAILED-uploadInfo-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getValues=\
- REMOTE-getValues-FAILED-5001W|\
+REMOTE_CALL_FAILED_getValues=\
+ REMOTE-CALL-FAILED-getValues-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getValuesAll=\
- REMOTE-getValuesAll-FAILED-5001W|\
+REMOTE_CALL_FAILED_getValuesAll=\
+ REMOTE-CALL-FAILED-getValuesAll-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getMessages=\
- REMOTE-getMessages-FAILED-5001W|\
+REMOTE_CALL_FAILED_getMessages=\
+ REMOTE-CALL-FAILED-getMessages-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_getRequestLogger=\
- REMOTE-getRequestLogger-FAILED-5001W|\
+REMOTE_CALL_FAILED_getRequestLogger=\
+ REMOTE-CALL-FAILED-getRequestLogger-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_evaluate=\
- REMOTE-evaluate-FAILED-5001W|\
+REMOTE_CALL_FAILED_evaluate=\
+ REMOTE-CALL-FAILED-evaluate-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_update=\
- REMOTE-update-FAILED-5001W|\
+REMOTE_CALL_FAILED_update=\
+ REMOTE-CALL-FAILED-update-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_deployDescriptor=\
- REMOTE-deployDescriptor-FAILED-5001W|\
+REMOTE_CALL_FAILED_deployDescriptor=\
+ REMOTE-CALL-FAILED-deployDescriptor-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
-REMOTE_refreshDataBus=\
- REMOTE-refreshDataBus-FAILED-5001W|\
+REMOTE_CALL_FAILED_refreshDataBus=\
+ REMOTE-CALL-FAILED-refreshDataBus-4001W|\
{0}|\
null|\
Remote Operation Failed with Exception
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerMessageEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerMessageEnum.java
index 973543f..508aae0 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerMessageEnum.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerMessageEnum.java
@@ -1,25 +1,4 @@
-/*-
- * ============LICENSE_START==========================================
- * OPENECOMP - DCAE
- * ===================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END============================================
- */
-
-
package org.openecomp.dcae.controller.platform.servers.controller.logging;
import com.att.eelf.i18n.EELFResourceManager;
@@ -28,32 +7,32 @@ import org.openecomp.logger.EcompMessageEnum;
public enum DcaePlatformControllerMessageEnum implements EcompMessageEnum {
dummy,
- logs,
- metrics,
- properties,
- uploadInfo,
- getValues,
- getValuesAll,
- getMessages,
- getRequestLogger,
- evaluate,
- update,
- deployDescriptor,
- refreshDataBus,
- REMOTE_logs,
- REMOTE_metrics,
- REMOTE_properties,
- REMOTE_uploadInfo,
- REMOTE_getValues,
- REMOTE_getValuesAll,
- REMOTE_getMessages,
- REMOTE_getRequestLogger,
- REMOTE_evaluate,
- REMOTE_update,
- REMOTE_deployDescriptor,
- REMOTE_refreshDataBus;
+ REQUEST_FAILED_logs,
+ REQUEST_FAILED_metrics,
+ REQUEST_FAILED_properties,
+ REQUEST_FAILED_uploadInfo,
+ REQUEST_FAILED_getValues,
+ REQUEST_FAILED_getValuesAll,
+ REQUEST_FAILED_getMessages,
+ REQUEST_FAILED_getRequestLogger,
+ REQUEST_FAILED_evaluate,
+ REQUEST_FAILED_update,
+ REQUEST_FAILED_deployDescriptor,
+ REQUEST_FAILED_refreshDataBus,
+ REMOTE_CALL_FAILED_logs,
+ REMOTE_CALL_FAILED_metrics,
+ REMOTE_CALL_FAILED_properties,
+ REMOTE_CALL_FAILED_uploadInfo,
+ REMOTE_CALL_FAILED_getValues,
+ REMOTE_CALL_FAILED_getValuesAll,
+ REMOTE_CALL_FAILED_getMessages,
+ REMOTE_CALL_FAILED_getRequestLogger,
+ REMOTE_CALL_FAILED_evaluate,
+ REMOTE_CALL_FAILED_update,
+ REMOTE_CALL_FAILED_deployDescriptor,
+ REMOTE_CALL_FAILED_refreshDataBus;
static {
- EELFResourceManager.loadMessageBundle("org.openecomp.dcae.controller.platform.servers.controller.logging.DcaePlatformController");
+ EELFResourceManager.loadMessageBundle("org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformController");
}
}
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerOperationEnum.java b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerOperationEnum.java
index f5e0562..6fe657d 100644
--- a/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerOperationEnum.java
+++ b/dcae-controller-core/dcae-controller-platform-server/src/main/sirius-gen/org/openecomp/dcae/controller/platform/servers/controller/logging/DcaePlatformControllerOperationEnum.java
@@ -1,53 +1,33 @@
-/*-
- * ============LICENSE_START==========================================
- * OPENECOMP - DCAE
- * ===================================================================
- * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
- * ===================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END============================================
- */
-
-
package org.openecomp.dcae.controller.platform.servers.controller.logging;
import org.openecomp.entity.EcompOperationEnum;
public enum DcaePlatformControllerOperationEnum implements EcompOperationEnum {
- logs,
- metrics,
- properties,
- uploadInfo,
- getValues,
- getValuesAll,
- getMessages,
- getRequestLogger,
- evaluate,
- update,
- deployDescriptor,
- refreshDataBus,
- REMOTE_logs,
- REMOTE_metrics,
- REMOTE_properties,
- REMOTE_uploadInfo,
- REMOTE_getValues,
- REMOTE_getValuesAll,
- REMOTE_getMessages,
- REMOTE_getRequestLogger,
- REMOTE_evaluate,
- REMOTE_update,
- REMOTE_deployDescriptor,
- REMOTE_refreshDataBus;
+ DcaePlatformController_logs("DcaePlatformController@logs"),
+ DcaePlatformController_metrics("DcaePlatformController@metrics"),
+ DcaePlatformController_properties("DcaePlatformController@properties"),
+ DcaePlatformController_uploadInfo("DcaePlatformController@uploadInfo"),
+ DcaePlatformController_getValues("DcaePlatformController@getValues"),
+ DcaePlatformController_getValuesAll("DcaePlatformController@getValuesAll"),
+ DcaePlatformController_getMessages("DcaePlatformController@getMessages"),
+ DcaePlatformController_getRequestLogger("DcaePlatformController@getRequestLogger"),
+ DcaePlatformController_evaluate("DcaePlatformController@evaluate"),
+ DcaePlatformController_update("DcaePlatformController@update"),
+ DcaePlatformController_deployDescriptor("DcaePlatformController@deployDescriptor"),
+ DcaePlatformController_refreshDataBus("DcaePlatformController@refreshDataBus") ;
+
+
+ private String n;
+
+ private DcaePlatformControllerOperationEnum(String n) {
+ this.n = n;
+ }
+
+ @Override
+ public String toString() {
+ return n;
+ }
+
}