diff options
author | Singla, Rajiv (rs153v) <rs153v@att.com> | 2018-08-15 11:46:10 -0400 |
---|---|---|
committer | Singla, Rajiv (rs153v) <rs153v@att.com> | 2018-08-16 11:09:15 -0400 |
commit | 7a2c23b3ad83eab0eed5b990c70a1603447d5ee5 (patch) | |
tree | 24293333fd3cc566c1d77f9c9eedeb034dce9c6c /dcae-analytics/dcae-analytics-test/src | |
parent | 9650bd18f6b88721628ebedac2575b44e1b0028e (diff) |
Standalone TCA with EELF Logger
Issue-ID: DCAEGEN2-633
Change-Id: I4da76b532021c0d6248455e7bd6e77f4614c35a7
Signed-off-by: Singla, Rajiv (rs153v) <rs153v@att.com>
Diffstat (limited to 'dcae-analytics/dcae-analytics-test/src')
42 files changed, 3252 insertions, 0 deletions
diff --git a/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsIT.java b/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsIT.java new file mode 100644 index 0000000..9d11201 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsIT.java @@ -0,0 +1,28 @@ +/* + * ================================================================================ + * Copyright (c) 2018 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.onap.dcae.analytics.test; + +/** + * Base class for all DCAE Analytics Integration Test + * + * @author Rajiv Singla + */ +public class BaseAnalyticsIT extends BaseAnalyticsTest { +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsSpringBootIT.java b/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsSpringBootIT.java new file mode 100644 index 0000000..cef9f89 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsSpringBootIT.java @@ -0,0 +1,32 @@ +/* + * ================================================================================ + * Copyright (c) 2018 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.onap.dcae.analytics.test; + +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit.jupiter.SpringExtension; + +/** + * @author Rajiv Singla + */ +@ExtendWith(SpringExtension.class) +@SpringBootTest +public abstract class BaseAnalyticsSpringBootIT extends BaseAnalyticsIT { +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsTest.java b/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsTest.java new file mode 100644 index 0000000..43cc377 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsTest.java @@ -0,0 +1,464 @@ +/* + * ================================================================================ + * Copyright (c) 2018 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.onap.dcae.analytics.test; + +import static java.nio.file.Files.deleteIfExists; +import static java.nio.file.Files.exists; +import static org.assertj.core.api.Assertions.assertThat; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.ObjectOutputStream; +import java.io.OutputStreamWriter; +import java.lang.invoke.MethodHandles; +import java.lang.reflect.Field; +import java.net.URL; +import java.net.URLClassLoader; +import java.net.URLConnection; +import java.net.URLStreamHandler; +import java.nio.charset.Charset; +import java.nio.file.Paths; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.Arrays; +import java.util.Collections; +import java.util.Map; +import java.util.Optional; +import java.util.function.Function; + +import org.json.JSONException; +import org.skyscreamer.jsonassert.JSONAssert; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Base common test class for all DCAE Analytics Test e.g. unit tests, integration test etc. + * + * @author Rajiv Singla + */ +abstract class BaseAnalyticsTest { + + protected static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + /** + * Asserts if expected Json String and actual Json String contain the same properties ignoring + * property order. Simple String assertion might fail as property order during serialization and deserialization + * is generally non-deterministic. Also proper error message are generated more missing or unexpected + * properties + * + * @param expectedJsonString expected Json String + * @param actualJsonString actual Json String + * + * @throws JSONException Json Exception + */ + public static void assertJson(final String expectedJsonString, final String actualJsonString) throws JSONException { + JSONAssert.assertEquals(expectedJsonString, actualJsonString, true); + } + + /** + * Converts given file location to String + * + * @param fileLocation location of the file which needs to be converted to String + * + * @return Contents of file as string + */ + public static String fromStream(final String fileLocation) { + try (InputStream fileInputStream = asInputStream(fileLocation); + BufferedReader reader = new BufferedReader(new InputStreamReader(fileInputStream, Charset.forName + ("UTF-8")))) { + final StringBuilder result = new StringBuilder(); + final String newLine = System.getProperty("line.separator"); + String line = reader.readLine(); + while (line != null) { + result.append(line).append(newLine); + line = reader.readLine(); + } + return result.toString(); + } catch (IOException e) { + throw new RuntimeException("Unable to get contents for file Location: " + fileLocation, e); + } + } + + /** + * Converts given file location to input stream + * + * @param fileLocation file location + * + * @return input stream of given file location + */ + public static InputStream asInputStream(final String fileLocation) { + final InputStream fileInputStream = + BaseAnalyticsTest.class.getClassLoader().getResourceAsStream(fileLocation); + assertThat(fileInputStream).as("Input File Location must be valid").isNotNull(); + return fileInputStream; + } + + /** + * Checks if object can be serialized properly + * + * @param object input object + * @param callingClass calling class + */ + public static void testSerialization(final Object object, final Class<?> callingClass) { + + final URL location = callingClass.getProtectionDomain().getCodeSource().getLocation(); + final File serializedOutputFile = + new File(location.getPath() + String.format("serialization/%s.ser", object.getClass().getSimpleName())); + try { + // Maybe file already exists try deleting it first + final boolean deleteIfExists = deleteIfExists(Paths.get(serializedOutputFile.getPath())); + + if (deleteIfExists) { + logger.warn("Previous serialization file was overwritten at location: {}", + serializedOutputFile.getPath()); + } + + boolean mkdirs = true; + if (!Paths.get(serializedOutputFile.getParentFile().getPath()).toFile().exists()) { + mkdirs = serializedOutputFile.getParentFile().mkdirs(); + } + if (mkdirs) { + try (FileOutputStream fileOutputStream = new FileOutputStream(serializedOutputFile); + ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream)) { + objectOutputStream.writeObject(object); + logger.debug("Successfully created serialization file at location: {}", serializedOutputFile + .getPath()); + } + } + + } catch (IOException ex) { + throw new IllegalStateException( + String.format("Failed to create location to store serialization file: %s", serializedOutputFile)); + } + } + + /** + * Writes Text to Output file + * + * @param textFileLocation location of text file e.g. textfiles/fileName.json + * @param content file content + * @param callingClass calling class + * + * @throws IOException ioException + */ + public static void writeToOutputTextFile(final String textFileLocation, + final String content, Class<?> callingClass) throws IOException { + final URL location = callingClass.getProtectionDomain().getCodeSource().getLocation(); + final File fileLocation = new File(location.getPath() + textFileLocation); + + // Maybe file already try deleting it first + final boolean deleteIfExists = deleteIfExists(Paths.get(fileLocation.getPath())); + + if (deleteIfExists) { + logger.warn("Previous file will be overwritten at location: {}", fileLocation.getPath()); + } + + boolean mkdirs = true; + if (!exists(Paths.get(fileLocation.getParentFile().getPath()))) { + mkdirs = fileLocation.getParentFile().mkdirs(); + } + if (mkdirs) { + try ( + FileOutputStream fileOutputStream = new FileOutputStream(fileLocation); + OutputStreamWriter outputStream = + new OutputStreamWriter(fileOutputStream, Charset.forName("UTF-8"))) { + outputStream.write(content); + logger.debug("Successfully created text file at location: {}", fileLocation.getPath()); + } + } else { + throw new IllegalStateException( + String.format("Failed to create location to store text file: %s", fileLocation)); + } + + } + + /** + * For testing purposes only sometime we may want to access private fields of underlying + * object to confirm the values are setup correctly. + * This method uses java reflection to get the value to private object in the class + * + * @param object Actual object which has the private field you want to check + * @param fieldName Field name in the Actual Object you want to get the value of + * @param privateFieldClass Type of the private field + * @param <T> Class of Actual Object + * @param <U> Class of private field + * + * @return value of the private field + */ + @SuppressWarnings("unchecked") + public static <T, U> U getPrivateFiledValue(final T object, final String fieldName, + final Class<U> privateFieldClass) { + + final Class<?> objectClass = object.getClass(); + try { + final Field privateField = objectClass.getDeclaredField(fieldName); + try { + + // mark private field to be accessible for testing purposes + AccessController.doPrivileged((PrivilegedAction) () -> { + privateField.setAccessible(true); + return null; + }); + + return privateFieldClass.cast(privateField.get(object)); + + } catch (IllegalAccessException e) { + logger.error("Unable to access field: {}", fieldName); + throw new IllegalStateException(e); + } + } catch (NoSuchFieldException e) { + logger.error("Unable to locate field name: {} in class: {}", fieldName, objectClass.getSimpleName()); + throw new IllegalStateException(e); + } + + } + + /** + * For testing purposes only sometime we may want to print classpath jars which are visible inside the class + * + * @param classLoader classloader of the calling class + */ + public static void dumpClasspath(final ClassLoader classLoader) { + + logger.info("Dumping ClassPath for classloader: {}", classLoader); + + if (classLoader instanceof URLClassLoader) { + + URLClassLoader ucl = (URLClassLoader) classLoader; + logger.info("\t ==========>>>" + Arrays.toString(ucl.getURLs())); + + } else { + logger.info("\t(cannot display components as it is not a URLClassLoader)"); + } + + if (classLoader.getParent() != null) { + dumpClasspath(classLoader.getParent()); + } + } + + /** + * Deserialize given Json file location to given model class and returns it back without any validation check. + * + * @param jsonFileLocation Classpath location of the json file + * @param modelClass Model Class type + * @param <T> Json Model Type + * @param objectMapper Jackson Json Object Mapper + * + * @return Deserialized Model Object + */ + public static <T> T deserializeJsonFileToModel(final String jsonFileLocation, final Class<T> modelClass, + final ObjectMapper objectMapper) { + final InputStream jsonFileInputStream = + BaseAnalyticsTest.class.getClassLoader().getResourceAsStream(jsonFileLocation); + assertThat(jsonFileInputStream).as("Input JSON File location must be valid").isNotNull(); + try { + return objectMapper.readValue(jsonFileInputStream, modelClass); + } catch (IOException ex) { + logger.error("Error while doing assert Json for fileLocation: {}, modelClass: {}, Exception {}", + jsonFileLocation, modelClass, ex); + throw new RuntimeException(ex); + } finally { + try { + jsonFileInputStream.close(); + } catch (IOException e) { + logger.error("Error while closing input stream at file location: {}", jsonFileLocation); + throw new RuntimeException(e); + } + } + } + + /** + * Serialize model to json string + * + * @param model model object + * @param objectMapper Jackson Json Object Mapper + * + * @return json + * + * @throws JsonProcessingException when fails to process object + */ + public static String serializeModelToJson(final Object model, final ObjectMapper objectMapper) throws + JsonProcessingException { + return objectMapper.writeValueAsString(model); + } + + /** + * Converts given model to json string and compare it with json present at given file location. + * + * @param model Model which needs to be compared + * @param expectedJsonFileLocation Location of file containing expected json string + * @param objectMapper Jackson Json Object Mapper + * @param <T> Json Model Type + * + * @return If assertion passes returns the input model + */ + public static <T> T assertJsonSerialization(final T model, final String expectedJsonFileLocation, + final ObjectMapper objectMapper) { + try { + final String actualModelString = serializeModelToJson(model, objectMapper); + final String expectedModelString = fromStream(expectedJsonFileLocation); + assertJson(expectedModelString, actualModelString); + return model; + } catch (IOException | JSONException ex) { + logger.error("Error while doing assert Json serialization Assertion: model: {}, " + + "expected Json File Location: {}, Exception {}", model, expectedJsonFileLocation, ex); + throw new RuntimeException(ex); + } + } + + /** + * Checks both serialization and deserialization. + * <p> + * First checks deserialization and then serialize the deserialized object back to json + * and check if matches the given json file location string + * + * @param jsonFileLocation Classpath location of the json file + * @param modelClass Class type + * @param <T> Json Model Type + * @param objectMapper Jackson Json Object Mapper + * + * @return If assertion passes, returns deserialized object + */ + + public static <T> T assertJsonConversions(final String jsonFileLocation, final Class<T> modelClass, + final ObjectMapper objectMapper) { + //first check deserialization + final T actualValue = deserializeJsonFileToModel(jsonFileLocation, modelClass, objectMapper); + //then check serialization + assertJsonSerialization(actualValue, jsonFileLocation, objectMapper); + + return actualValue; + } + + + public static <T> T assertJsonConversions(final String jsonFileLocation, + final Function<String, Optional<T>> jsonConversionFunction, + final ObjectMapper objectMapper) { + final Optional<T> actualValueOptional = jsonConversionFunction.apply(fromStream(jsonFileLocation)); + assertThat(actualValueOptional).isPresent(); + if (actualValueOptional.isPresent()) { + assertJsonSerialization(actualValueOptional.get(), jsonFileLocation, objectMapper); + return actualValueOptional.get(); + } + return null; + } + + + /** + * Creates a mock URL Stream Handler + * + * @param mockURLConnection mock URL Connection + * + * @return Mock URL Stream Handler + */ + public static URLStreamHandler createMockURLStreamHandler(final URLConnection mockURLConnection) { + return new URLStreamHandler() { + @Override + protected URLConnection openConnection(final URL url) + throws IOException { + return mockURLConnection; + } + }; + } + + /** + * Sets up environment variables for testing purposes + * + * @param testEnvironmentVariables key value map containing test environment variables + * + * @throws ClassNotFoundException class not found exception + * @throws IllegalAccessException illegal access exception + * @throws NoSuchFieldException no such method exception + */ + @SuppressWarnings("unchecked") + protected static void setEnvironmentVariables(final Map<String, String> testEnvironmentVariables) + throws ClassNotFoundException, IllegalAccessException, NoSuchFieldException { + try { + final Class<?> processEnvironmentClass = Class.forName("java.lang.ProcessEnvironment"); + final Field theEnvironmentField = processEnvironmentClass.getDeclaredField("theEnvironment"); + + AccessController.doPrivileged((PrivilegedAction) () -> { + theEnvironmentField.setAccessible(true); + return null; + }); + + final Map<String, String> env = (Map<String, String>) theEnvironmentField.get(null); + env.putAll(testEnvironmentVariables); + Field theCaseInsensitiveEnvironmentField = + processEnvironmentClass.getDeclaredField("theCaseInsensitiveEnvironment"); + AccessController.doPrivileged((PrivilegedAction) () -> { + theCaseInsensitiveEnvironmentField.setAccessible(true); + return null; + }); + Map<String, String> cienv = (Map<String, String>) theCaseInsensitiveEnvironmentField.get(null); + cienv.putAll(testEnvironmentVariables); + } catch (NoSuchFieldException e) { + Class[] classes = Collections.class.getDeclaredClasses(); + Map<String, String> env = System.getenv(); + for (Class cl : classes) { + if ("java.util.Collections$UnmodifiableMap".equals(cl.getName())) { + Field field = cl.getDeclaredField("m"); + AccessController.doPrivileged((PrivilegedAction) () -> { + field.setAccessible(true); + return null; + }); + Object obj = field.get(env); + Map<String, String> map = (Map<String, String>) obj; + map.clear(); + map.putAll(testEnvironmentVariables); + } + } + } + } + + /** + * Contains Locations for various files used for testing purposes + */ + public abstract static class TestFileLocation { + + public static final String CEF_JSON_MESSAGE = "data/json/cef/cef_message.json"; + public static final String CEF_UNESCAPED_MESSAGES = "data/json/cef/cef_unescaped_messages.txt"; + public static final String CEF_JSON_MESSAGE_WITH_VIOLATION = "data/json/cef/cef_message_with_violation.json"; + public static final String CEF_JSON_MESSAGE_WITH_INAPPLICABLE_EVENT_NAME = + "data/json/cef/cef_meesage_with_inapplicable_event_name.json"; + public static final String CEF_JSON_MESSAGE_WITH_ABATEMENT = "data/json/cef/cef_message_with_abatement.json"; + public static final String CEF_JSON_MESSAGES = "data/json/cef/cef_messages.json"; + + public static final String TCA_POLICY_JSON = "data/json/policy/tca_policy.json"; + public static final String TCA_APP_CONFIG_JSON = "data/json/config/tca_app_config.json"; + public static final String TCA_ALERT_JSON = "data/json/facade/tca_alert.json"; + + + public static final String CONFIG_SERVICE_BINDINGS_JSON = + "data/json/configservice/config_service_bindings.json"; + + + public static final String TEST_JSON_MESSAGE = "data/json/test/test_message.json"; + } + + +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsUnitTest.java b/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsUnitTest.java new file mode 100644 index 0000000..554c718 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/java/org/onap/dcae/analytics/test/BaseAnalyticsUnitTest.java @@ -0,0 +1,29 @@ +/* + * ================================================================================ + * Copyright (c) 2018 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.onap.dcae.analytics.test; + +/** + * Base class for all DCAE Analytics Unit Test + * + * @author Rajiv Singla + */ +public class BaseAnalyticsUnitTest extends BaseAnalyticsTest { + +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/config/application-dev.yaml b/dcae-analytics/dcae-analytics-test/src/main/resources/config/application-dev.yaml new file mode 100644 index 0000000..b41ad6a --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/config/application-dev.yaml @@ -0,0 +1,50 @@ +# DEV PROFILE SETTINGS +config-binding-service: + tca: + policy: "{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"Mfvs_eNodeB_RANKPI\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"resource=vFirewall;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":4000,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"},{\"closedLoopControlName\":\"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":20000,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\"},{\"closedLoopControlName\":\"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09\",\"closedLoopEventStatus\":\"ABATED\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"CRITICAL\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"resource=vLoadBalancer;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":500,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"},{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-0C5920A6-B564-8035-C878-0E814352BC2B\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":5000,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\"}]},{\"eventName\":\"virtualVMEventName\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"resource=virtualVM;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":500,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"}]}]}" + processing_batch_size: 10000 + enable_abatement: true + enable_ecomp_logging: false + aai: + enable_enrichment: true + url: "http://localhost:8443" + username: "DCAE" + password: "DCAE" + generic_vnf_path: "aai/v11/network/generic-vnfs/generic-vnf" + node_query_path: "aai/v11/search/nodes-query" + service_calls: + aai_broker_handle: + - "135.205.226.128:32768" + streams_publishes: + tca_handle_out: + type: "message_router" + aaf_username: "USER" + aaf_password: "PASSWORD" + dmaap_info: + client_role: "publisher" + client_id: "tca-pub-0" + location: "ecomp" + topic_url: "http://localhost:8080/events/PubTopic" + streams_subscribes: + tca_handle_in: + type: "message_router" + aaf_username: "USER" + aaf_password : "PASSWORD" + dmaap_info: + client_role: "subscriber" + client_id: "tca-sub-0" + location: "ecomp" + topic_url: "http://localhost:8080/events/SubTopic" + consumer_group: "cg1" + consumer_ids: + - "c0" + - "c1" + message_limit: 50000 + timeout: -1 + polling: + fixed_rate: 0 + auto_adjusting: + min: 30000 + step_up: 10000 + max: 60000 + step_down: 30000 diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/config/application-mongo.yaml b/dcae-analytics/dcae-analytics-test/src/main/resources/config/application-mongo.yaml new file mode 100644 index 0000000..6727518 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/config/application-mongo.yaml @@ -0,0 +1,4 @@ +spring: + data: + mongodb: + uri: "mongodb://localhost:27017/analytics-tca" diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/config/application.yaml b/dcae-analytics/dcae-analytics-test/src/main/resources/config/application.yaml new file mode 100644 index 0000000..9fb2192 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/config/application.yaml @@ -0,0 +1,64 @@ +# SPRING SETTINGS +spring: + application: + name: "dcae-analytics-tca" + main: + banner-mode: "off" + profiles: + active: dev + servlet: + multipart: + # Enable multi part file uploads / download + enabled: true + # Threshold after which files are written to disk. + file-size-threshold: 100KB + # Max file size + max-file-size: 512MB + # Max Request size + max-request-size: 600MB + data: + redis: + repositories: + enabled: false + mongodb: + repositories: + type: none + output: + ansi: + enabled: always + +# ENDPOINTS +management: + endpoint: + health: + show-details: always + shutdown: + enabled: true + endpoints: + web: + exposure: + include: '*' + info: + git: + mode: full + health: + redis: + enabled: false + +# SERVER +server: + port: 9091 + compression: + # Enable gzip compression of response + enabled: true + mime-types: application/json,text/plain + min-response-size: 4096 + http2: + enabled: true + +# LOGGING LEVEL +logging: + file: logs/dcae-anlaytics-tca.log + level: + org: + onap: DEBUG diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/config/bootstrap.yaml b/dcae-analytics/dcae-analytics-test/src/main/resources/config/bootstrap.yaml new file mode 100644 index 0000000..b17d963 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/config/bootstrap.yaml @@ -0,0 +1,4 @@ +spring: + cloud: + config: + enabled: false diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/aai/aai_vnf_enrichment.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/aai/aai_vnf_enrichment.json new file mode 100644 index 0000000..7360427 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/aai/aai_vnf_enrichment.json @@ -0,0 +1,39 @@ +{ + "vnf-id": "63b31229-9a3a-444f-9159-04ce2dca3be9", + "vnf-name": "vCPEInfraVNF13", + "vnf-type": "vCPEInfraService10/vCPEInfraService10 0", + "service-id": "e8cb8968-5411-478b-906a-f28747de72cd", + "prov-status": "PREPROV", + "orchestration-status": "Created", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1504896046185", + "relationship-list": { + "relationship": [ + { + "related-to": "service-instance", + "related-link": "/aai/v11/business/customers/customer/Demonstration3/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/e8feceb6-28ae-480a-bfbc-1985ce333526", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Demonstration3" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "vCPE" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "e8feceb6-28ae-480a-bfbc-1985ce333526" + } + ], + "related-to-property": [ + { + "property-key": "service-instance.service-instance-name", + "property-value": "vCPEInfraSI13" + } + ] + } + ] + } +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/aai/aai_vserver_enrichment.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/aai/aai_vserver_enrichment.json new file mode 100644 index 0000000..45c8df3 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/aai/aai_vserver_enrichment.json @@ -0,0 +1,10 @@ +{ + "vserver-id": "example-vserver-id-val-2", + "vserver-name": "example-vserver-name-val-2", + "vserver-name2": "example-vserver-name2-val-2", + "prov-status": "example-prov-status-val-2", + "vserver-selflink": "example-vserver-selflink-val-2", + "in-maint": true, + "is-closed-loop-disabled": true, + "resource-version": "1504912891060" +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/aai/aai_vserver_resource_data.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/aai/aai_vserver_resource_data.json new file mode 100644 index 0000000..f4a0334 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/aai/aai_vserver_resource_data.json @@ -0,0 +1,8 @@ +{ + "result-data": [ + { + "resource-type": "vserver", + "resource-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/DFW/tenants/tenant/1031120/vservers/vserver/example-vserver-id-val-2" + } + ] +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_meesage_with_inapplicable_event_name.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_meesage_with_inapplicable_event_name.json new file mode 100644 index 0000000..773f7a4 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_meesage_with_inapplicable_event_name.json @@ -0,0 +1,76 @@ +{ + "event": { + "commonEventHeader": { + "domain": "measurementsForVfScaling", + "eventId": "UC1-SCL01081-1492639920787", + "eventName": "testEventName", + "lastEpochMicrosec": 1492639920787, + "nfNamingCode": "ENBE", + "priority": "Normal", + "reportingEntityId": "", + "reportingEntityName": "vtc2e7admn2", + "sequence": 0, + "sourceId": "SCL01081_9B_1", + "sourceName": "SCL01081", + "startEpochMicrosec": 1492639920787, + "version": 3.0 + }, + "measurementsForVfScalingFields": { + "additionalFields": [ + { + "name": "software_version ", + "value": "version1" + }, + { + "name": "vendor ", + "value": "Ericsson " + } + ], + "additionalMeasurements": [ + { + "name": "OaaS_UC1_EricssonSleepingCell", + "arrayOfFields": [ + { + "name": "PMRAATTCBRA", + "value": "1353" + }, + { + "name": "PMRASUCCCBRA", + "value": "1351" + }, + { + "name": "PMCELLDOWNTIMEAUTO", + "value": "0" + }, + { + "name": "PMCELLDOWNTIMEMAN", + "value": "0" + }, + { + "name": "PMRRCCONNESTABATT", + "value": "297" + }, + { + "name": "PMRRCCONNESTABSUCC", + "value": "297" + } + ] + } + ], + "vNicPerformanceArray": [ + { + "receivedBroadcastPacketsAccumulated": 5000, + "receivedBroadcastPacketsDelta": 5, + "receivedDiscardedPacketsAccumulated": 12, + "receivedDiscardedPacketsDelta": 2, + "receivedErrorPacketsAccumulated": 2, + "receivedErrorPacketsDelta": 1, + "valuesAreSuspect": false, + "vNicIdentifier": "someVNicIdentifier" + } + ], + "measurementInterval": 900, + "measurementsForVfScalingVersion": 2.0 + } + } +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_message.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_message.json new file mode 100644 index 0000000..065962d --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_message.json @@ -0,0 +1,76 @@ +{ + "event": { + "commonEventHeader": { + "domain": "measurementsForVfScaling", + "eventId": "UC1-SCL01081-1492639920787", + "eventName": "Mfvs_eNodeB_RANKPI", + "lastEpochMicrosec": 1492639920787, + "nfNamingCode": "ENBE", + "priority": "Normal", + "reportingEntityId": "", + "reportingEntityName": "vtc2e7admn2", + "sequence": 0, + "sourceId": "SCL01081_9B_1", + "sourceName": "SCL01081", + "startEpochMicrosec": 1492639920787, + "version": 3.0 + }, + "measurementsForVfScalingFields": { + "additionalFields": [ + { + "name": "software_version ", + "value": "version1" + }, + { + "name": "vendor ", + "value": "Ericsson " + } + ], + "additionalMeasurements": [ + { + "name": "OaaS_UC1_EricssonSleepingCell", + "arrayOfFields": [ + { + "name": "PMRAATTCBRA", + "value": "1353" + }, + { + "name": "PMRASUCCCBRA", + "value": "1351" + }, + { + "name": "PMCELLDOWNTIMEAUTO", + "value": "0" + }, + { + "name": "PMCELLDOWNTIMEMAN", + "value": "0" + }, + { + "name": "PMRRCCONNESTABATT", + "value": "297" + }, + { + "name": "PMRRCCONNESTABSUCC", + "value": "297" + } + ] + } + ], + "vNicPerformanceArray": [ + { + "receivedBroadcastPacketsAccumulated": 5000, + "receivedBroadcastPacketsDelta": 5, + "receivedDiscardedPacketsAccumulated": 12, + "receivedDiscardedPacketsDelta": 2, + "receivedErrorPacketsAccumulated": 2, + "receivedErrorPacketsDelta": 1, + "valuesAreSuspect": false, + "vNicIdentifier": "someVNicIdentifier" + } + ], + "measurementInterval": 900, + "measurementsForVfScalingVersion": 2.0 + } + } +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_message_with_abatement.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_message_with_abatement.json new file mode 100644 index 0000000..c97df74 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_message_with_abatement.json @@ -0,0 +1,76 @@ +{ + "event": { + "commonEventHeader": { + "domain": "measurementsForVfScaling", + "eventId": "UC1-SCL01081-1492639920787", + "eventName": "Mfvs_eNodeB_RANKPI", + "lastEpochMicrosec": 1492639920787, + "nfNamingCode": "ENBE", + "priority": "Normal", + "reportingEntityId": "", + "reportingEntityName": "vtc2e7admn2", + "sequence": 0, + "sourceId": "SCL01081_9B_1", + "sourceName": "SCL01081", + "startEpochMicrosec": 1492639920787, + "version": 3.0 + }, + "measurementsForVfScalingFields": { + "additionalFields": [ + { + "name": "software_version ", + "value": "version1" + }, + { + "name": "vendor ", + "value": "Ericsson " + } + ], + "additionalMeasurements": [ + { + "name": "OaaS_UC1_EricssonSleepingCell", + "arrayOfFields": [ + { + "name": "PMRAATTCBRA", + "value": "1353" + }, + { + "name": "PMRASUCCCBRA", + "value": "1351" + }, + { + "name": "PMCELLDOWNTIMEAUTO", + "value": "0" + }, + { + "name": "PMCELLDOWNTIMEMAN", + "value": "0" + }, + { + "name": "PMRRCCONNESTABATT", + "value": "297" + }, + { + "name": "PMRRCCONNESTABSUCC", + "value": "297" + } + ] + } + ], + "vNicPerformanceArray": [ + { + "receivedBroadcastPacketsAccumulated": 0, + "receivedBroadcastPacketsDelta": 5, + "receivedDiscardedPacketsAccumulated": 12, + "receivedDiscardedPacketsDelta": 2, + "receivedErrorPacketsAccumulated": 2, + "receivedErrorPacketsDelta": 1, + "valuesAreSuspect": false, + "vNicIdentifier": "someVNicIdentifier" + } + ], + "measurementInterval": 900, + "measurementsForVfScalingVersion": 2.0 + } + } +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_message_with_violation.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_message_with_violation.json new file mode 100644 index 0000000..c85f55b --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_message_with_violation.json @@ -0,0 +1,76 @@ +{ + "event": { + "commonEventHeader": { + "domain": "measurementsForVfScaling", + "eventId": "UC1-SCL01081-1492639920787", + "eventName": "Mfvs_eNodeB_RANKPI", + "lastEpochMicrosec": 1492639920787, + "nfNamingCode": "ENBE", + "priority": "Normal", + "reportingEntityId": "", + "reportingEntityName": "vtc2e7admn2", + "sequence": 0, + "sourceId": "SCL01081_9B_1", + "sourceName": "SCL01081", + "startEpochMicrosec": 1492639920787, + "version": 3.0 + }, + "measurementsForVfScalingFields": { + "additionalFields": [ + { + "name": "software_version ", + "value": "version1" + }, + { + "name": "vendor ", + "value": "Ericsson " + } + ], + "additionalMeasurements": [ + { + "name": "OaaS_UC1_EricssonSleepingCell", + "arrayOfFields": [ + { + "name": "PMRAATTCBRA", + "value": "1353" + }, + { + "name": "PMRASUCCCBRA", + "value": "1351" + }, + { + "name": "PMCELLDOWNTIMEAUTO", + "value": "0" + }, + { + "name": "PMCELLDOWNTIMEMAN", + "value": "0" + }, + { + "name": "PMRRCCONNESTABATT", + "value": "297" + }, + { + "name": "PMRRCCONNESTABSUCC", + "value": "297" + } + ] + } + ], + "vNicPerformanceArray": [ + { + "receivedBroadcastPacketsAccumulated": 21000, + "receivedBroadcastPacketsDelta": 5, + "receivedDiscardedPacketsAccumulated": 12, + "receivedDiscardedPacketsDelta": 2, + "receivedErrorPacketsAccumulated": 2, + "receivedErrorPacketsDelta": 1, + "valuesAreSuspect": false, + "vNicIdentifier": "someVNicIdentifier" + } + ], + "measurementInterval": 900, + "measurementsForVfScalingVersion": 2.0 + } + } +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_messages.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_messages.json new file mode 100644 index 0000000..242ab9d --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_messages.json @@ -0,0 +1,1490 @@ +[ + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/301:fclustr-301:FGroup-308:femto-34179", + "reportingEntityName": "1085190", + "startEpochMicrosec": 1493393250722, + "eventId": "UC2-BRHMALM02001-1493393250722", + "lastEpochMicrosec": 1493393250722, + "priority": "Normal", + "sequence": 0, + "sourceName": "BRHMALM02001", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-4860", + "reportingEntityName": "75160", + "startEpochMicrosec": 1493393250717, + "eventId": "UC2-PTLDORM58217-1493393250717", + "lastEpochMicrosec": 1493393250717, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58217", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-7558", + "reportingEntityName": "96140", + "startEpochMicrosec": 1493393250712, + "eventId": "UC2-PTLDORM58210-1493393250712", + "lastEpochMicrosec": 1493393250712, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58210", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/203:fclustr-203:FGroup-310:femto-37457", + "reportingEntityName": "1373204", + "startEpochMicrosec": 1493393250718, + "eventId": "UC2-BSTNVTM06013-1493393250718", + "lastEpochMicrosec": 1493393250718, + "priority": "Normal", + "sequence": 0, + "sourceName": "BSTNVTM06013", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/203:fclustr-203:FGroup-223:femto-39355", + "reportingEntityName": "1060176", + "startEpochMicrosec": 1493393250721, + "eventId": "UC2-BSTNVTM06103-1493393250721", + "lastEpochMicrosec": 1493393250721, + "priority": "Normal", + "sequence": 0, + "sourceName": "BSTNVTM06103", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/158:fclustr-158:FGroup-28:femto-30166", + "reportingEntityName": "954175", + "startEpochMicrosec": 1493393250720, + "eventId": "UC2-PITBPAM38246-1493393250720", + "lastEpochMicrosec": 1493393250720, + "priority": "Normal", + "sequence": 0, + "sourceName": "PITBPAM38246", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/203:fclustr-203:FGroup-223:femto-33673", + "reportingEntityName": "1060173", + "startEpochMicrosec": 1493393250723, + "eventId": "UC2-BSTNVTM06066-1493393250723", + "lastEpochMicrosec": 1493393250723, + "priority": "Normal", + "sequence": 0, + "sourceName": "BSTNVTM06066", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/3:fclustr-3:FGroup-47:femto-34309", + "reportingEntityName": "1185198", + "startEpochMicrosec": 1493393250724, + "eventId": "UC2-SCRMCNM29032-1493393250724", + "lastEpochMicrosec": 1493393250724, + "priority": "Normal", + "sequence": 0, + "sourceName": "SCRMCNM29032", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-4855", + "reportingEntityName": "75138", + "startEpochMicrosec": 1493393250714, + "eventId": "UC2-PTLDORM58212-1493393250714", + "lastEpochMicrosec": 1493393250714, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58212", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-10466", + "reportingEntityName": "133734", + "startEpochMicrosec": 1493393250715, + "eventId": "UC2-PTLDORM58925-1493393250715", + "lastEpochMicrosec": 1493393250715, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58925", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/201:fclustr-201:FGroup-218:femto-29721", + "reportingEntityName": "844171", + "startEpochMicrosec": 1493393250719, + "eventId": "UC2-NYCMNYM23031-1493393250719", + "lastEpochMicrosec": 1493393250719, + "priority": "Normal", + "sequence": 0, + "sourceName": "NYCMNYM23031", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-4858", + "reportingEntityName": "75137", + "startEpochMicrosec": 1493393250715, + "eventId": "UC2-PTLDORM58215-1493393250715", + "lastEpochMicrosec": 1493393250715, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58215", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-4852", + "reportingEntityName": "75173", + "startEpochMicrosec": 1493393250726, + "eventId": "UC2-PTLDORM58014-1493393250726", + "lastEpochMicrosec": 1493393250726, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58014", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/3:fclustr-3:FGroup-282:femto-36109", + "reportingEntityName": "1085174", + "startEpochMicrosec": 1493393250725, + "eventId": "UC2-SLKCUTM08059-1493393250725", + "lastEpochMicrosec": 1493393250725, + "priority": "Normal", + "sequence": 0, + "sourceName": "SLKCUTM08059", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/3:fclustr-3:FGroup-366:femto-37721", + "reportingEntityName": "1385173", + "startEpochMicrosec": 1493393250720, + "eventId": "UC2-SLKCUTM08083-1493393250720", + "lastEpochMicrosec": 1493393250720, + "priority": "Normal", + "sequence": 0, + "sourceName": "SLKCUTM08083", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/158:fclustr-158:FGroup-105:femto-33105", + "reportingEntityName": "1064173", + "startEpochMicrosec": 1493393250722, + "eventId": "UC2-STLSMOM29030-1493393250722", + "lastEpochMicrosec": 1493393250722, + "priority": "Normal", + "sequence": 0, + "sourceName": "STLSMOM29030", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/152:fclustr-152:FGroup-45:femto-8549", + "reportingEntityName": "165395", + "startEpochMicrosec": 1493393250727, + "eventId": "UC2-MILWWIM04202-1493393250727", + "lastEpochMicrosec": 1493393250727, + "priority": "Normal", + "sequence": 0, + "sourceName": "MILWWIM04202", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/3:fclustr-3:FGroup-42:femto-30554", + "reportingEntityName": "1304171", + "startEpochMicrosec": 1493393250723, + "eventId": "UC2-DNVRCOM04034-1493393250723", + "lastEpochMicrosec": 1493393250723, + "priority": "Normal", + "sequence": 0, + "sourceName": "DNVRCOM04034", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-4856", + "reportingEntityName": "75139", + "startEpochMicrosec": 1493393250714, + "eventId": "UC2-PTLDORM58213-1493393250714", + "lastEpochMicrosec": 1493393250714, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58213", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-4862", + "reportingEntityName": "75158", + "startEpochMicrosec": 1493393250718, + "eventId": "UC2-PTLDORM58219-1493393250718", + "lastEpochMicrosec": 1493393250718, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58219", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-9407", + "reportingEntityName": "114953", + "startEpochMicrosec": 1493393250713, + "eventId": "UC2-PTLDORM58211-1493393250713", + "lastEpochMicrosec": 1493393250713, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58211", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/252:fclustr-252:FGroup-141:femto-36114", + "reportingEntityName": "1253171", + "startEpochMicrosec": 1493393250721, + "eventId": "UC2-BLTMMDM00025-1493393250721", + "lastEpochMicrosec": 1493393250721, + "priority": "Normal", + "sequence": 0, + "sourceName": "BLTMMDM00025", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-4861", + "reportingEntityName": "75159", + "startEpochMicrosec": 1493393250718, + "eventId": "UC2-PTLDORM58218-1493393250718", + "lastEpochMicrosec": 1493393250718, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58218", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/203:fclustr-203:FGroup-309:femto-37456", + "reportingEntityName": "1373227", + "startEpochMicrosec": 1493393250717, + "eventId": "UC2-BSTNVTM06011-1493393250717", + "lastEpochMicrosec": 1493393250717, + "priority": "Normal", + "sequence": 0, + "sourceName": "BSTNVTM06011", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-4859", + "reportingEntityName": "75166", + "startEpochMicrosec": 1493393250716, + "eventId": "UC2-PTLDORM58216-1493393250716", + "lastEpochMicrosec": 1493393250716, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58216", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/251:fclustr-251:FGroup-50:femto-11763", + "reportingEntityName": "165383", + "startEpochMicrosec": 1493393250724, + "eventId": "UC2-BLTMMDM00367-1493393250724", + "lastEpochMicrosec": 1493393250724, + "priority": "Normal", + "sequence": 0, + "sourceName": "BLTMMDM00367", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-4857", + "reportingEntityName": "75142", + "startEpochMicrosec": 1493393250714, + "eventId": "UC2-PTLDORM58214-1493393250714", + "lastEpochMicrosec": 1493393250714, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58214", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-70:femto-10465", + "reportingEntityName": "133740", + "startEpochMicrosec": 1493393250716, + "eventId": "UC2-PTLDORM58924-1493393250716", + "lastEpochMicrosec": 1493393250716, + "priority": "Normal", + "sequence": 0, + "sourceName": "PTLDORM58924", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/53:fclustr-53:FGroup-165:femto-32607", + "reportingEntityName": "977200", + "startEpochMicrosec": 1493393250726, + "eventId": "UC2-LSANCLM30038-1493393250726", + "lastEpochMicrosec": 1493393250726, + "priority": "Normal", + "sequence": 0, + "sourceName": "LSANCLM30038", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/53:fclustr-53:FGroup-165:femto-32555", + "reportingEntityName": "977174", + "startEpochMicrosec": 1493393250725, + "eventId": "UC2-LSANCLM30037-1493393250725", + "lastEpochMicrosec": 1493393250725, + "priority": "Normal", + "sequence": 0, + "sourceName": "LSANCLM30037", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + }, + { + "event": { + "measurementsForVfScalingFields": { + "measurementInterval": 600, + "additionalMeasurements": [ + { + "arrayOfFields": [ + { + "name": "BS_Reset_Needed", + "value": "1" + } + ], + "name": "OaaS_UC2_ALUMetrocellBackhaul" + } + ], + "measurementsForVfScalingVersion": 2.0, + "additionalFields": [ + { + "name": "software_version", + "value": "" + }, + { + "name": "vendor", + "value": "ALU" + }, + { + "name": "datetime", + "value": "" + } + ] + }, + "commonEventHeader": { + "nfNamingCode": "MEAP", + "version": 3.0, + "sourceId": "network:FemtoCluster\/1:fclustr-1:FGroup-14:femto-5578", + "reportingEntityName": "70120", + "startEpochMicrosec": 1493393250720, + "eventId": "UC2-DNVRCOM04230-1493393250720", + "lastEpochMicrosec": 1493393250720, + "priority": "Normal", + "sequence": 0, + "sourceName": "DNVRCOM04230", + "domain": "measurementsForVfScaling", + "eventName": "Mfvs_eNodeB_RANKPI", + "reportingEntityId": "" + } + } + } +] diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_unescaped_messages.txt b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_unescaped_messages.txt new file mode 100644 index 0000000..b7811b4 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/cef/cef_unescaped_messages.txt @@ -0,0 +1,12 @@ +[ + "{\"event\":{\"measurementsForVfScalingFields\":{\"measurementInterval\":900,\"additionalMeasurements\":[{\"arrayOfFields\":[{\"name\":\"PMRAATTCBRA\",\"value\":\"40000\"},{\"name\":\"PMRASUCCCBRA\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEAUTO\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEMAN\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABATT\",\"value\":\"18\"},{\"name\":\"PMRRCCONNESTABSUCC\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABFAILCELLLATENCY\",\"value\":\"0\"}],\"name\":\"OaaS_UC1_EricssonSleepingCell\"}],\"measurementsForVfScalingVersion\":2,\"additionalFields\":[{\"name\":\"software_version\",\"value\":\"CXP102051/24_R27CU\"},{\"name\":\"vendor\",\"value\":\"Ericsson\"},{\"name\":\"datetime\",\"value\":\"2017-05-0907:15:00.0\"}]},\"commonEventHeader\":{\"sourcename\":\"LALss103esig27\",\"nfNamingCode\":\"ENBE\",\"sourceId\":\"LAL01402_7S_1_DB_sig27rvsc\",\"version\":3,\"startEpochMicrosec\":1497290419742,\"eventId\":\"UC1-LAL01402-1494357632010\",\"lastEpochMicrosec\":1504910555000,\"sequence\":0,\"priority\":\"Normal\",\"domain\":\"measurementsForVfScaling\",\"reportingEntityId\":\"2001:506:4409:c2e8::11:3016:2\",\"reportingEntityname\":\"hou1e1ss103esig27\",\"eventName\":\"Mfvs_eNodeB_RANKPI\"}}}", + "{\"event\":{\"measurementsForVfScalingFields\":{\"measurementInterval\":900,\"additionalMeasurements\":[{\"arrayOfFields\":[{\"name\":\"PMRAATTCBRA\",\"value\":\"40000\"},{\"name\":\"PMRASUCCCBRA\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEAUTO\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEMAN\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABATT\",\"value\":\"18\"},{\"name\":\"PMRRCCONNESTABSUCC\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABFAILCELLLATENCY\",\"value\":\"0\"}],\"name\":\"OaaS_UC1_EricssonSleepingCell\"}],\"measurementsForVfScalingVersion\":2,\"additionalFields\":[{\"name\":\"software_version\",\"value\":\"CXP102051/24_R27CU\"},{\"name\":\"vendor\",\"value\":\"Ericsson\"},{\"name\":\"datetime\",\"value\":\"2017-05-0907:15:00.0\"}]},\"commonEventHeader\":{\"sourcename\":\"LALss103esig27\",\"nfNamingCode\":\"ENBE\",\"sourceId\":\"LAL01402_7S_1_DB_sig27rvsc\",\"version\":3,\"startEpochMicrosec\":1497290419742,\"eventId\":\"UC1-LAL01402-1494357632010\",\"lastEpochMicrosec\":1504910555000,\"sequence\":0,\"priority\":\"Normal\",\"domain\":\"measurementsForVfScaling\",\"reportingEntityId\":\"2001:506:4409:c2e8::11:3016:2\",\"reportingEntityname\":\"hou1e1ss103esig27\",\"eventName\":\"Mfvs_eNodeB_RANKPI\"}}}", + "{\"event\":{\"measurementsForVfScalingFields\":{\"measurementInterval\":900,\"additionalMeasurements\":[{\"arrayOfFields\":[{\"name\":\"PMRAATTCBRA\",\"value\":\"40000\"},{\"name\":\"PMRASUCCCBRA\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEAUTO\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEMAN\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABATT\",\"value\":\"18\"},{\"name\":\"PMRRCCONNESTABSUCC\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABFAILCELLLATENCY\",\"value\":\"0\"}],\"name\":\"OaaS_UC1_EricssonSleepingCell\"}],\"measurementsForVfScalingVersion\":2,\"additionalFields\":[{\"name\":\"software_version\",\"value\":\"CXP102051/24_R27CU\"},{\"name\":\"vendor\",\"value\":\"Ericsson\"},{\"name\":\"datetime\",\"value\":\"2017-05-0907:15:00.0\"}]},\"commonEventHeader\":{\"sourcename\":\"LALss103esig27\",\"nfNamingCode\":\"ENBE\",\"sourceId\":\"LAL01402_7S_1_DB_sig27rvsc\",\"version\":3,\"startEpochMicrosec\":1497290419742,\"eventId\":\"UC1-LAL01402-1494357632010\",\"lastEpochMicrosec\":1504910555000,\"sequence\":0,\"priority\":\"Normal\",\"domain\":\"measurementsForVfScaling\",\"reportingEntityId\":\"2001:506:4409:c2e8::11:3016:2\",\"reportingEntityname\":\"hou1e1ss103esig27\",\"eventName\":\"Mfvs_eNodeB_RANKPI\"}}}", + "{\"event\":{\"measurementsForVfScalingFields\":{\"measurementInterval\":900,\"additionalMeasurements\":[{\"arrayOfFields\":[{\"name\":\"PMRAATTCBRA\",\"value\":\"40000\"},{\"name\":\"PMRASUCCCBRA\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEAUTO\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEMAN\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABATT\",\"value\":\"18\"},{\"name\":\"PMRRCCONNESTABSUCC\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABFAILCELLLATENCY\",\"value\":\"0\"}],\"name\":\"OaaS_UC1_EricssonSleepingCell\"}],\"measurementsForVfScalingVersion\":2,\"additionalFields\":[{\"name\":\"software_version\",\"value\":\"CXP102051/24_R27CU\"},{\"name\":\"vendor\",\"value\":\"Ericsson\"},{\"name\":\"datetime\",\"value\":\"2017-05-0907:15:00.0\"}]},\"commonEventHeader\":{\"sourcename\":\"LALss103esig27\",\"nfNamingCode\":\"ENBE\",\"sourceId\":\"LAL01402_7S_1_DB_sig27rvsc\",\"version\":3,\"startEpochMicrosec\":1497290419742,\"eventId\":\"UC1-LAL01402-1494357632010\",\"lastEpochMicrosec\":1504910555000,\"sequence\":0,\"priority\":\"Normal\",\"domain\":\"measurementsForVfScaling\",\"reportingEntityId\":\"2001:506:4409:c2e8::11:3016:2\",\"reportingEntityname\":\"hou1e1ss103esig27\",\"eventName\":\"Mfvs_eNodeB_RANKPI\"}}}", + "{\"event\":{\"measurementsForVfScalingFields\":{\"measurementInterval\":900,\"additionalMeasurements\":[{\"arrayOfFields\":[{\"name\":\"PMRAATTCBRA\",\"value\":\"40000\"},{\"name\":\"PMRASUCCCBRA\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEAUTO\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEMAN\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABATT\",\"value\":\"18\"},{\"name\":\"PMRRCCONNESTABSUCC\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABFAILCELLLATENCY\",\"value\":\"0\"}],\"name\":\"OaaS_UC1_EricssonSleepingCell\"}],\"measurementsForVfScalingVersion\":2,\"additionalFields\":[{\"name\":\"software_version\",\"value\":\"CXP102051/24_R27CU\"},{\"name\":\"vendor\",\"value\":\"Ericsson\"},{\"name\":\"datetime\",\"value\":\"2017-05-0907:15:00.0\"}]},\"commonEventHeader\":{\"sourcename\":\"LALss103esig27\",\"nfNamingCode\":\"ENBE\",\"sourceId\":\"LAL01402_7S_1_DB_sig27rvsc\",\"version\":3,\"startEpochMicrosec\":1497290419742,\"eventId\":\"UC1-LAL01402-1494357632010\",\"lastEpochMicrosec\":1504910555000,\"sequence\":0,\"priority\":\"Normal\",\"domain\":\"measurementsForVfScaling\",\"reportingEntityId\":\"2001:506:4409:c2e8::11:3016:2\",\"reportingEntityname\":\"hou1e1ss103esig27\",\"eventName\":\"Mfvs_eNodeB_RANKPI\"}}}", + "{\"event\":{\"measurementsForVfScalingFields\":{\"measurementInterval\":900,\"additionalMeasurements\":[{\"arrayOfFields\":[{\"name\":\"PMRAATTCBRA\",\"value\":\"40000\"},{\"name\":\"PMRASUCCCBRA\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEAUTO\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEMAN\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABATT\",\"value\":\"18\"},{\"name\":\"PMRRCCONNESTABSUCC\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABFAILCELLLATENCY\",\"value\":\"0\"}],\"name\":\"OaaS_UC1_EricssonSleepingCell\"}],\"measurementsForVfScalingVersion\":2,\"additionalFields\":[{\"name\":\"software_version\",\"value\":\"CXP102051/24_R27CU\"},{\"name\":\"vendor\",\"value\":\"Ericsson\"},{\"name\":\"datetime\",\"value\":\"2017-05-0907:15:00.0\"}]},\"commonEventHeader\":{\"sourcename\":\"LALss103esig27\",\"nfNamingCode\":\"ENBE\",\"sourceId\":\"LAL01402_7S_1_DB_sig27rvsc\",\"version\":3,\"startEpochMicrosec\":1497290419742,\"eventId\":\"UC1-LAL01402-1494357632010\",\"lastEpochMicrosec\":1504910555000,\"sequence\":0,\"priority\":\"Normal\",\"domain\":\"measurementsForVfScaling\",\"reportingEntityId\":\"2001:506:4409:c2e8::11:3016:2\",\"reportingEntityname\":\"hou1e1ss103esig27\",\"eventName\":\"Mfvs_eNodeB_RANKPI\"}}}", + "{\"event\":{\"measurementsForVfScalingFields\":{\"measurementInterval\":900,\"additionalMeasurements\":[{\"arrayOfFields\":[{\"name\":\"PMRAATTCBRA\",\"value\":\"40000\"},{\"name\":\"PMRASUCCCBRA\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEAUTO\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEMAN\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABATT\",\"value\":\"18\"},{\"name\":\"PMRRCCONNESTABSUCC\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABFAILCELLLATENCY\",\"value\":\"0\"}],\"name\":\"OaaS_UC1_EricssonSleepingCell\"}],\"measurementsForVfScalingVersion\":2,\"additionalFields\":[{\"name\":\"software_version\",\"value\":\"CXP102051/24_R27CU\"},{\"name\":\"vendor\",\"value\":\"Ericsson\"},{\"name\":\"datetime\",\"value\":\"2017-05-0907:15:00.0\"}]},\"commonEventHeader\":{\"sourcename\":\"LALss103esig27\",\"nfNamingCode\":\"ENBE\",\"sourceId\":\"LAL01402_7S_1_DB_sig27rvsc\",\"version\":3,\"startEpochMicrosec\":1497290419742,\"eventId\":\"UC1-LAL01402-1494357632010\",\"lastEpochMicrosec\":1504910555000,\"sequence\":0,\"priority\":\"Normal\",\"domain\":\"measurementsForVfScaling\",\"reportingEntityId\":\"2001:506:4409:c2e8::11:3016:2\",\"reportingEntityname\":\"hou1e1ss103esig27\",\"eventName\":\"Mfvs_eNodeB_RANKPI\"}}}", + "{\"event\":{\"measurementsForVfScalingFields\":{\"measurementInterval\":900,\"additionalMeasurements\":[{\"arrayOfFields\":[{\"name\":\"PMRAATTCBRA\",\"value\":\"40000\"},{\"name\":\"PMRASUCCCBRA\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEAUTO\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEMAN\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABATT\",\"value\":\"18\"},{\"name\":\"PMRRCCONNESTABSUCC\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABFAILCELLLATENCY\",\"value\":\"0\"}],\"name\":\"OaaS_UC1_EricssonSleepingCell\"}],\"measurementsForVfScalingVersion\":2,\"additionalFields\":[{\"name\":\"software_version\",\"value\":\"CXP102051/24_R27CU\"},{\"name\":\"vendor\",\"value\":\"Ericsson\"},{\"name\":\"datetime\",\"value\":\"2017-05-0907:15:00.0\"}]},\"commonEventHeader\":{\"sourcename\":\"LALss103esig27\",\"nfNamingCode\":\"ENBE\",\"sourceId\":\"LAL01402_7S_1_DB_sig27rvsc\",\"version\":3,\"startEpochMicrosec\":1497290419742,\"eventId\":\"UC1-LAL01402-1494357632010\",\"lastEpochMicrosec\":1504910555000,\"sequence\":0,\"priority\":\"Normal\",\"domain\":\"measurementsForVfScaling\",\"reportingEntityId\":\"2001:506:4409:c2e8::11:3016:2\",\"reportingEntityname\":\"hou1e1ss103esig27\",\"eventName\":\"Mfvs_eNodeB_RANKPI\"}}}", + "{\"event\":{\"measurementsForVfScalingFields\":{\"measurementInterval\":900,\"additionalMeasurements\":[{\"arrayOfFields\":[{\"name\":\"PMRAATTCBRA\",\"value\":\"40000\"},{\"name\":\"PMRASUCCCBRA\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEAUTO\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEMAN\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABATT\",\"value\":\"18\"},{\"name\":\"PMRRCCONNESTABSUCC\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABFAILCELLLATENCY\",\"value\":\"0\"}],\"name\":\"OaaS_UC1_EricssonSleepingCell\"}],\"measurementsForVfScalingVersion\":2,\"additionalFields\":[{\"name\":\"software_version\",\"value\":\"CXP102051/24_R27CU\"},{\"name\":\"vendor\",\"value\":\"Ericsson\"},{\"name\":\"datetime\",\"value\":\"2017-05-0907:15:00.0\"}]},\"commonEventHeader\":{\"sourcename\":\"LALss103esig27\",\"nfNamingCode\":\"ENBE\",\"sourceId\":\"LAL01402_7S_1_DB_sig27rvsc\",\"version\":3,\"startEpochMicrosec\":1497290419742,\"eventId\":\"UC1-LAL01402-1494357632010\",\"lastEpochMicrosec\":1504910555000,\"sequence\":0,\"priority\":\"Normal\",\"domain\":\"measurementsForVfScaling\",\"reportingEntityId\":\"2001:506:4409:c2e8::11:3016:2\",\"reportingEntityname\":\"hou1e1ss103esig27\",\"eventName\":\"Mfvs_eNodeB_RANKPI\"}}}", + "{\"event\":{\"measurementsForVfScalingFields\":{\"measurementInterval\":900,\"additionalMeasurements\":[{\"arrayOfFields\":[{\"name\":\"PMRAATTCBRA\",\"value\":\"40000\"},{\"name\":\"PMRASUCCCBRA\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEAUTO\",\"value\":\"0\"},{\"name\":\"PMCELLDOWNTIMEMAN\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABATT\",\"value\":\"18\"},{\"name\":\"PMRRCCONNESTABSUCC\",\"value\":\"0\"},{\"name\":\"PMRRCCONNESTABFAILCELLLATENCY\",\"value\":\"0\"}],\"name\":\"OaaS_UC1_EricssonSleepingCell\"}],\"measurementsForVfScalingVersion\":2,\"additionalFields\":[{\"name\":\"software_version\",\"value\":\"CXP102051/24_R27CU\"},{\"name\":\"vendor\",\"value\":\"Ericsson\"},{\"name\":\"datetime\",\"value\":\"2017-05-0907:15:00.0\"}]},\"commonEventHeader\":{\"sourcename\":\"LALss103esig27\",\"nfNamingCode\":\"ENBE\",\"sourceId\":\"LAL01402_7S_1_DB_sig27rvsc\",\"version\":3,\"startEpochMicrosec\":1497290419742,\"eventId\":\"UC1-LAL01402-1494357632010\",\"lastEpochMicrosec\":1504910555000,\"sequence\":0,\"priority\":\"Normal\",\"domain\":\"measurementsForVfScaling\",\"reportingEntityId\":\"2001:506:4409:c2e8::11:3016:2\",\"reportingEntityname\":\"hou1e1ss103esig27\",\"eventName\":\"Mfvs_eNodeB_RANKPI\"}}}" +] diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/config/tca_app_config.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/config/tca_app_config.json new file mode 100644 index 0000000..6a3b0fa --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/config/tca_app_config.json @@ -0,0 +1,57 @@ +{ + "application.name": "dcae-analytics", + "application.description": "DCAE Analytics Threshold Crossing Alert Application", + "application.tca_policy": "{}", + "application.tca_batch_size": 10000, + "streams_subscribes.tca_handle_in.consumer_group": "cg1", + "streams_subscribes.tca_handle_in.consumer_ids[0]": "c0", + "streams_subscribes.tca_handle_in.consumer_ids[1]": "c1", + "streams_subscribes.tca_handle_in.message_limit": 50000, + "streams_subscribes.tca_handle_in.timeout": -1, + "streams_subscribes.tca_handle_in.polling.fixed_rate": 0, + "streams_subscribes.tca_handle_in.polling.auto_adjusting.min": 30000, + "streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up": 20000, + "streams_subscribes.tca_handle_in.polling.auto_adjusting.max": 60000, + "streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down": 40000, + "service_calls": { + "aai_broker_handle": [ + "135.205.226.128:32768" + ] + }, + "streams_publishes": { + "tca_handle_out": { + "type": "message_router", + "aaf_username": "USER", + "aaf_password": "PASSWORD", + "dmaap_info": { + "client_role": "publisher", + "client_id": "tca-pub-0", + "location": "ecomp", + "topic_url": "http://localhost:8080/events/PubTopic" + } + } + }, + "streams_subscribes": { + "tca_handle_in": { + "type": "message_router", + "aaf_username": "USER", + "aaf_password": "PASSWORD", + "dmaap_info": { + "client_role": "subscriber", + "client_id": "tca-sub-0", + "location": "ecomp", + "topic_url": "http://localhost:8080/events/SubTopic" + } + } + }, + "spring": { + "main": { + "banner-mode": "off" + }, + "data": { + "mongodb": { + "uri": "mongodb://localhost:27017/analytics-tca" + } + } + } +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/configservice/config_service_bindings.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/configservice/config_service_bindings.json new file mode 100644 index 0000000..43b01f8 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/configservice/config_service_bindings.json @@ -0,0 +1,26 @@ +[ + { + "ID": "81bc2a17-8cfa-3f6f-30a9-a545a9b6ac2f", + "Node": "zldcrdm5bdcc2dokr00", + "Address": "135.25.108.161", + "Datacenter": "zldcrdm5bdcc2", + "TaggedAddresses": { + "lan": "135.25.108.161", + "wan": "135.25.108.161" + }, + "NodeMeta": { + "fqdn": "zldcrdm5bdcc2dokr00.2f3fb3.rdm5b.tci.att.com" + }, + "ServiceID": "20299a144716:config_binding_service:10000", + "ServiceName": "config_binding_service", + "ServiceTags": [ + "config_binding_service", + "no-op" + ], + "ServiceAddress": "135.25.108.161", + "ServicePort": 32769, + "ServiceEnableTagOverride": false, + "CreateIndex": 2991593, + "ModifyIndex": 2997835 + } +] diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/dmaap/dmaap_config.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/dmaap/dmaap_config.json new file mode 100644 index 0000000..d0d304b --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/dmaap/dmaap_config.json @@ -0,0 +1,68 @@ +{ + "dmaap_subscribers": [ + { + "id": "subscriber1", + "type": "message_router", + "url": "https://HOSTNAME:3905/events/DcaeTestVESSub1", + "username": "username", + "password": "password", + "message_limit": -1, + "timeout": 30000, + "consumer_group": "cg1", + "consumers": [ + "c1", + "c2" + ], + "polling_strategy": { + "fixedRate": 30000 + }, + "proxy_url": "https//user:password@proxyhost:proxyport" + }, + { + "id": "subscriber2", + "type": "message_router", + "url": "https://HOSTNAME:3905/events/DcaeTestVESSub2", + "username": "username", + "password": "password", + "message_limit": 50000, + "timeout": 30000, + "consumer_group": "cg2", + "consumers": [ + "c1", + "c2" + ], + "polling_strategy": { + "auto_adjusting": { + "minimum": 20000, + "step_up": 20000, + "maximum": 120000, + "step_down": 100000 + } + } + } + ], + "dmaap_publishers": [ + { + "id": "publisher1", + "type": "message_router", + "url": "https://HOSTNAME:3905/events/DcaeTestVESPub1", + "username": "username", + "password": "password", + "batching": { + "enabled": true, + "maximum_messages": 10, + "maximum_time": 20000 + } + }, + { + "id": "publisher2", + "type": "message_router", + "url": "https://HOSTNAME:3905/events/DcaeTestVESPub1", + "username": "username", + "password": "password", + "batching": { + "enabled": false + } + } + ] +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/facade/tca_alert.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/facade/tca_alert.json new file mode 100644 index 0000000..b7c70c1 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/facade/tca_alert.json @@ -0,0 +1,18 @@ +{ + "closedLoopControlName": "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8", + "version": "1.0.2", + "requestID": "0138afac-b032-4e4b-bd30-88260f444888", + "closedLoopAlarmStart": 1478189220547, + "closedLoopEventClient": "tca.instance00001", + "target_type": "VNF", + "target": "generic-vnf.vnf-name", + "AAI": { + "generic-vnf.vnf-name": "vpp-test(?)", + "vserver.vserver-name": "dfw1lb01lb01" + }, + "from": "DCAE", + "policyScope": "resource=vFirewall;type=configuration", + "policyName": "configuration.dcae.microservice.tca.xml", + "policyVersion": "v0.0.1", + "closedLoopEventStatus": "ONSET" +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/policy/tca_policy.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/policy/tca_policy.json new file mode 100644 index 0000000..e2560bd --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/policy/tca_policy.json @@ -0,0 +1,86 @@ +{ + "domain": "measurementsForVfScaling", + "metricsPerEventName": [ + { + "eventName": "Mfvs_eNodeB_RANKPI", + "controlLoopSchemaType": "VNF", + "policyScope": "resource=vFirewall;type=configuration", + "policyName": "configuration.dcae.microservice.tca.xml", + "policyVersion": "v0.0.1", + "thresholds": [ + { + "closedLoopControlName": "CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8", + "closedLoopEventStatus": "ONSET", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "thresholdValue": 4000, + "direction": "LESS_OR_EQUAL", + "severity": "MAJOR" + }, + { + "closedLoopControlName": "CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09", + "closedLoopEventStatus": "ONSET", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "thresholdValue": 20000, + "direction": "GREATER_OR_EQUAL", + "severity": "CRITICAL" + }, + { + "closedLoopControlName": "CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09", + "closedLoopEventStatus": "ABATED", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "thresholdValue": 0, + "direction": "EQUAL", + "severity": "CRITICAL" + } + ] + }, + { + "eventName": "vLoadBalancer", + "controlLoopSchemaType": "VNF", + "policyScope": "resource=vLoadBalancer;type=configuration", + "policyName": "configuration.dcae.microservice.tca.xml", + "policyVersion": "v0.0.1", + "thresholds": [ + { + "closedLoopControlName": "CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A", + "closedLoopEventStatus": "ONSET", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "thresholdValue": 500, + "direction": "LESS_OR_EQUAL", + "severity": "MAJOR" + }, + { + "closedLoopControlName": "CL-LBAL-LOW-TRAFFIC-SIG-0C5920A6-B564-8035-C878-0E814352BC2B", + "closedLoopEventStatus": "ONSET", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "thresholdValue": 5000, + "direction": "GREATER_OR_EQUAL", + "severity": "CRITICAL" + } + ] + }, + { + "eventName": "virtualVMEventName", + "controlLoopSchemaType": "VM", + "policyScope": "resource=virtualVM;type=configuration", + "policyName": "configuration.dcae.microservice.tca.xml", + "policyVersion": "v0.0.1", + "thresholds": [ + { + "closedLoopControlName": "CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A", + "closedLoopEventStatus": "ONSET", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "thresholdValue": 500, + "direction": "LESS_OR_EQUAL", + "severity": "MAJOR" + } + ] + } + ] +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/test/test_message.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/test/test_message.json new file mode 100644 index 0000000..54e7c8b --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/json/test/test_message.json @@ -0,0 +1,8 @@ +[ + { + "test": "message 1 from cg1 c1" + }, + { + "test": "message 2 from cg1 c1" + } +] diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/properties/tca_controller_policy.properties b/dcae-analytics/dcae-analytics-test/src/main/resources/data/properties/tca_controller_policy.properties new file mode 100644 index 0000000..f4633c2 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/properties/tca_controller_policy.properties @@ -0,0 +1,68 @@ +# +# ================================================================================ +# Copyright (c) 2018 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========================================================= +# +# +subscriberContentType=application/json +subscriberConsumerId=c12 +subscriberConsumerGroup=OpenDCAE-c12 +subscriberTimeoutMS=-1 +subscriberMessageLimit=-1 +subscriberPollingInterval=20000 +publisherContentType=application/json +publisherMaxBatchSize=10 +publisherMaxRecoveryQueueSize=100000 +publisherPollingInterval=20000 +enableAlertCEFFormat=false +domain=measurementsForVfScaling +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.policy.eventName=Mfvs_eNodeB_RANKPI +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.policyName=configuration.dcae.microservice.tca.xml +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.policyVersion=v0.0.1 +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.policyScope=resource=Mfvs_eNodeB_RANKPI;type=configuration +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.controlLoopSchemaType=VNF +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.0.policy.closedLoopControlName=CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8 +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.0.policy.fieldPath=$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.0.policy.thresholdValue=4000 +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.0.policy.direction=LESS_OR_EQUAL +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.0.policy.severity=MAJOR +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.0.policy.version=1.0.2 +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.0.policy.closedLoopEventStatus=ONSET +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.1.policy.closedLoopControlName=L-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09 +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.1.policy.fieldPath=$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.1.policy.thresholdValue=20000 +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.1.policy.direction=GREATER_OR_EQUAL +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.1.policy.severity=CRITICAL +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.1.policy.version=1.0.2 +configuration.violatedMetricsPerEventName.Mfvs_eNodeB_RANKPI.thresholds.1.policy.closedLoopEventStatus=ONSET +configuration.violatedMetricsPerEventName.vLoadBalancer.policy.eventName=vLoadBalancer +configuration.violatedMetricsPerEventName.vLoadBalancer.policyName=configuration.dcae.microservice.tca.xml +configuration.violatedMetricsPerEventName.vLoadBalancer.policyVersion=v0.0.1 +configuration.violatedMetricsPerEventName.vLoadBalancer.policyScope=resource=vLoadBalancer;type=configuration +configuration.violatedMetricsPerEventName.vLoadBalancer.controlLoopSchemaType=VNF +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.0.policy.closedLoopControlName=CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.0.policy.fieldPath=$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.0.policy.thresholdValue=500 +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.0.policy.direction=LESS_OR_EQUAL +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.0.policy.severity=MAJOR +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.0.policy.version=1.0.2 +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.0.policy.closedLoopEventStatus=ONSET +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.1.policy.closedLoopControlName=CL-LBAL-LOW-TRAFFIC-SIG-0C5920A6-B564-8035-C878-0E814352BC2B +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.1.policy.fieldPath=$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.1.policy.thresholdValue=5000 +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.1.policy.direction=GREATER_OR_EQUAL +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.1.policy.severity=CRITICAL +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.1.policy.version=1.0.2 +configuration.violatedMetricsPerEventName.vLoadBalancer.thresholds.1.policy.closedLoopEventStatus=ONSET diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/properties/tca_controller_policy_from_json.properties b/dcae-analytics/dcae-analytics-test/src/main/resources/data/properties/tca_controller_policy_from_json.properties new file mode 100644 index 0000000..22216a6 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/properties/tca_controller_policy_from_json.properties @@ -0,0 +1,41 @@ +# +# ================================================================================ +# Copyright (c) 2018 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========================================================= +# +# +subscriberContentType=application/json +subscriberConsumerId=c12 +subscriberConsumerGroup=OpenDCAE-c12 +subscriberTimeoutMS=-1 +subscriberMessageLimit=-1 +subscriberPollingInterval=20000 +publisherContentType=application/json +publisherMaxBatchSize=10 +publisherMaxRecoveryQueueSize=100000 +publisherPollingInterval=20000 +enableAlertCEFFormat=false +enableAAIEnrichment=true +aaiEnrichmentHost=209.61.160.97 +aaiEnrichmentPortNumber=8443 +aaiEnrichmentProtocol=https +aaiEnrichmentUserName=DCAE +aaiEnrichmentUserPassword=DCAE +aaiEnrichmentIgnoreSSLCertificateErrors=true +aaiVNFEnrichmentAPIPath=/aai/v11/network/generic-vnfs/generic-vnf +aaiVMEnrichmentAPIPath=/aai/v11/search/nodes-query +aaiEnrichmentProxyURL=http://username:password@proxyhost.com:8080 +tca_policy={\"domain\":\"measurementsForVfScaling\",\"violatedMetricsPerEventName\":[{\"eventName\":\"Mfvs_eNodeB_RANKPI\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"resource=vFirewall;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":4000,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"},{\"closedLoopControlName\":\"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":20000,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"resource=vLoadBalancer;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":500,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"},{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-0C5920A6-B564-8035-C878-0E814352BC2B\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":5000,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\"}]}]} + diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-aai-vnf-enrichment.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-aai-vnf-enrichment.json new file mode 100644 index 0000000..f19143c --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-aai-vnf-enrichment.json @@ -0,0 +1,39 @@ +{ + "vnf-id": "63b31229-9a3a-444f-9159-04ce2dca3be9", + "vnf-name": "SCL01081", + "vnf-type": "vCPEInfraService10/vCPEInfraService10 0", + "service-id": "e8cb8968-5411-478b-906a-f28747de72cd", + "prov-status": "PREPROV", + "orchestration-status": "Created", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1504896046185", + "relationship-list": { + "relationship": [ + { + "related-to": "service-instance", + "related-link": "/aai/v11/business/customers/customer/Demonstration3/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/e8feceb6-28ae-480a-bfbc-1985ce333526", + "relationship-data": [ + { + "relationship-key": "customer.global-customer-id", + "relationship-value": "Demonstration3" + }, + { + "relationship-key": "service-subscription.service-type", + "relationship-value": "vCPE" + }, + { + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "e8feceb6-28ae-480a-bfbc-1985ce333526" + } + ], + "related-to-property": [ + { + "property-key": "service-instance.service-instance-name", + "property-value": "vCPEInfraSI13" + } + ] + } + ] + } +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-aai-vserver-enrichment.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-aai-vserver-enrichment.json new file mode 100644 index 0000000..28f13d2 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-aai-vserver-enrichment.json @@ -0,0 +1,10 @@ +{ + "vserver-id": "testVserver", + "vserver-name": "example-vserver-name-val-2", + "vserver-name2": "example-vserver-name2-val-2", + "prov-status": "example-prov-status-val-2", + "vserver-selflink": "example-vserver-selflink-val-2", + "in-maint": true, + "is-closed-loop-disabled": true, + "resource-version": "1504912891060" +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-aai-vserver-resource-data.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-aai-vserver-resource-data.json new file mode 100644 index 0000000..59904f5 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-aai-vserver-resource-data.json @@ -0,0 +1,8 @@ +{ + "result-data": [ + { + "resource-type": "vserver", + "resource-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/DFW/tenants/tenant/1031120/vservers/vserver/testVserver" + } + ] +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-configservice-binding.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-configservice-binding.json new file mode 100644 index 0000000..a3be3f7 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-configservice-binding.json @@ -0,0 +1,26 @@ +[ + { + "ID": "81bc2a17-8cfa-3f6f-30a9-a545a9b6ac2f", + "Node": "zldcrdm5bdcc2dokr00", + "Address": "135.25.108.161", + "Datacenter": "zldcrdm5bdcc2", + "TaggedAddresses": { + "lan": "135.25.108.161", + "wan": "135.25.108.161" + }, + "NodeMeta": { + "fqdn": "zldcrdm5bdcc2dokr00.2f3fb3.rdm5b.tci.att.com" + }, + "ServiceID": "20299a144716:config_binding_service:10000", + "ServiceName": "config_binding_service", + "ServiceTags": [ + "config_binding_service", + "no-op" + ], + "ServiceAddress": "localhost", + "ServicePort": 8080, + "ServiceEnableTagOverride": false, + "CreateIndex": 2991593, + "ModifyIndex": 2997835 + } +] diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-configservice-tca.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-configservice-tca.json new file mode 100644 index 0000000..88d8619 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-configservice-tca.json @@ -0,0 +1,63 @@ +{ + "application.name": "dcae-analytics", + "application.description": "DCAE Analytics Threshold Crossing Alert Application", + "application.tca_policy": "{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"Mfvs_eNodeB_RANKPI\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"resource=vFirewall;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":4000,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"},{\"closedLoopControlName\":\"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":20000,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\"},{\"closedLoopControlName\":\"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09\",\"closedLoopEventStatus\":\"ABATED\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"CRITICAL\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"resource=vLoadBalancer;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":500,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"},{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-0C5920A6-B564-8035-C878-0E814352BC2B\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":5000,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\"}]},{\"eventName\":\"virtualVMEventName\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"resource=virtualVM;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":500,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"}]}]}", + "application.tca_batch_size": 10000, + "streams_subscribes.tca_handle_in.consumer_group": "cg1", + "streams_subscribes.tca_handle_in.consumer_ids[0]": "c0", + "streams_subscribes.tca_handle_in.consumer_ids[1]": "c1", + "streams_subscribes.tca_handle_in.message_limit": 50000, + "streams_subscribes.tca_handle_in.timeout": -1, + "streams_subscribes.tca_handle_in.polling.fixed_rate": 0, + "streams_subscribes.tca_handle_in.polling.auto_adjusting.min": 30000, + "streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up": 20000, + "streams_subscribes.tca_handle_in.polling.auto_adjusting.max": 60000, + "streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down": 40000, + "aai.enable_tca_enrichment": true, + "aai.url": "http://localhost:8443", + "aai.username": "DCAE", + "aai.password": "DCAE", + "aai.generic_vnf_path": "aai/v11/network/generic-vnfs/generic-vnf", + "aai.node_query_path": "aai/v11/search/nodes-query", + "service_calls": { + "aai_broker_handle": [ + "135.205.226.128:32768" + ] + }, + "streams_publishes": { + "tca_handle_out": { + "type": "message_router", + "aaf_username": "USER", + "aaf_password": "PASSWORD", + "dmaap_info": { + "client_role": "publisher", + "client_id": "tca-pub-0", + "location": "ecomp", + "topic_url": "http://localhost:8080/events/PubTopic" + } + } + }, + "streams_subscribes": { + "tca_handle_in": { + "type": "message_router", + "aaf_username": "USER", + "aaf_password": "PASSWORD", + "dmaap_info": { + "client_role": "subscriber", + "client_id": "tca-sub-0", + "location": "ecomp", + "topic_url": "http://localhost:8080/events/SubTopic" + } + } + }, + "spring": { + "main": { + "banner-mode": "off" + }, + "data": { + "mongodb": { + "uri": "mongodb://localhost:27017/analytics-tca" + } + } + } +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-pubTopic.txt b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-pubTopic.txt new file mode 100644 index 0000000..ee6e620 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-pubTopic.txt @@ -0,0 +1 @@ +{"testResponseMessage" : "Accepted messages"} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-subTopic-cg1-c0.txt b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-subTopic-cg1-c0.txt new file mode 100644 index 0000000..0752e5e --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-subTopic-cg1-c0.txt @@ -0,0 +1 @@ +[{"event":{"commonEventHeader":{"domain":"measurementsForVfScaling","eventId":"UC1-SCL01081-1492639920787","eventName":"Mfvs_eNodeB_RANKPI","lastEpochMicrosec":1492639920787,"nfNamingCode":"ENBE","priority":"Normal","reportingEntityId":"","reportingEntityName":"vtc2e7admn2","sequence":0,"sourceId":"SCL01081_9B_1","sourceName":"SCL01081","startEpochMicrosec":1492639920787,"version":3.0},"measurementsForVfScalingFields":{"additionalFields":[{"name":"software_version ","value":"version1"},{"name":"vendor ","value":"Ericsson "}],"additionalMeasurements":[{"name":"OaaS_UC1_EricssonSleepingCell","arrayOfFields":[{"name":"PMRAATTCBRA","value":"1353"},{"name":"PMRASUCCCBRA","value":"1351"},{"name":"PMCELLDOWNTIMEAUTO","value":"0"},{"name":"PMCELLDOWNTIMEMAN","value":"0"},{"name":"PMRRCCONNESTABATT","value":"297"},{"name":"PMRRCCONNESTABSUCC","value":"297"}]}],"vNicPerformanceArray":[{"receivedBroadcastPacketsAccumulated":5000,"receivedBroadcastPacketsDelta":5,"receivedDiscardedPacketsAccumulated":12,"receivedDiscardedPacketsDelta":2,"receivedErrorPacketsAccumulated":2,"receivedErrorPacketsDelta":1,"valuesAreSuspect":false,"vNicIdentifier":"someVNicIdentifier"}],"measurementInterval":900,"measurementsForVfScalingVersion":2.0}}},{"event":{"commonEventHeader":{"domain":"measurementsForVfScaling","eventId":"UC1-SCL01081-1492639920787","eventName":"Mfvs_eNodeB_RANKPI","lastEpochMicrosec":1492639920787,"nfNamingCode":"ENBE","priority":"Normal","reportingEntityId":"","reportingEntityName":"vtc2e7admn2","sequence":0,"sourceId":"SCL01081_9B_1","sourceName":"SCL01081","startEpochMicrosec":1492639920787,"version":3.0},"measurementsForVfScalingFields":{"additionalFields":[{"name":"software_version ","value":"version1"},{"name":"vendor ","value":"Ericsson "}],"additionalMeasurements":[{"name":"OaaS_UC1_EricssonSleepingCell","arrayOfFields":[{"name":"PMRAATTCBRA","value":"1353"},{"name":"PMRASUCCCBRA","value":"1351"},{"name":"PMCELLDOWNTIMEAUTO","value":"0"},{"name":"PMCELLDOWNTIMEMAN","value":"0"},{"name":"PMRRCCONNESTABATT","value":"297"},{"name":"PMRRCCONNESTABSUCC","value":"297"}]}],"vNicPerformanceArray":[{"receivedBroadcastPacketsAccumulated":21000,"receivedBroadcastPacketsDelta":5,"receivedDiscardedPacketsAccumulated":12,"receivedDiscardedPacketsDelta":2,"receivedErrorPacketsAccumulated":2,"receivedErrorPacketsDelta":1,"valuesAreSuspect":false,"vNicIdentifier":"someVNicIdentifier"}],"measurementInterval":900,"measurementsForVfScalingVersion":2.0}}},{"event":{"commonEventHeader":{"domain":"measurementsForVfScaling","eventId":"UC1-SCL01081-1492639920787","eventName":"Mfvs_eNodeB_RANKPI","lastEpochMicrosec":1492639920787,"nfNamingCode":"ENBE","priority":"Normal","reportingEntityId":"","reportingEntityName":"vtc2e7admn2","sequence":0,"sourceId":"SCL01081_9B_1","sourceName":"SCL01081","startEpochMicrosec":1492639920787,"version":3.0},"measurementsForVfScalingFields":{"additionalFields":[{"name":"software_version ","value":"version1"},{"name":"vendor ","value":"Ericsson "}],"additionalMeasurements":[{"name":"OaaS_UC1_EricssonSleepingCell","arrayOfFields":[{"name":"PMRAATTCBRA","value":"1353"},{"name":"PMRASUCCCBRA","value":"1351"},{"name":"PMCELLDOWNTIMEAUTO","value":"0"},{"name":"PMCELLDOWNTIMEMAN","value":"0"},{"name":"PMRRCCONNESTABATT","value":"297"},{"name":"PMRRCCONNESTABSUCC","value":"297"}]}],"vNicPerformanceArray":[{"receivedBroadcastPacketsAccumulated":0,"receivedBroadcastPacketsDelta":5,"receivedDiscardedPacketsAccumulated":12,"receivedDiscardedPacketsDelta":2,"receivedErrorPacketsAccumulated":2,"receivedErrorPacketsDelta":1,"valuesAreSuspect":false,"vNicIdentifier":"someVNicIdentifier"}],"measurementInterval":900,"measurementsForVfScalingVersion":2.0}}},{"event":{"commonEventHeader":{"domain":"measurementsForVfScaling","eventId":"UC1-SCL01081-1492639920787","eventName":"Mfvs_eNodeB_RANKPI","lastEpochMicrosec":1492639920787,"nfNamingCode":"ENBE","priority":"Normal","reportingEntityId":"","reportingEntityName":"vtc2e7admn2","sequence":0,"sourceId":"SCL01081_9B_1","sourceName":"SCL01081","startEpochMicrosec":1492639920787,"version":3.0},"measurementsForVfScalingFields":{"additionalFields":[{"name":"software_version ","value":"version1"},{"name":"vendor ","value":"Ericsson "}],"additionalMeasurements":[{"name":"OaaS_UC1_EricssonSleepingCell","arrayOfFields":[{"name":"PMRAATTCBRA","value":"1353"},{"name":"PMRASUCCCBRA","value":"1351"},{"name":"PMCELLDOWNTIMEAUTO","value":"0"},{"name":"PMCELLDOWNTIMEMAN","value":"0"},{"name":"PMRRCCONNESTABATT","value":"297"},{"name":"PMRRCCONNESTABSUCC","value":"297"}]}],"vNicPerformanceArray":[{"receivedBroadcastPacketsAccumulated":0,"receivedBroadcastPacketsDelta":5,"receivedDiscardedPacketsAccumulated":12,"receivedDiscardedPacketsDelta":2,"receivedErrorPacketsAccumulated":2,"receivedErrorPacketsDelta":1,"valuesAreSuspect":false,"vNicIdentifier":"someVNicIdentifier"}],"measurementInterval":900,"measurementsForVfScalingVersion":2.0}}},{"event":{"commonEventHeader":{"domain":"measurementsForVfScaling","eventId":"UC1-SCL01081-1492639920787","eventName":"virtualVMEventName","lastEpochMicrosec":1492639920787,"nfNamingCode":"ENBE","priority":"Normal","reportingEntityId":"","reportingEntityName":"vtc2e7admn2","sequence":0,"sourceId":"testVserver","sourceName":"testVserver","startEpochMicrosec":1492639920787,"version":3.0},"measurementsForVfScalingFields":{"additionalFields":[{"name":"software_version ","value":"version1"},{"name":"vendor ","value":"Ericsson "}],"additionalMeasurements":[{"name":"OaaS_UC1_EricssonSleepingCell","arrayOfFields":[{"name":"PMRAATTCBRA","value":"1353"},{"name":"PMRASUCCCBRA","value":"1351"},{"name":"PMCELLDOWNTIMEAUTO","value":"0"},{"name":"PMCELLDOWNTIMEMAN","value":"0"},{"name":"PMRRCCONNESTABATT","value":"297"},{"name":"PMRRCCONNESTABSUCC","value":"297"}]}],"vNicPerformanceArray":[{"receivedBroadcastPacketsAccumulated":200,"receivedBroadcastPacketsDelta":5,"receivedDiscardedPacketsAccumulated":12,"receivedDiscardedPacketsDelta":2,"receivedErrorPacketsAccumulated":2,"receivedErrorPacketsDelta":1,"valuesAreSuspect":false,"vNicIdentifier":"someVNicIdentifier"}],"measurementInterval":900,"measurementsForVfScalingVersion":2.0}}}] diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-subTopic-cg1-c1.txt b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-subTopic-cg1-c1.txt new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/__files/body-subTopic-cg1-c1.txt @@ -0,0 +1 @@ +[]
\ No newline at end of file diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-aai-vnf-enrichment.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-aai-vnf-enrichment.json new file mode 100644 index 0000000..f2869e9 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-aai-vnf-enrichment.json @@ -0,0 +1,21 @@ +{ + "id": "e4a02fea-17d7-3090-a443-56384f45c101", + "request": { + "url": "/aai/v11/network/generic-vnfs/generic-vnf?vnf-name=SCL01081", + "method": "GET" + }, + "response": { + "status": 200, + "bodyFileName": "body-aai-vnf-enrichment.json", + "headers": { + "Date": "Tue, 12 Dec 2017 02:54:22 GMT", + "Server": "Apache/2.2.22", + "Vary": "Accept-Encoding", + "Keep-Alive": "timeout=5, max=100", + "Connection": "Keep-Alive", + "Transfer-Encoding": "chunked", + "Content-Type": "application/json;charset=UTF-8" + } + }, + "uuid": "e4a02fea-17d7-3090-a443-56384f45c101" +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-aai-vserver-enrichment.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-aai-vserver-enrichment.json new file mode 100644 index 0000000..1ad6192 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-aai-vserver-enrichment.json @@ -0,0 +1,21 @@ +{ + "id": "e4a02fea-17d7-3090-a443-56384f45c101", + "request": { + "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/DFW/tenants/tenant/1031120/vservers/vserver/testVserver", + "method": "GET" + }, + "response": { + "status": 200, + "bodyFileName": "body-aai-vserver-enrichment.json", + "headers": { + "Date": "Tue, 12 Dec 2017 02:54:22 GMT", + "Server": "Apache/2.2.22", + "Vary": "Accept-Encoding", + "Keep-Alive": "timeout=5, max=100", + "Connection": "Keep-Alive", + "Transfer-Encoding": "chunked", + "Content-Type": "application/json;charset=UTF-8" + } + }, + "uuid": "e4a02fea-17d7-3090-a443-56384f45c101" +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-aai-vserver-resource-data.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-aai-vserver-resource-data.json new file mode 100644 index 0000000..764c32f --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-aai-vserver-resource-data.json @@ -0,0 +1,21 @@ +{ + "id": "e4a02fea-17d7-3090-a443-56384f45c101", + "request": { + "url": "/aai/v11/search/nodes-query?search-node-type=vserver&filter=vserver-name:EQUALS:testVserver", + "method": "GET" + }, + "response": { + "status": 200, + "bodyFileName": "body-aai-vserver-resource-data.json", + "headers": { + "Date": "Tue, 12 Dec 2017 02:54:22 GMT", + "Server": "Apache/2.2.22", + "Vary": "Accept-Encoding", + "Keep-Alive": "timeout=5, max=100", + "Connection": "Keep-Alive", + "Transfer-Encoding": "chunked", + "Content-Type": "application/json;charset=UTF-8" + } + }, + "uuid": "e4a02fea-17d7-3090-a443-56384f45c101" +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-configservice-binding.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-configservice-binding.json new file mode 100644 index 0000000..454292c --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-configservice-binding.json @@ -0,0 +1,17 @@ +{ + "id": "e4a02fea-17d7-3090-a443-56384f45c111", + "request": { + "url": "/v1/catalog/service/config_binding_service", + "method": "GET" + }, + "response": { + "status": 200, + "bodyFileName": "body-configservice-binding.json", + "headers": { + "Content-Type": "application/json", + "Server": "Apache/2.2.22", + "Date": "Tue, 02 Jan 2018 19:13:42 GMT" + } + }, + "uuid": "e4a02fea-17d7-3090-a443-56384f45c111" +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-configservice-tca.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-configservice-tca.json new file mode 100644 index 0000000..de528d8 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-configservice-tca.json @@ -0,0 +1,17 @@ +{ + "id": "e4a02fea-17d7-3090-a443-56384f45c111", + "request": { + "url": "/service_component/tca_dev", + "method": "GET" + }, + "response": { + "status": 200, + "bodyFileName": "body-configservice-tca.json", + "headers": { + "Content-Type": "application/json", + "Server": "Apache/2.2.22", + "Date": "Tue, 02 Jan 2018 19:13:42 GMT" + } + }, + "uuid": "e4a02fea-17d7-3090-a443-56384f45c111" +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-pubTopic.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-pubTopic.json new file mode 100644 index 0000000..9613803 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-pubTopic.json @@ -0,0 +1,21 @@ +{ + "id": "e4a02fea-17d7-3090-a443-56384f45c102", + "request": { + "url": "/events/PubTopic", + "method": "POST" + }, + "response": { + "status": 200, + "bodyFileName": "body-pubTopic.txt", + "headers": { + "Date": "Tue, 12 Dec 2017 02:54:22 GMT", + "Server": "Apache/2.2.22", + "Vary": "Accept-Encoding", + "Keep-Alive": "timeout=5, max=100", + "Connection": "Keep-Alive", + "Transfer-Encoding": "chunked", + "Content-Type": "application/json;charset=UTF-8" + } + }, + "uuid": "e4a02fea-17d7-3090-a443-56384f45c102" +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-subTopic-cg1-c0.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-subTopic-cg1-c0.json new file mode 100644 index 0000000..f6795a7 --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-subTopic-cg1-c0.json @@ -0,0 +1,21 @@ +{ + "id": "e4a02fea-17d7-3090-a443-56384f45c101", + "request": { + "url": "/events/SubTopic/cg1/c0", + "method": "GET" + }, + "response": { + "status": 200, + "bodyFileName": "body-subTopic-cg1-c0.txt", + "headers": { + "Date": "Tue, 12 Dec 2017 02:54:22 GMT", + "Server": "Apache/2.2.22", + "Vary": "Accept-Encoding", + "Keep-Alive": "timeout=5, max=100", + "Connection": "Keep-Alive", + "Transfer-Encoding": "chunked", + "Content-Type": "application/json;charset=UTF-8" + } + }, + "uuid": "e4a02fea-17d7-3090-a443-56384f45c101" +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-subTopic-cg1-c1.json b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-subTopic-cg1-c1.json new file mode 100644 index 0000000..0411f5d --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/data/wiremock/mappings/mapping-subTopic-cg1-c1.json @@ -0,0 +1,21 @@ +{ + "id": "e4a02fea-17d7-3090-a443-56384f45c101", + "request": { + "url": "/events/SubTopic/cg1/c1", + "method": "GET" + }, + "response": { + "status": 500, + "bodyFileName": "body-subTopic-cg1-c1.txt", + "headers": { + "Date": "Tue, 12 Dec 2017 02:54:22 GMT", + "Server": "Apache/2.2.22", + "Vary": "Accept-Encoding", + "Keep-Alive": "timeout=5, max=100", + "Connection": "Keep-Alive", + "Transfer-Encoding": "chunked", + "Content-Type": "application/json;charset=UTF-8" + } + }, + "uuid": "e4a02fea-17d7-3090-a443-56384f45c101" +} diff --git a/dcae-analytics/dcae-analytics-test/src/main/resources/logback-test.xml b/dcae-analytics/dcae-analytics-test/src/main/resources/logback-test.xml new file mode 100644 index 0000000..d35cf8b --- /dev/null +++ b/dcae-analytics/dcae-analytics-test/src/main/resources/logback-test.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + ~ ================================================================================ + ~ Copyright (c) 2018 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========================================================= + ~ + --> +<configuration debug="false"> + + <include resource="org/springframework/boot/logging/logback/defaults.xml"/> + <include resource="org/springframework/boot/logging/logback/console-appender.xml"/> + + <logger name="org.onap.dcae.analytics" level="DEBUG"/> + + <root level="INFO"> + <appender-ref ref="CONSOLE"/> + </root> + +</configuration> + |