aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructorTest.java82
-rw-r--r--src/test/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyAttributesConstructorTest.java10
-rw-r--r--src/test/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfigurationTest.java28
-rw-r--r--src/test/java/org/onap/clamp/clds/it/CldsDictionaryServiceItCase.java161
-rw-r--r--src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java25
-rw-r--r--src/test/java/org/onap/clamp/clds/it/CldsToscaServiceItCase.java138
-rw-r--r--src/test/java/org/onap/clamp/clds/it/PolicyClientItCase.java290
-rw-r--r--src/test/java/org/onap/clamp/clds/it/PolicyConfigurationItCase.java71
-rw-r--r--src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java125
-rw-r--r--src/test/java/org/onap/clamp/clds/it/SdcReqItCase.java23
-rw-r--r--src/test/java/org/onap/clamp/clds/it/config/CldsReferencePropertiesItCase.java17
-rw-r--r--src/test/java/org/onap/clamp/clds/it/config/SdcControllersConfigurationItCase.java16
-rw-r--r--src/test/java/org/onap/clamp/clds/it/sdc/controller/SdcSingleControllerItCase.java108
-rw-r--r--src/test/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfoTest.java100
-rw-r--r--src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTest.java54
-rw-r--r--src/test/java/org/onap/clamp/clds/util/JacksonUtilsTest.java33
-rw-r--r--src/test/resources/application.properties14
-rw-r--r--src/test/resources/clds/camel/routes/flexible-flow.xml61
-rw-r--r--src/test/resources/clds/templates/dcae-decode-service_ids.json20
-rw-r--r--src/test/resources/clds/templates/ui-alarm-default.json597
-rw-r--r--src/test/resources/example/dao/bpmn-prop.json74
-rw-r--r--src/test/resources/example/json-editor-schema/tca-policy-json-editor-schema.json115
-rw-r--r--src/test/resources/example/model-properties/tca_new/model-bpmn.json21
-rw-r--r--src/test/resources/example/sdc/sdcAlarmsList.csv12
-rw-r--r--src/test/resources/example/sdc/sdcCVFCResourceExample.json2
-rw-r--r--src/test/resources/example/sdc/sdcCVFCResources.json2
-rw-r--r--src/test/resources/example/sdc/sdcCinderVolume.json2
-rw-r--r--src/test/resources/example/sdc/sdcResourceDetailsExample.json2
-rw-r--r--src/test/resources/example/sdc/sdcSecurityRules.json2
-rw-r--r--src/test/resources/example/sdc/sdcServiceDetailsExample.json34
-rw-r--r--src/test/resources/example/sdc/sdcVFCGenericWithAlarms.json2
-rw-r--r--src/test/resources/example/sdc/sdcVFCResourceExample.json2
-rw-r--r--src/test/resources/example/sdc/sdcVFResources.json28
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.file2
-rw-r--r--src/test/resources/http-cache/example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.file2
-rwxr-xr-xsrc/test/resources/http-cache/start_http_cache.sh2
-rwxr-xr-xsrc/test/resources/http-cache/third_party_proxy.py403
-rw-r--r--src/test/resources/https/https-test.properties4
-rw-r--r--src/test/resources/tosca/tca-policy-test.yaml80
-rw-r--r--src/test/resources/tosca/tosca_example.yaml80
54 files changed, 1793 insertions, 1079 deletions
diff --git a/src/test/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructorTest.java b/src/test/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructorTest.java
new file mode 100644
index 00000000..f1634567
--- /dev/null
+++ b/src/test/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructorTest.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2018 Nokia 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.clamp.clds.client.req.policy;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import org.assertj.core.api.Assertions;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.clamp.clds.model.properties.ModelProperties;
+import org.onap.clamp.clds.model.properties.Policy;
+import org.onap.clamp.clds.model.properties.PolicyChain;
+import org.onap.clamp.clds.model.properties.PolicyItem;
+import org.onap.clamp.clds.util.ResourceFileUtil;
+import org.onap.policy.api.AttributeType;
+import org.onap.policy.controlloop.policy.builder.BuilderException;
+
+public class GuardPolicyAttributesConstructorTest {
+
+ private static final String CONTROL_NAME = "ClosedLoop-d4629aee-970f-11e8-86c9-02552dda865e";
+ private ModelProperties modelProperties;
+ private List<PolicyChain> policyChains;
+
+ @Before
+ public void setUp() throws Exception {
+ String modelProp = ResourceFileUtil
+ .getResourceAsString("example/model-properties/tca_new/model-properties.json");
+ String modelBpmnJson = ResourceFileUtil.getResourceAsString("example/model-properties/tca_new/model-bpmn.json");
+ modelProperties = new ModelProperties("CLAMPDemoVFW_v1_0_3af8daec-6f10-4027-a3540", CONTROL_NAME, "PUT", false,
+ modelBpmnJson, modelProp);
+
+ policyChains = modelProperties.getType(Policy.class).getPolicyChains();
+ }
+
+ @Test
+ public void testRequestAttributes() throws IOException, BuilderException {
+ List<PolicyItem> policyItemsList = GuardPolicyAttributesConstructor
+ .getAllPolicyGuardsFromPolicyChain(policyChains.get(0));
+
+ Assertions.assertThat(policyItemsList.size()).isEqualTo(1);
+
+ // Test first entry
+ Map<AttributeType, Map<String, String>> requestAttributes = GuardPolicyAttributesConstructor
+ .formatAttributes(modelProperties, policyItemsList.get(0));
+
+ Assertions.assertThat(requestAttributes).containsKeys(AttributeType.MATCHING);
+ Map<String, String> ruleParameters = requestAttributes.get(AttributeType.MATCHING);
+ Assertions.assertThat(ruleParameters).contains(Assertions.entry(GuardPolicyAttributesConstructor.ACTOR, "APPC"),
+ Assertions.entry(GuardPolicyAttributesConstructor.RECIPE, "restart"),
+ Assertions.entry(GuardPolicyAttributesConstructor.TARGETS, ".*"),
+ Assertions.entry(GuardPolicyAttributesConstructor.CLNAME,
+ modelProperties.getControlNameAndPolicyUniqueId()),
+ Assertions.entry(GuardPolicyAttributesConstructor.LIMIT, "1"),
+ Assertions.entry(GuardPolicyAttributesConstructor.TIME_WINDOW, "10"),
+ Assertions.entry(GuardPolicyAttributesConstructor.TIME_UNITS, "minute"),
+ Assertions.entry(GuardPolicyAttributesConstructor.GUARD_ACTIVE_START, "00:00:01-05:00"),
+ Assertions.entry(GuardPolicyAttributesConstructor.GUARD_ACTIVE_END, "00:00:00-05:00"));
+ }
+}
diff --git a/src/test/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyAttributesConstructorTest.java b/src/test/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyAttributesConstructorTest.java
index a6a209a1..293f0e62 100644
--- a/src/test/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyAttributesConstructorTest.java
+++ b/src/test/java/org/onap/clamp/clds/client/req/policy/OperationalPolicyAttributesConstructorTest.java
@@ -77,7 +77,7 @@ public class OperationalPolicyAttributesConstructorTest {
// then
Assertions.assertThat(requestAttributes).containsKeys(AttributeType.MATCHING, AttributeType.RULE);
Assertions.assertThat(requestAttributes.get(AttributeType.MATCHING))
- .contains(Assertions.entry(OperationalPolicyAttributesConstructor.CONTROLLER, "amsterdam"));
+ .contains(Assertions.entry(OperationalPolicyAttributesConstructor.CONTROLLER, "amsterdam"));
Map<String, String> ruleParameters = requestAttributes.get(AttributeType.RULE);
Assertions.assertThat(ruleParameters).containsExactly(
@@ -97,8 +97,8 @@ public class OperationalPolicyAttributesConstructorTest {
// given
ClampProperties mockClampProperties = createMockClampProperties(
ImmutableMap.<String, String>builder().put("op.templateName", "ClosedLoopControlName")
- .put("op.operationTopic", "APPP-CL").put("op.notificationTopic", "POLICY-CL-MGT")
- .put("op.controller", "amsterdam").put("op.recipeTopic", "APPC").build());
+ .put("op.operationTopic", "APPP-CL").put("op.notificationTopic", "POLICY-CL-MGT")
+ .put("op.controller", "amsterdam").put("op.recipeTopic", "APPC").build());
Policy expectedPolicy = new Policy("6f76ad0b-ea9d-4a92-8d7d-6a6367ce2c77", "healthCheck Policy",
"healthCheck Policy - the trigger (no parent) policy - created by CLDS", "APPC", null,
@@ -112,7 +112,7 @@ public class OperationalPolicyAttributesConstructorTest {
// then
Assertions.assertThat(requestAttributes).containsKeys(AttributeType.MATCHING, AttributeType.RULE);
Assertions.assertThat(requestAttributes.get(AttributeType.MATCHING))
- .contains(Assertions.entry("controller", "amsterdam"));
+ .contains(Assertions.entry("controller", "amsterdam"));
Map<String, String> ruleParameters = requestAttributes.get(AttributeType.RULE);
Assertions.assertThat(ruleParameters).contains(
@@ -127,7 +127,7 @@ public class OperationalPolicyAttributesConstructorTest {
Assertions.assertThat(controlLoopPolicy.getControlLoop().getControlLoopName()).isEqualTo(CONTROL_NAME);
Assertions.assertThat(controlLoopPolicy.getPolicies()).usingElementComparatorIgnoringFields("id")
- .containsExactly(expectedPolicy);
+ .containsExactly(expectedPolicy);
}
private ClampProperties createMockClampProperties(ImmutableMap<String, String> propertiesMap) {
diff --git a/src/test/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfigurationTest.java b/src/test/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfigurationTest.java
index 1a162127..3f0a078b 100644
--- a/src/test/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfigurationTest.java
+++ b/src/test/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfigurationTest.java
@@ -1,15 +1,15 @@
/*-
* ============LICENSE_START=======================================================
- * ONAP - SO
+ * ONAP CLAMP
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,14 +24,11 @@
package org.onap.clamp.clds.config.sdc;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -46,19 +43,19 @@ import org.onap.clamp.clds.util.ResourceFileUtil;
*/
public class SdcSingleControllerConfigurationTest {
- private SdcSingleControllerConfiguration loadControllerConfiguration(String fileName, String sdcControllerName)
- throws IOException {
+ public static SdcSingleControllerConfiguration loadControllerConfiguration(String fileName,
+ String sdcControllerName) throws IOException {
JsonNode jsonNode = new ObjectMapper().readValue(ResourceFileUtil.getResourceAsStream(fileName),
- JsonNode.class);
+ JsonNode.class);
SdcSingleControllerConfiguration sdcSingleControllerConfiguration = new SdcSingleControllerConfiguration(
- jsonNode, sdcControllerName);
+ jsonNode, sdcControllerName);
return sdcSingleControllerConfiguration;
}
@Test
public final void testTheInit() throws SdcParametersException, IOException {
SdcSingleControllerConfiguration sdcConfig = loadControllerConfiguration("clds/sdc-controller-config-TLS.json",
- "sdc-controller1");
+ "sdc-controller1");
assertEquals("User", sdcConfig.getUser());
assertEquals("ThePassword", sdcConfig.getPassword());
assertEquals("consumerGroup", sdcConfig.getConsumerGroup());
@@ -78,7 +75,7 @@ public class SdcSingleControllerConfigurationTest {
@Test(expected = SdcParametersException.class)
public final void testAllRequiredParameters() throws IOException {
SdcSingleControllerConfiguration sdcConfig = loadControllerConfiguration("clds/sdc-controller-config-TLS.json",
- "sdc-controller1");
+ "sdc-controller1");
// No exception should be raised
sdcConfig.testAllRequiredParameters();
sdcConfig = loadControllerConfiguration("clds/sdc-controller-config-bad.json", "sdc-controller1");
@@ -86,10 +83,9 @@ public class SdcSingleControllerConfigurationTest {
}
@Test
- public final void testAllRequiredParametersEmptyEncrypted()
- throws IOException {
+ public final void testAllRequiredParametersEmptyEncrypted() throws IOException {
SdcSingleControllerConfiguration sdcConfig = loadControllerConfiguration(
- "clds/sdc-controller-config-empty-encrypted.json", "sdc-controller1");
+ "clds/sdc-controller-config-empty-encrypted.json", "sdc-controller1");
sdcConfig.testAllRequiredParameters();
assertNull(sdcConfig.getKeyStorePassword());
}
@@ -97,7 +93,7 @@ public class SdcSingleControllerConfigurationTest {
@Test
public final void testConsumerGroupWithNull() throws IOException {
SdcSingleControllerConfiguration sdcConfig = loadControllerConfiguration("clds/sdc-controller-config-NULL.json",
- "sdc-controller1");
+ "sdc-controller1");
assertTrue(sdcConfig.getConsumerGroup() == null);
}
}
diff --git a/src/test/java/org/onap/clamp/clds/it/CldsDictionaryServiceItCase.java b/src/test/java/org/onap/clamp/clds/it/CldsDictionaryServiceItCase.java
new file mode 100644
index 00000000..d31d5a01
--- /dev/null
+++ b/src/test/java/org/onap/clamp/clds/it/CldsDictionaryServiceItCase.java
@@ -0,0 +1,161 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * 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.clamp.clds.it;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Matchers;
+import org.mockito.Mockito;
+import org.onap.clamp.clds.model.CldsDictionary;
+import org.onap.clamp.clds.model.CldsDictionaryItem;
+import org.onap.clamp.clds.service.CldsDictionaryService;
+import org.onap.clamp.clds.util.LoggingUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+import org.springframework.security.core.context.SecurityContext;
+import org.springframework.security.core.userdetails.User;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+/**
+ * Test CLDS Dictionary Service APIs.
+ */
+@RunWith(SpringJUnit4ClassRunner.class)
+@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
+public class CldsDictionaryServiceItCase {
+
+ protected static final EELFLogger logger = EELFManager.getInstance().getLogger(CldsDictionaryServiceItCase.class);
+ @Autowired
+ private CldsDictionaryService cldsDictionaryService;
+ private Authentication authentication;
+ private CldsDictionary cldsDictionary;
+ private CldsDictionaryItem cldsDictionaryItem;
+ private List<GrantedAuthority> authList = new LinkedList<GrantedAuthority>();
+ private LoggingUtils util;
+
+ /**
+ * Setup the variable before the tests execution.
+ *
+ * @throws IOException
+ * In case of issues when opening the files
+ */
+ @Before
+ public void setupBefore() throws IOException {
+ authList.add(new SimpleGrantedAuthority("permission-type-cl|dev|read"));
+ authList.add(new SimpleGrantedAuthority("permission-type-cl|dev|update"));
+ authList.add(new SimpleGrantedAuthority("permission-type-template|dev|read"));
+ authList.add(new SimpleGrantedAuthority("permission-type-template|dev|update"));
+ authList.add(new SimpleGrantedAuthority("permission-type-filter-vf|dev|*"));
+ authList.add(new SimpleGrantedAuthority("permission-type-tosca|dev|read"));
+ authList.add(new SimpleGrantedAuthority("permission-type-tosca|dev|update"));
+ authentication = new UsernamePasswordAuthenticationToken(new User("admin", "", authList), "", authList);
+
+ SecurityContext securityContext = Mockito.mock(SecurityContext.class);
+ Mockito.when(securityContext.getAuthentication()).thenReturn(authentication);
+
+ util = Mockito.mock(LoggingUtils.class);
+ Mockito.doNothing().when(util).entering(Matchers.any(HttpServletRequest.class), Matchers.any(String.class));
+ cldsDictionaryService.setLoggingUtil(util);
+
+ cldsDictionaryService.setSecurityContext(securityContext);
+
+ cldsDictionary = new CldsDictionary();
+
+ cldsDictionary.setDictionaryName("TestDictionary");
+ ResponseEntity entity = cldsDictionaryService.createOrUpdateDictionary("TestDictionary", cldsDictionary);
+ cldsDictionary = (CldsDictionary) entity.getBody();
+
+ cldsDictionaryItem = new CldsDictionaryItem();
+ cldsDictionaryItem.setDictElementShortName("TestDictionaryItemShortName");
+ cldsDictionaryItem.setDictElementName("TestDictionaryItemName");
+ cldsDictionaryItem.setDictElementType("string");
+ cldsDictionaryItem.setDictionaryId(cldsDictionary.getDictionaryId());
+ cldsDictionaryItem.setDictElementDesc("TestDictionaryItemDesc");
+ cldsDictionaryService.createOrUpdateDictionaryElements("TestDictionary", cldsDictionaryItem);
+
+ logger.info("Initial Clds Dictionary uploaded in DB:" + cldsDictionaryItem);
+ }
+
+ @Test
+ public void testCreateOrUpdateDictionary() throws Exception {
+ ResponseEntity<CldsDictionary> responseEntity = cldsDictionaryService.createOrUpdateDictionary("TestDictionary",
+ cldsDictionary);
+ CldsDictionary dictionary = responseEntity.getBody();
+ assertNotNull(dictionary);
+ logger.info("CLDS Dictionary is:" + dictionary);
+ assertEquals("TestDictionary", dictionary.getDictionaryName());
+ }
+
+ @Test
+ public void testCreateOrUpdateDictionaryElements() throws Exception {
+ cldsDictionaryItem = new CldsDictionaryItem();
+ cldsDictionaryItem.setDictElementShortName("TestDictionaryItemShortName1");
+ cldsDictionaryItem.setDictElementName("TestDictionaryItemName1");
+ cldsDictionaryItem.setDictElementType("string");
+ cldsDictionaryItem.setDictionaryId(cldsDictionary.getDictionaryId());
+ cldsDictionaryItem.setDictElementDesc("TestDictionaryItemDesc1");
+
+ ResponseEntity<CldsDictionaryItem> responseEntity = cldsDictionaryService
+ .createOrUpdateDictionaryElements("TestDictionary", cldsDictionaryItem);
+ CldsDictionaryItem dictionaryItem = responseEntity.getBody();
+ assertNotNull(dictionaryItem);
+ logger.info("CLDS Dictionary Item is:" + dictionaryItem);
+ assertEquals("TestDictionaryItemName1", dictionaryItem.getDictElementName());
+ }
+
+ @Test
+ public void testGetAllDictionaryNames() throws Exception {
+ ResponseEntity<List<CldsDictionary>> responseEntity = cldsDictionaryService.getAllDictionaryNames();
+ List<CldsDictionary> dictionaries = responseEntity.getBody();
+ assertNotNull(dictionaries);
+ logger.info("CLDS Dictionary List is:" + dictionaries);
+ }
+
+ @Test
+ public void testGetDictionaryElementsByName() throws Exception {
+ ResponseEntity<List<CldsDictionaryItem>> responseEntity = cldsDictionaryService
+ .getDictionaryElementsByName("TestDictionary");
+ List<CldsDictionaryItem> dictionaryItems = responseEntity.getBody();
+ assertNotNull(dictionaryItems);
+ logger.info("CLDS Dictionary Item LIst is:" + dictionaryItems);
+ }
+}
diff --git a/src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java b/src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java
index e8d52c0e..85218abb 100644
--- a/src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java
@@ -28,7 +28,6 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import java.io.IOException;
import java.io.InputStream;
@@ -54,6 +53,7 @@ import org.onap.clamp.clds.dao.CldsDao;
import org.onap.clamp.clds.model.CldsEvent;
import org.onap.clamp.clds.model.CldsInfo;
import org.onap.clamp.clds.model.CldsModel;
+import org.onap.clamp.clds.model.CldsMonitoringDetails;
import org.onap.clamp.clds.model.CldsServiceData;
import org.onap.clamp.clds.model.CldsTemplate;
import org.onap.clamp.clds.model.DcaeEvent;
@@ -120,6 +120,7 @@ public class CldsServiceItCase {
util = Mockito.mock(LoggingUtils.class);
Mockito.doNothing().when(util).entering(Matchers.any(HttpServletRequest.class), Matchers.any(String.class));
cldsService.setLoggingUtil(util);
+
}
@Test
@@ -159,6 +160,12 @@ public class CldsServiceItCase {
}
@Test
+ public void testGetCLDSDetails() throws IOException {
+ List<CldsMonitoringDetails> cldsMonitoringDetailsList = cldsService.getCldsDetails();
+ assertNotNull(cldsMonitoringDetailsList);
+ }
+
+ @Test(expected = NotFoundException.class)
public void testCompleteFlow() throws TransformerException, ParseException {
SecurityContext securityContext = Mockito.mock(SecurityContext.class);
Mockito.when(securityContext.getAuthentication()).thenReturn(authentication);
@@ -190,6 +197,10 @@ public class CldsServiceItCase {
// Test the PutModel method
cldsService.putModel(randomNameModel, newModel);
+
+ assertEquals(bpmnText, cldsService.getBpmnXml(randomNameModel));
+ assertEquals(imageText, cldsService.getImageXml(randomNameModel));
+
// Verify whether it has been added properly or not
assertNotNull(cldsDao.getModel(randomNameModel));
@@ -248,13 +259,8 @@ public class CldsServiceItCase {
assertNotNull(responseEntity);
assertTrue(responseEntity.getStatusCode().equals(HttpStatus.OK));
assertNotNull(responseEntity.getBody());
- try {
- cldsService.getModel(randomNameModel);
- fail("Should have raised an NotFoundException exception");
- } catch (NotFoundException ne) {
-
- }
-
+ // This will raise an exception
+ cldsService.getModel(randomNameModel);
}
@Test
@@ -265,7 +271,8 @@ public class CldsServiceItCase {
dcaeEvent.setResourceUUID("1");
dcaeEvent.setServiceUUID("2");
assertEquals(cldsService.postDcaeEvent("false", dcaeEvent),
- "event=created serviceUUID=2 resourceUUID=1 artifactName=ClosedLoop_with-enough-characters_TestArtifact.yml instance count=0 isTest=false");
+ "event=created serviceUUID=2 resourceUUID=1 artifactName="
+ + "ClosedLoop_with-enough-characters_TestArtifact.yml instance count=0 isTest=false");
}
@Test
diff --git a/src/test/java/org/onap/clamp/clds/it/CldsToscaServiceItCase.java b/src/test/java/org/onap/clamp/clds/it/CldsToscaServiceItCase.java
new file mode 100644
index 00000000..d4c7e5c2
--- /dev/null
+++ b/src/test/java/org/onap/clamp/clds/it/CldsToscaServiceItCase.java
@@ -0,0 +1,138 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * 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.clamp.clds.it;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Matchers;
+import org.mockito.Mockito;
+import org.onap.clamp.clds.model.CldsToscaModel;
+import org.onap.clamp.clds.service.CldsToscaService;
+import org.onap.clamp.clds.util.LoggingUtils;
+import org.onap.clamp.clds.util.ResourceFileUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+import org.springframework.security.core.context.SecurityContext;
+import org.springframework.security.core.userdetails.User;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+/**
+ * Test CLDS Tosca Service APIs.
+ */
+@RunWith(SpringJUnit4ClassRunner.class)
+@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
+public class CldsToscaServiceItCase {
+
+ protected static final EELFLogger logger = EELFManager.getInstance().getLogger(CldsToscaServiceItCase.class);
+ @Autowired
+ private CldsToscaService cldsToscaService;
+ private String toscaModelYaml;
+ private Authentication authentication;
+ private CldsToscaModel cldsToscaModel;
+ private List<GrantedAuthority> authList = new LinkedList<GrantedAuthority>();
+ private LoggingUtils util;
+
+ /**
+ * Setup the variable before the tests execution.
+ *
+ * @throws IOException
+ * In case of issues when opening the files
+ */
+ @Before
+ public void setupBefore() throws IOException {
+ authList.add(new SimpleGrantedAuthority("permission-type-cl|dev|read"));
+ authList.add(new SimpleGrantedAuthority("permission-type-cl|dev|update"));
+ authList.add(new SimpleGrantedAuthority("permission-type-template|dev|read"));
+ authList.add(new SimpleGrantedAuthority("permission-type-template|dev|update"));
+ authList.add(new SimpleGrantedAuthority("permission-type-filter-vf|dev|*"));
+ authList.add(new SimpleGrantedAuthority("permission-type-tosca|dev|read"));
+ authList.add(new SimpleGrantedAuthority("permission-type-tosca|dev|update"));
+ authentication = new UsernamePasswordAuthenticationToken(new User("admin", "", authList), "", authList);
+
+ SecurityContext securityContext = Mockito.mock(SecurityContext.class);
+ Mockito.when(securityContext.getAuthentication()).thenReturn(authentication);
+
+ util = Mockito.mock(LoggingUtils.class);
+ Mockito.doNothing().when(util).entering(Matchers.any(HttpServletRequest.class), Matchers.any(String.class));
+ cldsToscaService.setLoggingUtil(util);
+
+ cldsToscaService.setSecurityContext(securityContext);
+
+ toscaModelYaml = ResourceFileUtil.getResourceAsString("tosca/tca-policy-test.yaml");
+
+ cldsToscaModel = new CldsToscaModel();
+ cldsToscaModel.setToscaModelName("tca-policy-test");
+ cldsToscaModel.setToscaModelYaml(toscaModelYaml);
+ cldsToscaModel.setUserId("admin");
+ cldsToscaModel.setPolicyType("tca");
+ cldsToscaService.parseToscaModelAndSave("tca-policy-test", cldsToscaModel);
+ logger.info("Initial Tosca Model uploaded in DB:" + cldsToscaModel);
+ }
+
+ @Test
+ public void testParseToscaModelAndSave() throws Exception {
+ ResponseEntity responseEntity = cldsToscaService.parseToscaModelAndSave("tca-policy-test", cldsToscaModel);
+ CldsToscaModel savedModel = (CldsToscaModel) responseEntity.getBody();
+ assertNotNull(savedModel);
+ logger.info("Parsed Tosca Model is:" + savedModel);
+ assertEquals("tca-policy-test", savedModel.getToscaModelName());
+ }
+
+ @Test
+ public void testGetToscaModel() throws Exception {
+ ResponseEntity<CldsToscaModel> responseEntity = cldsToscaService.getToscaModel("tca-policy-test");
+ CldsToscaModel savedModel = responseEntity.getBody();
+ assertNotNull(savedModel);
+ assertEquals("tca-policy-test", savedModel.getToscaModelName());
+ }
+
+ @Test
+ public void testGetToscaModelsByPolicyType() throws Exception {
+ ResponseEntity<CldsToscaModel> responseEntity = cldsToscaService.getToscaModelsByPolicyType("tca");
+ CldsToscaModel savedModel = responseEntity.getBody();
+ assertNotNull(savedModel);
+ assertEquals("tca-policy-test", savedModel.getToscaModelName());
+ assertEquals("tca", savedModel.getPolicyType());
+ }
+
+}
diff --git a/src/test/java/org/onap/clamp/clds/it/PolicyClientItCase.java b/src/test/java/org/onap/clamp/clds/it/PolicyClientItCase.java
index 59fad9a6..31594cba 100644
--- a/src/test/java/org/onap/clamp/clds/it/PolicyClientItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/PolicyClientItCase.java
@@ -24,156 +24,256 @@
package org.onap.clamp.clds.it;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
import java.io.IOException;
+import java.util.List;
import java.util.Map;
-import java.util.UUID;
-import java.util.concurrent.TimeUnit;
+import javax.xml.transform.TransformerException;
+
+import org.assertj.core.api.Assertions;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.onap.clamp.clds.client.req.policy.GuardPolicyAttributesConstructor;
import org.onap.clamp.clds.client.req.policy.OperationalPolicyAttributesConstructor;
import org.onap.clamp.clds.client.req.policy.PolicyClient;
import org.onap.clamp.clds.client.req.tca.TcaRequestFormatter;
import org.onap.clamp.clds.config.ClampProperties;
-import org.onap.clamp.clds.config.PolicyConfiguration;
+import org.onap.clamp.clds.dao.CldsDao;
import org.onap.clamp.clds.model.CldsEvent;
+import org.onap.clamp.clds.model.CldsToscaModel;
import org.onap.clamp.clds.model.properties.ModelProperties;
import org.onap.clamp.clds.model.properties.Policy;
-import org.onap.clamp.clds.model.properties.PolicyChain;
+import org.onap.clamp.clds.model.properties.PolicyItem;
import org.onap.clamp.clds.model.properties.Tca;
+import org.onap.clamp.clds.transform.XslTransformer;
+import org.onap.clamp.clds.util.JacksonUtils;
+import org.onap.clamp.clds.util.LoggingUtils;
import org.onap.clamp.clds.util.ResourceFileUtil;
import org.onap.policy.api.AttributeType;
+import org.onap.policy.api.PolicyConfigType;
+import org.onap.policy.api.PolicyType;
+import org.onap.policy.controlloop.policy.builder.BuilderException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
/**
- * Test Policy API in org.onap.clamp.ClampDesigner.client package - replicate
- * Policy Delegates in tests.
+ * Test Policy API, this uses the emulator written in python that is started
+ * during the tests, It returns the payload sent in the policy queries so that
+ * it can be validated here.
*/
@RunWith(SpringRunner.class)
@SpringBootTest
public class PolicyClientItCase {
@Autowired
- private PolicyConfiguration policyConfiguration;
+ private CldsDao cldsDao;
@Autowired
private ClampProperties refProp;
@Autowired
private PolicyClient policyClient;
+ @Autowired
+ XslTransformer cldsBpmnTransformer;
String modelProp;
- String modelBpmnProp;
String modelName;
String controlName;
+ String modelBpmnPropJson;
+ ModelProperties prop;
- /**
- * Initialize Test.
- */
@Before
- public void setUp() throws IOException {
- modelProp = ResourceFileUtil.getResourceAsString("example/model-properties/policy/modelBpmnProperties.json");
- modelBpmnProp = ResourceFileUtil.getResourceAsString("example/model-properties/policy/modelBpmn.json");
+ public void setUp() throws IOException, TransformerException {
+ modelProp = ResourceFileUtil.getResourceAsString("example/model-properties/tca_new/model-properties.json");
modelName = "example-model06";
controlName = "ClosedLoop_FRWL_SIG_fad4dcae_e498_11e6_852e_0050568c4ccf";
+ modelBpmnPropJson = cldsBpmnTransformer.doXslTransformToString(
+ ResourceFileUtil.getResourceAsString("example/model-properties/tca_new/tca-template.xml"));
+ prop = new ModelProperties(modelName, controlName, CldsEvent.ACTION_SUBMIT, false, modelBpmnPropJson,
+ modelProp);
}
- private void createUpdateOperationalPolicy(String actionCd) throws Exception {
- ModelProperties prop = new ModelProperties(modelName, controlName, actionCd, false, modelBpmnProp, modelProp);
- Policy policy = prop.getType(Policy.class);
- if (policy.isFound()) {
- for (PolicyChain policyChain : policy.getPolicyChains()) {
- String operationalPolicyRequestUuid = UUID.randomUUID().toString();
- Map<AttributeType, Map<String, String>> attributes = OperationalPolicyAttributesConstructor
- .formatAttributes(refProp, prop, policy.getId(), policyChain);
- policyClient.sendBrmsPolicy(attributes, prop, operationalPolicyRequestUuid);
- }
- }
+ @Test
+ public void testSendGuardPolicy() throws TransformerException, IOException {
+ // Normally there is only one Guard
+ List<PolicyItem> policyItems = GuardPolicyAttributesConstructor
+ .getAllPolicyGuardsFromPolicyChain(prop.getType(Policy.class).getPolicyChains().get(0));
+ PolicyItem policyItem = policyItems.get(0);
+ prop.setCurrentModelElementId(prop.getType(Policy.class).getId());
+ prop.setPolicyUniqueId(prop.getType(Policy.class).getPolicyChains().get(0).getPolicyId());
+ prop.setGuardUniqueId(policyItem.getId());
+ String response = policyClient.sendGuardPolicy(
+ GuardPolicyAttributesConstructor.formatAttributes(prop, policyItem), prop, LoggingUtils.getRequestId(),
+ policyItem);
+ Map<String, Object> mapNodes = JacksonUtils.getObjectMapperInstance()
+ .convertValue(JacksonUtils.getObjectMapperInstance().readTree(response), Map.class);
+ Assertions.assertThat(mapNodes).contains(Assertions.entry("policyClass", "Decision"),
+ Assertions.entry("policyName",
+ modelName.replace("-", "_") + "." + controlName + "_Policy_12lup3h_0_Guard_6TtHGPq"),
+ Assertions.entry("policyDescription", "from clds"), Assertions.entry("onapName", "PDPD"),
+ Assertions.entry("requestID", LoggingUtils.getRequestId()), Assertions.entry("ruleProvider", "GUARD_YAML"));
+
+ // Check Guard attributes
+ Assertions.assertThat((Map<String, Object>) mapNodes.get("attributes"))
+ .containsKey(AttributeType.MATCHING.name());
+ Assertions.assertThat(
+ (Map<String, Object>) ((Map<String, Object>) mapNodes.get("attributes")).get(AttributeType.MATCHING.name()))
+ .contains(Assertions.entry(GuardPolicyAttributesConstructor.ACTOR, "APPC"),
+ Assertions.entry(GuardPolicyAttributesConstructor.CLNAME, controlName + "_0"),
+ Assertions.entry(GuardPolicyAttributesConstructor.TIME_WINDOW, "10"));
}
- private void createUpdateTcaPolicy(String actionCd) throws Exception {
- ModelProperties prop = new ModelProperties(modelName, controlName, actionCd, false, modelBpmnProp, modelProp);
- Tca tca = prop.getType(Tca.class);
- if (tca.isFound()) {
- String tcaPolicyRequestUuid = UUID.randomUUID().toString();
- String policyJson = TcaRequestFormatter.createPolicyJson(refProp, prop);
- try {
- policyClient.sendMicroServiceInJson(policyJson, prop, tcaPolicyRequestUuid);
- } catch (Exception e) {
- assertTrue(e.getMessage().contains("Policy send failed: PE500 "));
- }
- }
+ @Test
+ public void testSendBrmsPolicy()
+ throws TransformerException, BuilderException, IllegalArgumentException, IOException {
+ Map<AttributeType, Map<String, String>> attributes = OperationalPolicyAttributesConstructor.formatAttributes(
+ refProp, prop, prop.getType(Policy.class).getId(), prop.getType(Policy.class).getPolicyChains().get(0));
+ String response = policyClient.sendBrmsPolicy(attributes, prop, LoggingUtils.getRequestId());
+
+ Map<String, Object> mapNodes = JacksonUtils.getObjectMapperInstance()
+ .convertValue(JacksonUtils.getObjectMapperInstance().readTree(response), Map.class);
+ Assertions.assertThat(mapNodes).contains(Assertions.entry("policyClass", "Config"),
+ Assertions.entry("policyName", modelName.replace("-", "_") + "." + controlName + "_Policy_12lup3h_0"),
+ Assertions.entry("policyConfigType", PolicyConfigType.BRMS_PARAM.name()),
+ Assertions.entry("requestID", LoggingUtils.getRequestId()));
+
+ // Check BRMS attributes present
+ Assertions.assertThat((Map<String, Object>) mapNodes.get("attributes"))
+ .containsKeys(AttributeType.MATCHING.name(), AttributeType.RULE.name());
+
+ }
+
+ @Test
+ public void testSendMicroServiceInJson()
+ throws TransformerException, BuilderException, IllegalArgumentException, IOException {
+ prop.setCurrentModelElementId(prop.getType(Policy.class).getId());
+ String jsonToSend = "{\"test\":\"test\"}";
+ String response = policyClient.sendMicroServiceInJson(jsonToSend, prop, LoggingUtils.getRequestId());
+
+ Map<String, Object> mapNodes = JacksonUtils.getObjectMapperInstance()
+ .convertValue(JacksonUtils.getObjectMapperInstance().readTree(response), Map.class);
+ Assertions.assertThat(mapNodes).contains(Assertions.entry("policyClass", "Config"),
+ Assertions.entry("policyName", modelName.replace("-", "_") + "." + controlName + "_Policy_12lup3h"),
+ Assertions.entry("policyConfigType", PolicyConfigType.MicroService.name()),
+ Assertions.entry("requestID", LoggingUtils.getRequestId()),
+ Assertions.entry("configBodyType", PolicyType.JSON.name()), Assertions.entry("onapName", "DCAE"),
+ Assertions.entry("configBody", jsonToSend));
+
}
- private void deleteOperationalPolicy(String actionCd) throws Exception {
- ModelProperties prop = new ModelProperties(modelName, controlName, actionCd, false, modelBpmnProp, modelProp);
- Policy policy = prop.getType(Policy.class);
- if (policy.isFound()) {
- prop.setCurrentModelElementId(policy.getId());
- for (PolicyChain policyChain : policy.getPolicyChains()) {
- prop.setPolicyUniqueId(policyChain.getPolicyId());
- policyClient.deleteBrms(prop);
- }
- }
+ @Test
+ public void testSendBasePolicyInOther() throws IllegalArgumentException, IOException {
+ String body = "test";
+ String response = policyClient.sendBasePolicyInOther(body, "myPolicy", prop, LoggingUtils.getRequestId());
+ Map<String, Object> mapNodes = JacksonUtils.getObjectMapperInstance()
+ .convertValue(JacksonUtils.getObjectMapperInstance().readTree(response), Map.class);
+ Assertions.assertThat(mapNodes).contains(Assertions.entry("policyClass", "Config"),
+ Assertions.entry("policyName", "myPolicy"),
+ Assertions.entry("policyConfigType", PolicyConfigType.Base.name()),
+ Assertions.entry("requestID", LoggingUtils.getRequestId()),
+ Assertions.entry("configBodyType", PolicyType.OTHER.name()), Assertions.entry("onapName", "DCAE"),
+ Assertions.entry("configBody", body));
}
- private void deleteTcaPolicy(String actionCd) throws Exception {
- ModelProperties prop = new ModelProperties(modelName, controlName, actionCd, false, modelBpmnProp, modelProp);
+ @Test
+ public void testSendMicroServiceInOther() throws IllegalArgumentException, IOException {
Tca tca = prop.getType(Tca.class);
- if (tca.isFound()) {
- prop.setCurrentModelElementId(tca.getId());
- try {
- policyClient.deleteMicrosService(prop);
- } catch (Exception e) {
- assertTrue(e.getMessage().contains("Policy delete failed: PE500 "));
- }
- }
+ String tcaJson = TcaRequestFormatter.createPolicyJson(refProp, prop);
+ String response = policyClient.sendMicroServiceInOther(tcaJson, prop);
+
+ Map<String, Object> mapNodes = JacksonUtils.getObjectMapperInstance()
+ .convertValue(JacksonUtils.getObjectMapperInstance().readTree(response), Map.class);
+ Assertions.assertThat(mapNodes).contains(Assertions.entry("policyClass", "Config"),
+ Assertions.entry("policyName", modelName.replace("-", "_") + "." + controlName + "_TCA_1d13unw"),
+ Assertions.entry("policyConfigType", PolicyConfigType.MicroService.name()),
+ Assertions.entry("configBody", tcaJson), Assertions.entry("onapName", "DCAE"));
}
- // @Test
- /**
- * Temporarily disabled Test.
- */
- public void testCreateUpdateDeleteOperationalPolicy() throws Exception {
- createUpdateOperationalPolicy(CldsEvent.ACTION_SUBMIT);
- TimeUnit.SECONDS.sleep(20);
- deleteOperationalPolicy(CldsEvent.ACTION_DELETE);
+ @Test
+ public void testDeleteMicrosService() throws IllegalArgumentException, IOException {
+ Tca tca = prop.getType(Tca.class);
+ prop.setCurrentModelElementId(tca.getId());
+ String[] responses = policyClient.deleteMicrosService(prop).split("\\}\\{");
+
+ // There are 2 responses appended to the result, one for PDP one for PAP !
+ Map<String, Object> mapNodesPdp = JacksonUtils.getObjectMapperInstance()
+ .convertValue(JacksonUtils.getObjectMapperInstance().readTree(responses[0] + "}"), Map.class);
+ Map<String, Object> mapNodesPap = JacksonUtils.getObjectMapperInstance()
+ .convertValue(JacksonUtils.getObjectMapperInstance().readTree("{" + responses[1]), Map.class);
+
+ Assertions.assertThat(mapNodesPdp).contains(
+ Assertions.entry("policyName", modelName.replace("-", "_") + "." + controlName + "_TCA_1d13unw"),
+ Assertions.entry("policyType", PolicyConfigType.MicroService.name()),
+ Assertions.entry("policyComponent", "PDP"), Assertions.entry("deleteCondition", "ALL"));
+
+ Assertions.assertThat(mapNodesPap).contains(
+ Assertions.entry("policyName", modelName.replace("-", "_") + "." + controlName + "_TCA_1d13unw"),
+ Assertions.entry("policyType", PolicyConfigType.MicroService.name()),
+ Assertions.entry("policyComponent", "PAP"), Assertions.entry("deleteCondition", "ALL"));
}
@Test
- public void testCreateUpdateDeleteTcaPolicy() throws Exception {
- createUpdateTcaPolicy(CldsEvent.ACTION_SUBMIT);
- TimeUnit.SECONDS.sleep(20);
- deleteTcaPolicy(CldsEvent.ACTION_DELETE);
+ public void testDeleteGuard() throws IllegalArgumentException, IOException {
+ List<PolicyItem> policyItems = GuardPolicyAttributesConstructor
+ .getAllPolicyGuardsFromPolicyChain(prop.getType(Policy.class).getPolicyChains().get(0));
+ prop.setCurrentModelElementId(prop.getType(Policy.class).getId());
+ prop.setPolicyUniqueId(prop.getType(Policy.class).getPolicyChains().get(0).getPolicyId());
+ prop.setGuardUniqueId(policyItems.get(0).getId());
+ String[] responses = policyClient.deleteGuard(prop).split("\\}\\{");
+
+ // There are 2 responses appended to the result, one for PDP one for PAP !
+ Map<String, Object> mapNodesPdp = JacksonUtils.getObjectMapperInstance()
+ .convertValue(JacksonUtils.getObjectMapperInstance().readTree(responses[0] + "}"), Map.class);
+ Map<String, Object> mapNodesPap = JacksonUtils.getObjectMapperInstance()
+ .convertValue(JacksonUtils.getObjectMapperInstance().readTree("{" + responses[1]), Map.class);
+
+ Assertions.assertThat(mapNodesPdp).contains(
+ Assertions.entry("policyName",
+ modelName.replace("-", "_") + "." + controlName + "_Policy_12lup3h_0_Guard_6TtHGPq"),
+ Assertions.entry("policyType", "Decision"), Assertions.entry("policyComponent", "PDP"),
+ Assertions.entry("deleteCondition", "ALL"));
+ Assertions.assertThat(mapNodesPap).contains(
+ Assertions.entry("policyName",
+ modelName.replace("-", "_") + "." + controlName + "_Policy_12lup3h_0_Guard_6TtHGPq"),
+ Assertions.entry("policyType", "Decision"), Assertions.entry("policyComponent", "PAP"),
+ Assertions.entry("deleteCondition", "ALL"));
}
@Test
- public void testPolicyConfiguration() {
- assertNotNull(policyConfiguration.getPdpUrl1());
- assertNotNull(policyConfiguration.getPdpUrl2());
- assertNotNull(policyConfiguration.getPapUrl());
- assertNotNull(policyConfiguration.getPolicyEnvironment());
- assertNotNull(policyConfiguration.getClientId());
- assertNotNull(policyConfiguration.getClientKey());
- assertNotNull(policyConfiguration.getNotificationType());
- assertNotNull(policyConfiguration.getNotificationUebServers());
- assertEquals(8, policyConfiguration.getProperties().size());
- assertTrue(((String) policyConfiguration.getProperties().get(PolicyConfiguration.PDP_URL1))
- .contains("/pdp/ , testpdp, alpha123"));
- assertTrue(((String) policyConfiguration.getProperties().get(PolicyConfiguration.PDP_URL2))
- .contains("/pdp/ , testpdp, alpha123"));
- assertTrue(((String) policyConfiguration.getProperties().get(PolicyConfiguration.PAP_URL))
- .contains("/pap/ , testpap, alpha123"));
- assertEquals("websocket", policyConfiguration.getProperties().get(PolicyConfiguration.NOTIFICATION_TYPE));
- assertEquals("localhost",
- policyConfiguration.getProperties().get(PolicyConfiguration.NOTIFICATION_UEB_SERVERS));
- assertEquals("python", policyConfiguration.getProperties().get(PolicyConfiguration.CLIENT_ID));
- assertEquals("dGVzdA==", policyConfiguration.getProperties().get(PolicyConfiguration.CLIENT_KEY));
- assertEquals("DEVL", policyConfiguration.getProperties().get(PolicyConfiguration.ENVIRONMENT));
+ public void testDeleteBrms() throws IllegalArgumentException, IOException {
+ prop.setPolicyUniqueId(prop.getType(Policy.class).getPolicyChains().get(0).getPolicyId());
+ prop.setCurrentModelElementId(prop.getType(Policy.class).getId());
+ String[] responses = policyClient.deleteBrms(prop).split("\\}\\{");
+
+ // There are 2 responses appended to the result, one for PDP one for PAP !
+ Map<String, Object> mapNodesPdp = JacksonUtils.getObjectMapperInstance()
+ .convertValue(JacksonUtils.getObjectMapperInstance().readTree(responses[0] + "}"), Map.class);
+ Map<String, Object> mapNodesPap = JacksonUtils.getObjectMapperInstance()
+ .convertValue(JacksonUtils.getObjectMapperInstance().readTree("{" + responses[1]), Map.class);
+
+ Assertions.assertThat(mapNodesPdp).contains(
+ Assertions.entry("policyName", modelName.replace("-", "_") + "." + controlName + "_Policy_12lup3h_0"),
+ Assertions.entry("policyType", "BRMS_Param"), Assertions.entry("policyComponent", "PDP"),
+ Assertions.entry("deleteCondition", "ALL"));
+ Assertions.assertThat(mapNodesPap).contains(
+ Assertions.entry("policyName", modelName.replace("-", "_") + "." + controlName + "_Policy_12lup3h_0"),
+ Assertions.entry("policyType", "BRMS_Param"), Assertions.entry("policyComponent", "PAP"),
+ Assertions.entry("deleteCondition", "ALL"));
+ }
+
+ @Test
+ public void testImportToscaModel() throws IOException {
+ String toscaModelYaml = ResourceFileUtil.getResourceAsString("tosca/tca-policy-test.yaml");
+ CldsToscaModel cldsToscaModel = new CldsToscaModel();
+ cldsToscaModel.setToscaModelName("tca-policy-test");
+ cldsToscaModel.setToscaModelYaml(toscaModelYaml);
+ cldsToscaModel.setUserId("admin");
+ cldsToscaModel.setPolicyType("tca");
+ cldsToscaModel = cldsToscaModel.save(cldsDao, refProp, policyClient, "test");
+ String tosca = policyClient.importToscaModel(cldsToscaModel);
+
+ Assertions.assertThat(tosca).contains(
+ "{\"serviceName\":\"tca-policy-test\",\"description\":\"tca-policy-test\",\"requestID\":null,\"filePath\":\"/tmp/tosca-models/tca-policy-test.yml\",");
+ Assertions.assertThat(tosca).contains(toscaModelYaml);
}
}
diff --git a/src/test/java/org/onap/clamp/clds/it/PolicyConfigurationItCase.java b/src/test/java/org/onap/clamp/clds/it/PolicyConfigurationItCase.java
new file mode 100644
index 00000000..fd20e360
--- /dev/null
+++ b/src/test/java/org/onap/clamp/clds/it/PolicyConfigurationItCase.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2017-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.clamp.clds.it;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.onap.clamp.clds.config.PolicyConfiguration;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+/**
+ * Test Config Policy read from application.properties.
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class PolicyConfigurationItCase {
+
+ @Autowired
+ private PolicyConfiguration policyConfiguration;
+
+ @Test
+ public void testPolicyConfiguration() {
+ assertNotNull(policyConfiguration.getPdpUrl1());
+ assertNotNull(policyConfiguration.getPdpUrl2());
+ assertNotNull(policyConfiguration.getPapUrl());
+ assertNotNull(policyConfiguration.getPolicyEnvironment());
+ assertNotNull(policyConfiguration.getClientId());
+ assertNotNull(policyConfiguration.getClientKey());
+ assertNotNull(policyConfiguration.getNotificationType());
+ assertNotNull(policyConfiguration.getNotificationUebServers());
+ assertEquals(8, policyConfiguration.getProperties().size());
+ assertTrue(((String) policyConfiguration.getProperties().get(PolicyConfiguration.PDP_URL1))
+ .contains("/pdp/ , testpdp, alpha123"));
+ assertTrue(((String) policyConfiguration.getProperties().get(PolicyConfiguration.PDP_URL2))
+ .contains("/pdp/ , testpdp, alpha123"));
+ assertTrue(((String) policyConfiguration.getProperties().get(PolicyConfiguration.PAP_URL))
+ .contains("/pap/ , testpap, alpha123"));
+ assertEquals("websocket", policyConfiguration.getProperties().get(PolicyConfiguration.NOTIFICATION_TYPE));
+ assertEquals("localhost",
+ policyConfiguration.getProperties().get(PolicyConfiguration.NOTIFICATION_UEB_SERVERS));
+ assertEquals("python", policyConfiguration.getProperties().get(PolicyConfiguration.CLIENT_ID));
+ assertEquals("dGVzdA==", policyConfiguration.getProperties().get(PolicyConfiguration.CLIENT_KEY));
+ assertEquals("DEVL", policyConfiguration.getProperties().get(PolicyConfiguration.ENVIRONMENT));
+ }
+}
diff --git a/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java b/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java
index 330ee605..d36e14c2 100644
--- a/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java
@@ -5,21 +5,21 @@
* Copyright (C) 2017-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.
+ * 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
+ *
+ * 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============================================
* Modifications copyright (c) 2018 Nokia
* ===================================================================
- *
+ *
*/
package org.onap.clamp.clds.it;
@@ -157,7 +157,7 @@ public class SdcCatalogServicesItCase {
rawCldsSdcResourceList.add(sdcResource2);
SdcCatalogServices catalogServices = new SdcCatalogServices();
List<SdcResourceBasicInfo> resultList = catalogServices
- .removeDuplicateSdcResourceBasicInfo(rawCldsSdcResourceList);
+ .removeDuplicateSdcResourceBasicInfo(rawCldsSdcResourceList);
SdcResourceBasicInfo res1;
SdcResourceBasicInfo res2;
if ("resource1".equals(resultList.get(0).getName())) {
@@ -173,15 +173,13 @@ public class SdcCatalogServicesItCase {
assertTrue("1.0".equals(res2.getVersion()));
}
-
@Test
- public void removeDuplicateSdcFunctionShouldNotReturnNull(){
+ public void removeDuplicateSdcFunctionShouldNotReturnNull() {
// given
SdcCatalogServices catalogServices = new SdcCatalogServices();
// when
- List<SdcResourceBasicInfo> firstResult = catalogServices
- .removeDuplicateSdcResourceBasicInfo(null);
+ List<SdcResourceBasicInfo> firstResult = catalogServices.removeDuplicateSdcResourceBasicInfo(null);
List<SdcResourceBasicInfo> secondResult = catalogServices
.removeDuplicateSdcResourceBasicInfo(new ArrayList<>());
@@ -194,8 +192,8 @@ public class SdcCatalogServicesItCase {
public void getServiceUuidFromServiceInvariantIdTest() throws Exception {
SdcCatalogServices spy = Mockito.spy(sdcCatalogWired);
Mockito.doReturn(IOUtils.toString(
- SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcServicesListExample.json"),
- "UTF-8")).when(spy).getSdcServicesInformation(null);
+ SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcServicesListExample.json"), "UTF-8"))
+ .when(spy).getSdcServicesInformation(null);
// Try the vcts4 version 1.0, this one should be replaced by 1.1 so it
// should not exist, returning empty string
String resUuidVcts4Null = spy.getServiceUuidFromServiceInvariantId("a33ed748-3477-4434-b3f3-b5560f5e7d9b");
@@ -216,81 +214,92 @@ public class SdcCatalogServicesItCase {
public void getCldsServiceDataWithAlarmConditionsTest() throws Exception {
SdcCatalogServices spy = Mockito.spy(sdcCatalogWired);
Mockito.doReturn(IOUtils.toString(
- SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcServicesListExample.json"),
- "UTF-8")).when(spy).getSdcServicesInformation(null);
+ SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcServicesListExample.json"), "UTF-8"))
+ .when(spy).getSdcServicesInformation(null);
// This invariant uuid is the one from vcts4 v1.1
String serviceResourceDetailUrl = refProp.getStringValue("sdc.serviceUrl")
- + "/29018914-966c-442d-9d08-251b9dc45b8f/metadata";
+ + "/29018914-966c-442d-9d08-251b9dc45b8f/metadata";
Mockito.doReturn(IOUtils.toString(
- SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcServiceDetailsExample.json"),
- "UTF-8")).when(spy).getCldsServicesOrResourcesBasedOnURL(serviceResourceDetailUrl);
+ SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcServiceDetailsExample.json"), "UTF-8"))
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(serviceResourceDetailUrl);
String resourceDetailUrl = refProp.getStringValue("sdc.catalog.url")
- + "resources/585822c7-4027-4f84-ba50-e9248606f136/metadata";
+ + "resources/585822c7-4027-4f84-ba50-e9248606f136/metadata";
Mockito.doReturn(IOUtils.toString(
- SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcResourceDetailsExample.json"),
- "UTF-8")).when(spy).getCldsServicesOrResourcesBasedOnURL(resourceDetailUrl);
+ SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcResourceDetailsExample.json"), "UTF-8"))
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(resourceDetailUrl);
String securityRulesDetailUrl = refProp.getStringValue("sdc.catalog.url")
- + "resources/d57e57d2-e3c6-470d-8d16-e6ea05f536c5/metadata";
- Mockito.doReturn(IOUtils.toString(
+ + "resources/d57e57d2-e3c6-470d-8d16-e6ea05f536c5/metadata";
+ Mockito
+ .doReturn(IOUtils.toString(
SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcSecurityRules.json"), "UTF-8"))
- .when(spy).getCldsServicesOrResourcesBasedOnURL(securityRulesDetailUrl);
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(securityRulesDetailUrl);
String cinderVolumeDetailUrl = refProp.getStringValue("sdc.catalog.url")
- + "resources/b4288e07-597a-44a2-aa98-ad36e551a39d/metadata";
- Mockito.doReturn(IOUtils.toString(
+ + "resources/b4288e07-597a-44a2-aa98-ad36e551a39d/metadata";
+ Mockito
+ .doReturn(IOUtils.toString(
SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcCinderVolume.json"), "UTF-8"))
- .when(spy).getCldsServicesOrResourcesBasedOnURL(cinderVolumeDetailUrl);
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(cinderVolumeDetailUrl);
String vfcGenericDetailUrl = refProp.getStringValue("sdc.catalog.url")
- + "resources/2c8f1219-8000-4001-aa13-496a0396d40f/metadata";
+ + "resources/2c8f1219-8000-4001-aa13-496a0396d40f/metadata";
Mockito.doReturn(IOUtils.toString(
- SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcVFCGenericWithAlarms.json"),
- "UTF-8")).when(spy).getCldsServicesOrResourcesBasedOnURL(vfcGenericDetailUrl);
+ SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcVFCGenericWithAlarms.json"), "UTF-8"))
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(vfcGenericDetailUrl);
String csvAlarmsDetailUrl = refProp.getStringValue("sdc.catalog.url")
- + "resources/2c8f1219-8000-4001-aa13-496a0396d40f/resourceInstances/virc_fe_be/artifacts/5138e316-0237-49aa-817a-b3d8eaf77392";
- Mockito.doReturn(IOUtils.toString(
+ + "resources/2c8f1219-8000-4001-aa13-496a0396d40f/resourceInstances/virc_fe_be/"
+ + "artifacts/5138e316-0237-49aa-817a-b3d8eaf77392";
+ Mockito
+ .doReturn(IOUtils.toString(
SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcAlarmsList.csv"), "UTF-8"))
- .when(spy).getCldsServicesOrResourcesBasedOnURL(csvAlarmsDetailUrl);
- Mockito.doReturn(IOUtils.toString(
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(csvAlarmsDetailUrl);
+ Mockito
+ .doReturn(IOUtils.toString(
SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcAlarmsList.csv"), "UTF-8"))
- .when(spy).getCldsServicesOrResourcesBasedOnURL(csvAlarmsDetailUrl);
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(csvAlarmsDetailUrl);
String csvAlarmsDetailUrl2 = refProp.getStringValue("sdc.catalog.url")
- + "resources/d7646638-2572-4a94-b497-c028ac15f9ca/artifacts/5138e316-0237-49aa-817a-b3d8eaf77392";
- Mockito.doReturn(IOUtils.toString(
+ + "resources/d7646638-2572-4a94-b497-c028ac15f9ca/artifacts/5138e316-0237-49aa-817a-b3d8eaf77392";
+ Mockito
+ .doReturn(IOUtils.toString(
SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcAlarmsList.csv"), "UTF-8"))
- .when(spy).getCldsServicesOrResourcesBasedOnURL(csvAlarmsDetailUrl2);
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(csvAlarmsDetailUrl2);
String allVfResourcesDetailUrl = refProp.getStringValue("sdc.catalog.url") + "resources?resourceType=VF";
- Mockito.doReturn(IOUtils.toString(
+ Mockito
+ .doReturn(IOUtils.toString(
SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcVFResources.json"), "UTF-8"))
- .when(spy).getCldsServicesOrResourcesBasedOnURL(allVfResourcesDetailUrl);
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(allVfResourcesDetailUrl);
String vfcResourcesDetailUrl = refProp.getStringValue("sdc.catalog.url")
- + "resources/a0475018-1e7e-4ddd-8bee-33cbf958c2e6/metadata";
+ + "resources/a0475018-1e7e-4ddd-8bee-33cbf958c2e6/metadata";
Mockito.doReturn(IOUtils.toString(
- SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcCVFCResourceExample.json"),
- "UTF-8")).when(spy).getCldsServicesOrResourcesBasedOnURL(vfcResourcesDetailUrl);
+ SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcCVFCResourceExample.json"), "UTF-8"))
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(vfcResourcesDetailUrl);
String allVfcResourcesDetailUrl = refProp.getStringValue("sdc.catalog.url") + "resources?resourceType=VFC";
- Mockito.doReturn(IOUtils.toString(
+ Mockito
+ .doReturn(IOUtils.toString(
SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcVFCResources.json"), "UTF-8"))
- .when(spy).getCldsServicesOrResourcesBasedOnURL(allVfcResourcesDetailUrl);
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(allVfcResourcesDetailUrl);
String allCvfcResourcesDetailUrl = refProp.getStringValue("sdc.catalog.url") + "resources?resourceType=CVFC";
- Mockito.doReturn(IOUtils.toString(
+ Mockito
+ .doReturn(IOUtils.toString(
SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcCVFCResources.json"), "UTF-8"))
- .when(spy).getCldsServicesOrResourcesBasedOnURL(allCvfcResourcesDetailUrl);
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(allCvfcResourcesDetailUrl);
String allVfAlarms = refProp.getStringValue("sdc.catalog.url")
- + "resources/84855843-5247-4e97-a2bd-5395a510253b/artifacts/d57ac7ec-f3c3-4793-983a-c75ac3a43153";
- Mockito.doReturn(IOUtils.toString(
+ + "resources/84855843-5247-4e97-a2bd-5395a510253b/artifacts/d57ac7ec-f3c3-4793-983a-c75ac3a43153";
+ Mockito
+ .doReturn(IOUtils.toString(
SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcMeasurementsList.csv"), "UTF-8"))
- .when(spy).getCldsServicesOrResourcesBasedOnURL(allVfAlarms);
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(allVfAlarms);
String vfcResourceExample = refProp.getStringValue("sdc.catalog.url")
- + "resources/d7646638-2572-4a94-b497-c028ac15f9ca/metadata";
- Mockito.doReturn(IOUtils.toString(
+ + "resources/d7646638-2572-4a94-b497-c028ac15f9ca/metadata";
+ Mockito
+ .doReturn(IOUtils.toString(
SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcVFCResourceExample.json"), "UTF-8"))
- .when(spy).getCldsServicesOrResourcesBasedOnURL(vfcResourceExample);
+ .when(spy).getCldsServicesOrResourcesBasedOnURL(vfcResourceExample);
CldsServiceData cldsServiceData = spy
- .getCldsServiceDataWithAlarmConditions("a33ed748-3477-4434-b3f3-b5560f5e7d9c");
+ .getCldsServiceDataWithAlarmConditions("a33ed748-3477-4434-b3f3-b5560f5e7d9c");
assertTrue("a33ed748-3477-4434-b3f3-b5560f5e7d9c".equals(cldsServiceData.getServiceInvariantUUID()));
assertTrue("29018914-966c-442d-9d08-251b9dc45b8f".equals(cldsServiceData.getServiceUUID()));
assertTrue(cldsServiceData.getCldsVfs().size() == 1);
List<CldsAlarmCondition> alarmsList = spy.getAllAlarmConditionsFromCldsServiceData(cldsServiceData,
- "alarmCondition");
+ "alarmCondition");
assertTrue(alarmsList.size() == 12);
}
}
diff --git a/src/test/java/org/onap/clamp/clds/it/SdcReqItCase.java b/src/test/java/org/onap/clamp/clds/it/SdcReqItCase.java
index f05b33e1..971b36f6 100644
--- a/src/test/java/org/onap/clamp/clds/it/SdcReqItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/SdcReqItCase.java
@@ -18,7 +18,7 @@
* limitations under the License.
* ============LICENSE_END============================================
* ===================================================================
- *
+ *
*/
package org.onap.clamp.clds.it;
@@ -68,7 +68,7 @@ public class SdcReqItCase {
modelName = "example-model01";
controlName = "ClosedLoop_FRWL_SIG_fad4dcae_e498_11e6_852e_0050568c4ccf";
modelProperties = new ModelProperties(modelName, controlName, CldsEvent.ACTION_SUBMIT, false, modelBpmn,
- modelBpmnProp);
+ modelBpmnProp);
jsonWithYamlInside = ResourceFileUtil.getResourceAsString("example/tca-policy-req/prop-text.json");
}
@@ -76,26 +76,23 @@ public class SdcReqItCase {
public void formatBlueprintTest() throws IOException {
String blueprintFormatted = sdcReq.formatBlueprint(modelProperties, jsonWithYamlInside);
assertEquals(ResourceFileUtil.getResourceAsString("example/tca-policy-req/blueprint-expected.yaml"),
- blueprintFormatted);
+ blueprintFormatted);
}
@Test
public void formatSdcLocationsReqTest() {
String blueprintFormatted = sdcReq.formatSdcLocationsReq(modelProperties, "testos");
assertEquals(
- "{\"artifactName\":\"testos\",\"locations\":[\"SNDGCA64\",\"ALPRGAED\",\"LSLEILAA\",\"MDTWNJC1\"]}",
- blueprintFormatted);
+ "{\"artifactName\":\"testos\",\"locations\":[\"SNDGCA64\",\"ALPRGAED\",\"LSLEILAA\",\"MDTWNJC1\"]}",
+ blueprintFormatted);
}
@Test
public void formatSdcReqTest() throws JSONException {
- String jsonResult = sdcReq.formatSdcReq("payload", "artifactName",
- "artifactLabel", "artifactType");
- JSONAssert.assertEquals(
- "{\"payloadData\" : \"cGF5bG9hZA==\",\"artifactLabel\" : \"artifactLabel\"," +
- "\"artifactName\" :\"artifactName\",\"artifactType\" : \"artifactType\","
- + "\"artifactGroupType\" : \"DEPLOYMENT\",\"description\" : \"from CLAMP Cockpit\"}",
- jsonResult, true);
+ String jsonResult = sdcReq.formatSdcReq("payload", "artifactName", "artifactLabel", "artifactType");
+ JSONAssert.assertEquals("{\"payloadData\" : \"cGF5bG9hZA==\",\"artifactLabel\" : \"artifactLabel\","
+ + "\"artifactName\" :\"artifactName\",\"artifactType\" : \"artifactType\","
+ + "\"artifactGroupType\" : \"DEPLOYMENT\",\"description\" : \"from CLAMP Cockpit\"}", jsonResult, true);
}
@Test
@@ -104,6 +101,6 @@ public class SdcReqItCase {
assertNotNull(listUrls);
assertTrue(listUrls.size() == 1);
assertTrue(listUrls.get(0).contains(
- "/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/resourceInstances/vpacketgen0/artifacts"));
+ "/sdc/v1/catalog/services/56441b4b-0467-41dc-9a0e-e68613838219/resourceInstances/vpacketgen0/artifacts"));
}
}
diff --git a/src/test/java/org/onap/clamp/clds/it/config/CldsReferencePropertiesItCase.java b/src/test/java/org/onap/clamp/clds/it/config/CldsReferencePropertiesItCase.java
index 95e29c03..9d58ba8f 100644
--- a/src/test/java/org/onap/clamp/clds/it/config/CldsReferencePropertiesItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/config/CldsReferencePropertiesItCase.java
@@ -18,7 +18,7 @@
* limitations under the License.
* ============LICENSE_END============================================
* ===================================================================
- *
+ *
*/
package org.onap.clamp.clds.it.config;
@@ -26,10 +26,12 @@ package org.onap.clamp.clds.it.config;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import com.fasterxml.jackson.databind.node.ObjectNode;
import java.io.IOException;
+import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -64,7 +66,7 @@ public class CldsReferencePropertiesItCase {
* Test getting prop value as a JSON Node / template.
*
* @throws IOException
- * when JSON parsing fails
+ * when JSON parsing fails
*/
@Test
public void testGetJsonTemplate() throws IOException {
@@ -85,7 +87,7 @@ public class CldsReferencePropertiesItCase {
* Test getting prop value as a JSON Node / template.
*
* @throws IOException
- * when JSON parsing fails
+ * when JSON parsing fails
*/
@Test
public void testGetFileContent() throws IOException {
@@ -95,4 +97,13 @@ public class CldsReferencePropertiesItCase {
content = refProp.getFileContent("sdc.decode", "service_ids");
assertEquals("{}", content);
}
+
+ @Test
+ public void testGetStringList() {
+ List<String> profileList = refProp.getStringList("policy.pdpUrl1", ",");
+ assertTrue(profileList.size() == 3);
+ assertTrue(profileList.get(0).trim().startsWith("http://localhost:"));
+ assertTrue(profileList.get(1).trim().equals("testpdp"));
+ assertTrue(profileList.get(2).trim().equals("alpha123"));
+ }
}
diff --git a/src/test/java/org/onap/clamp/clds/it/config/SdcControllersConfigurationItCase.java b/src/test/java/org/onap/clamp/clds/it/config/SdcControllersConfigurationItCase.java
index 4b632488..0cab4b9d 100644
--- a/src/test/java/org/onap/clamp/clds/it/config/SdcControllersConfigurationItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/config/SdcControllersConfigurationItCase.java
@@ -1,15 +1,15 @@
/*-
* ============LICENSE_START=======================================================
- * ONAP - SO
+ * ONAP CLAMP
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -56,7 +56,7 @@ public class SdcControllersConfigurationItCase {
public void testGetAllDefinedControllers() throws IOException {
loadFile("classpath:/clds/sdc-controllers-config.json");
Map<String, SdcSingleControllerConfiguration> mapResult = sdcControllersConfiguration
- .getAllDefinedControllers();
+ .getAllDefinedControllers();
assertTrue(mapResult.size() == 2);
assertEquals("sdc-controller1", mapResult.get("sdc-controller1").getSdcControllerName());
assertEquals("sdc-controller2", mapResult.get("sdc-controller2").getSdcControllerName());
@@ -65,10 +65,10 @@ public class SdcControllersConfigurationItCase {
@Test
public void testGetSdcSingleControllerConfiguration() throws IOException {
loadFile("classpath:/clds/sdc-controllers-config.json");
- assertEquals("sdc-controller1", sdcControllersConfiguration
- .getSdcSingleControllerConfiguration("sdc-controller1").getSdcControllerName());
- assertEquals("sdc-controller2", sdcControllersConfiguration
- .getSdcSingleControllerConfiguration("sdc-controller2").getSdcControllerName());
+ assertEquals("sdc-controller1",
+ sdcControllersConfiguration.getSdcSingleControllerConfiguration("sdc-controller1").getSdcControllerName());
+ assertEquals("sdc-controller2",
+ sdcControllersConfiguration.getSdcSingleControllerConfiguration("sdc-controller2").getSdcControllerName());
}
@Test(expected = IOException.class)
diff --git a/src/test/java/org/onap/clamp/clds/it/sdc/controller/SdcSingleControllerItCase.java b/src/test/java/org/onap/clamp/clds/it/sdc/controller/SdcSingleControllerItCase.java
new file mode 100644
index 00000000..9eaca5f7
--- /dev/null
+++ b/src/test/java/org/onap/clamp/clds/it/sdc/controller/SdcSingleControllerItCase.java
@@ -0,0 +1,108 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * 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.clamp.clds.it.sdc.controller;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.assertj.core.api.Assertions;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.onap.clamp.clds.config.ClampProperties;
+import org.onap.clamp.clds.config.sdc.SdcSingleControllerConfigurationTest;
+import org.onap.clamp.clds.sdc.controller.SdcSingleController;
+import org.onap.clamp.clds.sdc.controller.installer.CsarHandler;
+import org.onap.clamp.clds.sdc.controller.installer.CsarInstaller;
+import org.onap.sdc.api.notification.IArtifactInfo;
+import org.onap.sdc.api.notification.INotificationData;
+import org.onap.sdc.api.notification.IResourceInstance;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class SdcSingleControllerItCase {
+
+ private static final String SDC_FOLDER = "/tmp/csar-handler-tests";
+ private static final String CSAR_ARTIFACT_NAME = "testArtifact.csar";
+ private static final String SERVICE_UUID = "serviceUUID";
+ private static final String RESOURCE1_UUID = "resource1UUID";
+ private static final String RESOURCE1_INSTANCE_NAME = "sim-1802 0";
+ private static final String RESOURCE1_INSTANCE_NAME_IN_CSAR = "sim18020";
+ private static final String BLUEPRINT1_NAME = "FOI.Simfoimap223S0112.event_proc_bp.yaml";
+
+ @Autowired
+ private ClampProperties clampProp;
+
+ private SdcSingleController sdcSingleController;
+
+ private INotificationData buildFakeSdcNotification() {
+ // BUild what is needed for CSAR
+ IArtifactInfo serviceArtifact = Mockito.mock(IArtifactInfo.class);
+ Mockito.when(serviceArtifact.getArtifactType()).thenReturn(CsarHandler.CSAR_TYPE);
+ Mockito.when(serviceArtifact.getArtifactName()).thenReturn(CSAR_ARTIFACT_NAME);
+ List<IArtifactInfo> servicesList = new ArrayList<>();
+ servicesList.add(serviceArtifact);
+ INotificationData notifData = Mockito.mock(INotificationData.class);
+ Mockito.when(notifData.getServiceArtifacts()).thenReturn(servicesList);
+ // Build what is needed for UUID
+ Mockito.when(notifData.getServiceInvariantUUID()).thenReturn(SERVICE_UUID);
+ // Build fake resource with one artifact BLUEPRINT
+ IResourceInstance resource1 = Mockito.mock(IResourceInstance.class);
+ Mockito.when(resource1.getResourceType()).thenReturn("VF");
+ Mockito.when(resource1.getResourceInvariantUUID()).thenReturn(RESOURCE1_UUID);
+ Mockito.when(resource1.getResourceInstanceName()).thenReturn(RESOURCE1_INSTANCE_NAME);
+ // Create a fake artifact for resource
+ IArtifactInfo blueprintArtifact = Mockito.mock(IArtifactInfo.class);
+ Mockito.when(blueprintArtifact.getArtifactType()).thenReturn(CsarHandler.BLUEPRINT_TYPE);
+ List<IArtifactInfo> artifactsListForResource = new ArrayList<>();
+ artifactsListForResource.add(blueprintArtifact);
+ Mockito.when(resource1.getArtifacts()).thenReturn(artifactsListForResource);
+ List<IResourceInstance> resourcesList = new ArrayList<>();
+ resourcesList.add(resource1);
+ Mockito.when(notifData.getResources()).thenReturn(resourcesList);
+ return notifData;
+ }
+
+ @Before
+ public void init() throws IOException {
+ sdcSingleController = new SdcSingleController(clampProp, Mockito.mock(CsarInstaller.class),
+ SdcSingleControllerConfigurationTest.loadControllerConfiguration("clds/sdc-controller-config-TLS.json",
+ "sdc-controller1"),
+ null) {
+ };
+ }
+
+ @Test
+ public void testTreatNotification() {
+ sdcSingleController.treatNotification(buildFakeSdcNotification());
+ Assertions.assertThat(sdcSingleController.getNbOfNotificationsOngoing()).isEqualTo(0);
+
+ }
+
+}
diff --git a/src/test/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfoTest.java b/src/test/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfoTest.java
new file mode 100644
index 00000000..119fd218
--- /dev/null
+++ b/src/test/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfoTest.java
@@ -0,0 +1,100 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * 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=========================================================
+ * Modifications copyright (c) 2018 Nokia
+ * ================================================================================
+ *
+ */
+
+package org.onap.clamp.clds.model.sdc;
+
+import org.assertj.core.api.Assertions;
+import org.junit.Test;
+
+public class SdcResourceBasicInfoTest {
+
+ @Test
+ public void testHashCode() {
+ SdcResourceBasicInfo sdc1a = new SdcResourceBasicInfo();
+ SdcResourceBasicInfo sdc1b = new SdcResourceBasicInfo();
+ SdcResourceBasicInfo sdc2 = new SdcResourceBasicInfo();
+ sdc1a.setName("test1");
+ sdc1a.setVersion("1.0");
+ sdc1b.setName("test1");
+ sdc1b.setVersion("2.0");
+ sdc2.setName("test2");
+ sdc2.setVersion("2.0");
+
+ Assertions.assertThat(sdc1a.hashCode()).isNotEqualTo(sdc1b.hashCode());
+ Assertions.assertThat(sdc1b.hashCode()).isNotEqualTo(sdc2.hashCode());
+ sdc1b.setVersion("1.0");
+ Assertions.assertThat(sdc1a.hashCode()).isEqualTo(sdc1b.hashCode());
+
+ }
+
+ @Test
+ public void testCompareTo() {
+ SdcResourceBasicInfo sdc1a = new SdcResourceBasicInfo();
+ SdcResourceBasicInfo sdc1b = new SdcResourceBasicInfo();
+ SdcResourceBasicInfo sdc2 = new SdcResourceBasicInfo();
+ sdc1a.setName("test1");
+ sdc1a.setVersion("1.0");
+ sdc1b.setName("test1");
+ sdc1b.setVersion("2.0");
+ sdc2.setName("test2");
+ sdc2.setVersion("2.0");
+
+ Assertions.assertThat(sdc1a.compareTo(sdc1b)).isEqualTo(-1);
+ Assertions.assertThat(sdc1b.compareTo(sdc1a)).isEqualTo(1);
+ Assertions.assertThat(sdc1a.compareTo(sdc1a)).isEqualTo(0);
+ Assertions.assertThat(sdc1a.compareTo(sdc2)).isEqualTo(-1);
+ }
+
+ @Test
+ public void testEquals() {
+ SdcResourceBasicInfo sdc1a = new SdcResourceBasicInfo();
+ SdcResourceBasicInfo sdc1b = new SdcResourceBasicInfo();
+ SdcResourceBasicInfo sdc2 = new SdcResourceBasicInfo();
+ sdc1a.setName("test1");
+ sdc1a.setVersion("1.0");
+ sdc1b.setName("test1");
+ sdc1b.setVersion("2.0");
+ sdc2.setName("test2");
+ sdc2.setVersion("2.0");
+
+ Assertions.assertThat(sdc1a.equals(sdc1a)).isTrue();
+ Assertions.assertThat(sdc1a.equals(sdc1b)).isFalse();
+
+ sdc1b.setVersion(null);
+ Assertions.assertThat(sdc1a.equals(sdc1b)).isFalse();
+ sdc1b.setVersion("1.0");
+ Assertions.assertThat(sdc1a.equals(sdc1b)).isTrue();
+ sdc1a.setVersion(null);
+ sdc1b.setVersion(null);
+ Assertions.assertThat(sdc1a.equals(sdc1b)).isTrue();
+
+ sdc1b.setName(null);
+ Assertions.assertThat(sdc1a.equals(sdc1b)).isFalse();
+ sdc1b.setName("test1");
+ Assertions.assertThat(sdc1a.equals(sdc1b)).isTrue();
+ sdc1a.setName(null);
+ sdc1b.setName(null);
+ Assertions.assertThat(sdc1a.equals(sdc1b)).isTrue();
+ }
+
+}
diff --git a/src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTest.java b/src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTest.java
new file mode 100644
index 00000000..d94ffaba
--- /dev/null
+++ b/src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTest.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * 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.clamp.clds.tosca;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+
+import org.junit.Test;
+import org.onap.clamp.clds.util.ResourceFileUtil;
+import org.skyscreamer.jsonassert.JSONAssert;
+
+public class ToscaYamlToJsonConvertorTest {
+
+ /**
+ * This Test validates TOSCA yaml to JSON Schema conversion based on JSON Editor
+ * Schema.
+ *
+ * @throws IOException
+ *
+ */
+ @Test
+ public final void testParseToscaYaml() throws IOException {
+ String toscaModelYaml = ResourceFileUtil.getResourceAsString("tosca/tosca_example.yaml");
+ ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor(null);
+
+ String parsedJsonSchema = convertor.parseToscaYaml(toscaModelYaml);
+ assertNotNull(parsedJsonSchema);
+ JSONAssert.assertEquals(
+ ResourceFileUtil.getResourceAsString("example/json-editor-schema/tca-policy-json-editor-schema.json"),
+ parsedJsonSchema, true);
+ }
+}
diff --git a/src/test/java/org/onap/clamp/clds/util/JacksonUtilsTest.java b/src/test/java/org/onap/clamp/clds/util/JacksonUtilsTest.java
index e482d687..1d9e4e79 100644
--- a/src/test/java/org/onap/clamp/clds/util/JacksonUtilsTest.java
+++ b/src/test/java/org/onap/clamp/clds/util/JacksonUtilsTest.java
@@ -5,20 +5,20 @@
* 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.
+ * 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
+ *
+ * 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.clamp.clds.util;
@@ -73,21 +73,22 @@ public class JacksonUtilsTest {
/**
* This method test that the security hole in Jackson is not enabled in the
* default ObjectMapper.
- *
+ *
* @throws JsonParseException
- * In case of issues
+ * In case of issues
* @throws JsonMappingException
- * In case of issues
+ * In case of issues
* @throws IOException
- * In case of issues
+ * In case of issues
*/
@Test
public void testCreateBeanDeserializer() throws JsonParseException, JsonMappingException, IOException {
TestClass test = new TestClass("value1", "value2");
test.setObject2(new TestObject2("test3"));
- Object testObject = JacksonUtils.getObjectMapperInstance().readValue(
- "[\"org.onap.clamp.clds.util.JacksonUtilsTest$TestClass\",{\"test\":\"value1\",\"test2\":\"value2\",\"object2\":[\"org.onap.clamp.clds.util.TestObject2\",{\"test3\":\"test3\"}]}]",
- Object.class);
+ Object testObject = JacksonUtils.getObjectMapperInstance()
+ .readValue("[\"org.onap.clamp.clds.util.JacksonUtilsTest$TestClass\""
+ + ",{\"test\":\"value1\",\"test2\":\"value2\",\"object2\":[\"org.onap.clamp.clds.util.TestObject2\","
+ + "{\"test3\":\"test3\"}]}]", Object.class);
assertNotNull(testObject);
assertFalse(testObject instanceof TestObject);
assertFalse(testObject instanceof TestClass);
diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties
index aa43ea2e..d75c6086 100644
--- a/src/test/resources/application.properties
+++ b/src/test/resources/application.properties
@@ -30,7 +30,7 @@ info.build.version=@project.version@
### (See below for the parameter 'server.http.port' if you want to have both enabled)
### To have only HTTP, keep the lines server.ssl.* commented
### To have only HTTPS enabled, uncomment the server.ssl.* lines and specify a right keystore location
-server.port=8080
+server.port=${clamp.it.tests.http}
### Settings for HTTPS (this automatically enables the HTTPS on the port 'server.port')
#server.ssl.key-store=file:/tmp/mykey.jks
#server.ssl.key-store-password=pass
@@ -122,7 +122,6 @@ clamp.config.files.sdcController=classpath:/clds/sdc-controllers-config.json
# DCAE request build properties
#
clamp.config.dcae.template=classpath:/clds/templates/dcae-template.json
-clamp.config.dcae.decode.service_ids=classpath:/clds/templates/dcae-decode-service_ids.json
clamp.config.dcae.deployment.template=classpath:/clds/templates/dcae-deployment-template.json
#
# SDC request blueprint properties
@@ -155,6 +154,10 @@ clamp.config.policy.op.policyNamePrefix=Config_BRMS_Param_
clamp.config.policy.base.policyNamePrefix=Config_
clamp.config.policy.op.type=BRMS_Param
+clamp.config.import.tosca.model=false
+clamp.config.tosca.policyTypes=tca
+clamp.config.tosca.filePath=/tmp/tosca-models
+
# TCA MicroService Policy request build properties
#
clamp.config.tca.policyid.prefix=DCAE.Config_
@@ -188,11 +191,10 @@ clamp.config.sdc.locationArtifactType=DCAE_INVENTORY_JSON
clamp.config.sdc.InstanceID=X-ECOMP-InstanceID
clamp.config.sdc.header.requestId = X-ECOMP-RequestID
#
-clamp.config.sdc.csarFolder = /tmp/sdc-tests
+clamp.config.sdc.csarFolder = ${project.build.directory}/sdc-tests
clamp.config.sdc.blueprint.parser.mapping = classpath:/clds/blueprint-parser-mapping.json
#
clamp.config.ui.location.default=classpath:/clds/templates/ui-location-default.json
-clamp.config.ui.alarm.default=classpath:/clds/templates/ui-alarm-default.json
#
# if action.test.override is true, then any action will be marked as test=true (even if incoming action request had test=false); otherwise, test flag will be unchanged on the action request
clamp.config.action.test.override=false
@@ -217,5 +219,7 @@ clamp.config.security.permission.type.cl.manage=permission-type-cl-manage
clamp.config.security.permission.type.cl.event=permission-type-cl-event
clamp.config.security.permission.type.filter.vf=permission-type-filter-vf
clamp.config.security.permission.type.template=permission-type-template
+clamp.config.security.permission.type.tosca=permission-type-tosca
#This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties
-clamp.config.security.permission.instance=dev \ No newline at end of file
+clamp.config.security.permission.instance=dev
+clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal \ No newline at end of file
diff --git a/src/test/resources/clds/camel/routes/flexible-flow.xml b/src/test/resources/clds/camel/routes/flexible-flow.xml
new file mode 100644
index 00000000..2103b4ac
--- /dev/null
+++ b/src/test/resources/clds/camel/routes/flexible-flow.xml
@@ -0,0 +1,61 @@
+<routes xmlns="http://camel.apache.org/schema/spring">
+ <route id="submit">
+ <from uri="direct:processSubmit" />
+ <choice>
+ <when>
+ <simple> ${exchangeProperty.actionCd} == 'SUBMIT' || ${exchangeProperty.actionCd} == 'RESUBMIT'</simple>
+ <to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'INITIATED')" />
+ <to uri="bean:org.onap.clamp.clds.client.TcaPolicyDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.HolmesPolicyDelegate" />
+ <delay>
+ <constant>30000</constant>
+ </delay>
+ <to uri="bean:org.onap.clamp.clds.client.OperationalPolicyDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'COMPLETED')" />
+ </when>
+ <when>
+ <simple> ${exchangeProperty.actionCd} == 'DELETE'</simple>
+ <to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'INITIATED')" />
+ <to uri="bean:org.onap.clamp.clds.client.TcaPolicyDeleteDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.HolmesPolicyDeleteDelegate" />
+ <delay>
+ <constant>30000</constant>
+ </delay>
+ <to
+ uri="bean:org.onap.clamp.clds.client.OperationalPolicyDeleteDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDeleteDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.ModelDeleteDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'COMPLETED')" />
+ </when>
+ <when>
+ <simple> ${exchangeProperty.actionCd} == 'UPDATE'</simple>
+ <to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'INITIATED')" />
+ <to uri="bean:org.onap.clamp.clds.client.TcaPolicyDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.HolmesPolicyDelegate" />
+ <delay>
+ <constant>30000</constant>
+ </delay>
+ <to uri="bean:org.onap.clamp.clds.client.OperationalPolicyDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'COMPLETED')" />
+ </when>
+ <when>
+ <simple> ${exchangeProperty.actionCd} == 'STOP'</simple>
+ <to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'INITIATED')" />
+ <to
+ uri="bean:org.onap.clamp.clds.client.OperationalPolicyDeleteDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDeleteDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'COMPLETED')" />
+ </when>
+ <when>
+ <simple> ${exchangeProperty.actionCd} == 'RESTART'</simple>
+ <to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'INITIATED')" />
+ <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.OperationalPolicyDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate?method=addEvent(*,'COMPLETED')" />
+ </when>
+ </choice>
+ </route>
+
+</routes> \ No newline at end of file
diff --git a/src/test/resources/clds/templates/dcae-decode-service_ids.json b/src/test/resources/clds/templates/dcae-decode-service_ids.json
deleted file mode 100644
index 619cac67..00000000
--- a/src/test/resources/clds/templates/dcae-decode-service_ids.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "vUSP": [
- "vUSP - vCTS"
- ],
- "Trinity": [
- "ASBGv TLS VNF",
- "ASBGv No TLS",
- "ASBGv (NO TLS) VNF",
- "ASBGv TLS",
- "NSBGv VNF",
- "NSBGv"
- ],
- "vSCP": [
- "AKRON_vSCP_F5_FW-SVC/vSCP_F5_FW 1",
- "ALLEN_vSCP_F5_FW-SVC/vSCP_F5_FW 1"
- ],
- "vProbes": [
- "vProbes - FW"
- ]
-}
diff --git a/src/test/resources/clds/templates/ui-alarm-default.json b/src/test/resources/clds/templates/ui-alarm-default.json
deleted file mode 100644
index c851e6cd..00000000
--- a/src/test/resources/clds/templates/ui-alarm-default.json
+++ /dev/null
@@ -1,597 +0,0 @@
-{
- "Reports a transient alarm condition when an incoming CDR cannot be decoded successfully": "vCCF: Reports a transient alarm condition when an incoming CDR cannot be decoded successfully",
- "Reports a transient alarm condition when an incoming ACR message cannot be decoded successfully": "vCCF: Reports a transient alarm condition when an incoming ACR message cannot be decoded successfully",
- "Reports a transient alarm condition when a CDR validation fails": "vCCF: Reports a transient alarm condition when a CDR validation fails",
- "Reports a transient alarm condition when an incoming GTP' message cannot be decoded successfully": "vCCF: Reports a transient alarm condition when an incoming GTP' message cannot be decoded successfully",
- "Reports a transient alarm condition when an incoming CDR file cannot be decoded successfully": "vCCF: Reports a transient alarm condition when an incoming CDR file cannot be decoded successfully",
- "Reports a transient alarm condition when an incoming Sh/Dh file cannot be decoded successfully": "vCCF: Reports a transient alarm condition when an incoming Sh/Dh file cannot be decoded successfully",
- "Reports a transient alarm condition when an incoming ACR message is in conflict with former ACR in one diameter session": "vCCF: Reports a transient alarm condition when an incoming ACR message is in conflict with former ACR in one diameter session",
- "Reports a transient alarm condition when an outgoing Ro message send fails": "vCCF: Reports a transient alarm condition when an outgoing Ro message send fails",
- "Reports a transient alarm condition when an outgoing GTP' message send fails": "vCCF: Reports a transient alarm condition when an outgoing GTP' message send fails",
- "Reports a transient alarm condition when an outgoing Sh/Dh message send fails": "vCCF: Reports a transient alarm condition when an outgoing Sh/Dh message send fails",
- "Reports an alarm when build or send Rf message fail": "vCCF: Reports an alarm when build or send Rf message fail",
- "Reports a transient alarm condition when an abnormal incoming CCA message": "vCCF: Reports a transient alarm condition when an abnormal incoming CCA message",
- "Reports a transient alarm condition when there is an abnormal incoming Sh/Dh message": "vCCF: Reports a transient alarm condition when there is an abnormal incoming Sh/Dh message",
- "For Rf interface, if IeCCF receives a message with incorrect value for session id.": "vCCF: For Rf interface, if IeCCF receives a message with incorrect value for session id.",
- "Reports an alarm when CPU usage exceeds the major threshold, the local database exceeds the critical threshold, or the ACR partition exceeds the major threshold": "vCCF: Reports an alarm when CPU usage exceeds the major threshold, the local database exceeds the critical threshold, or the ACR partition exceeds the major threshold",
- "Reports an alarm when CPU usage exceeds the minor threshold, the local database exceeds the major threshold, or the ACR partition exceeds the minor threshold": "vCCF: Reports an alarm when CPU usage exceeds the minor threshold, the local database exceeds the major threshold, or the ACR partition exceeds the minor threshold",
- "Reports an alarm when CPU usage exceeds the critical threshold, the local database exceeds the major threshold, or the CDR partition exceeds the critical threshold": "vCCF: Reports an alarm when CPU usage exceeds the critical threshold, the local database exceeds the major threshold, or the CDR partition exceeds the critical threshold",
- "Reports an alarm when CPU usage exceeds the major threshold or CDR partition exceeds the major threshold": "vCCF: Reports an alarm when CPU usage exceeds the major threshold or CDR partition exceeds the major threshold",
- "Reports an alarm when external DB usage exceeds the major threshold": "vCCF: Reports an alarm when external DB usage exceeds the major threshold",
- "Reports a transient alarm condition when the workflow definition table is provisioned wrongly": "vCCF: Reports a transient alarm condition when the workflow definition table is provisioned wrongly",
- "Reports a transient alarm condition when the Action Definition table is provisioned wrongly": "vCCF: Reports a transient alarm condition when the Action Definition table is provisioned wrongly",
- "Reports a transient alarm condition when the Ro Host Configuration is provisioned wrongly": "vCCF: Reports a transient alarm condition when the Ro Host Configuration is provisioned wrongly",
- "Reports a transient alarm condition when the Sh Host Configuration is provisioned wrongly": "vCCF: Reports a transient alarm condition when the Sh Host Configuration is provisioned wrongly",
- "Reports a transient alarm condition when a specific dictionary or rule does not exist": "vCCF: Reports a transient alarm condition when a specific dictionary or rule does not exist",
- "Reports a transient alarm condition when failure occurs when mapping Rf message to XDR": "vCCF: Reports a transient alarm condition when failure occurs when mapping Rf message to XDR",
- "Reports a transient alarm condition when failure occurs in aggregating process": "vCCF: Reports a transient alarm condition when failure occurs in aggregating process",
- "Reports a transient alarm condition when failure happens in correlating process": "vCCF: Reports a transient alarm condition when failure happens in correlating process",
- "Reports a transient alarm condition when failure occurs in generating CDR": "vCCF: Reports a transient alarm condition when failure occurs in generating CDR",
- "Reports a transient alarm condition when failure occurs in constructing CCR message from XDR": "vCCF: Reports a transient alarm condition when failure occurs in constructing CCR message from XDR",
- "Reports a transient alarm condition when an ACR/XER/BER/INC record write to bad file": "vCCF: Reports a transient alarm condition when an ACR/XER/BER/INC record write to bad file",
- "Reports an alarm condition when aggregation or correlation central database connection is lost": "vCCF: Reports an alarm condition when aggregation or correlation central database connection is lost",
- "Reports an alarm condition when a specific failure happens in database operations": "vCCF: Reports an alarm condition when a specific failure happens in database operations",
- "Reports an alarm condition when DB capacity has been consumed to critical threshold": "vCCF: Reports an alarm condition when DB capacity has been consumed to critical threshold",
- "Reports an alarm condition when DB capacity has been consumed to major threshold": "vCCF: Reports an alarm condition when DB capacity has been consumed to major threshold",
- "Reports an alarm condition when DB capacity has been consumed to minor threshold.": "vCCF: Reports an alarm condition when DB capacity has been consumed to minor threshold.",
- "Reports an alarm condition when application cannot deliver CDR to CDRSCH subsystem": "vCCF: Reports an alarm condition when application cannot deliver CDR to CDRSCH subsystem",
- "Reports an alarm condition when some fields of ACR file header have error value and this ACR file cannot be processed further": "vCCF: Reports an alarm condition when some fields of ACR file header have error value and this ACR file cannot be processed further",
- "Reports an alarm condition when some fields of ACR file header have invalid value and this ACR file can be processed further": "vCCF: Reports an alarm condition when some fields of ACR file header have invalid value and this ACR file can be processed further",
- "Reports an alarm condition when the ACR file loses some ACR records": "vCCF: Reports an alarm condition when the ACR file loses some ACR records",
- "Reports an alarm condition when some fields of ACR record header have error value and this ACR record and the following ACR records cannot be processed further": "vCCF: Reports an alarm condition when some fields of ACR record header have error value and this ACR record and the following ACR records cannot be processed further",
- "Reports an alarm condition when error occurs in processing CDR/ACR files": "vCCF: Reports an alarm condition when error occurs in processing CDR/ACR files",
- "Reports an alarm condition when CDR partition has been consumed to critical threshold": "vCCF: Reports an alarm condition when CDR partition has been consumed to critical threshold",
- "Reports an alarm condition when CDR partition has been consumed to major threshold.": "vCCF: Reports an alarm condition when CDR partition has been consumed to major threshold.",
- "Reports an alarm condition when CDR partition has been consumed to minor threshold": "vCCF: Reports an alarm condition when CDR partition has been consumed to minor threshold",
- "Reports an alarm condition when ACR partition has been consumed to critical threshold": "vCCF: Reports an alarm condition when ACR partition has been consumed to critical threshold",
- "Reports an alarm condition when ACR partition has been consumed to major threshold": "vCCF: Reports an alarm condition when ACR partition has been consumed to major threshold",
- "Reports an alarm condition when ACR partition has been consumed to minor threshold": "vCCF: Reports an alarm condition when ACR partition has been consumed to minor threshold",
- "Reports an alarm condition when CPU consumption reaches critical threshold": "vCCF: Reports an alarm condition when CPU consumption reaches critical threshold",
- "Reports an alarm condition when CPU consumption reaches major threshold": "vCCF: Reports an alarm condition when CPU consumption reaches major threshold",
- "Reports an alarm condition when CPU consumption reaches minor threshold": "vCCF: Reports an alarm condition when CPU consumption reaches minor threshold",
- "Service shall monitor * number of partial CDR * number of incompleted CDR * number of unacceptable CDR If any one exceeds a configurable threshold in a configrable interval.": "vCCF: Service shall monitor * number of partial CDR * number of incompleted CDR * number of unacceptable CDR If any one exceeds a configurable threshold in a configrable interval.",
- "CDR size exceed the platform capacity.": "vCCF: CDR size exceed the platform capacity.",
- "Service shall monitor number of ACR without AII AVP, If it exceeds a configurable threshold in a configurable interval.": "vCCF: Service shall monitor number of ACR without AII AVP, If it exceeds a configurable threshold in a configurable interval.",
- "Service shall monitor CDR cut due to ECCF_ACRNUMBER_IN_DB, If it exceeds a configurable threshold in a configurable interval.": "vCCF: Service shall monitor CDR cut due to ECCF_ACRNUMBER_IN_DB, If it exceeds a configurable threshold in a configurable interval.",
- "External Node of this Cluster is overload": "vCCF: External Node of this Cluster is overload",
- "bdb_high_latency": "vCCF-vDB: bdb_high_latency",
- "bdb_high_throughput": "vCCF-vDB: bdb_high_throughput",
- "bdb_size": "vCCF-vDB: bdb_size",
- "cluster_inconsistent_rl_sw": "vCCF-vDB: cluster_inconsistent_rl_sw",
- "cluster_node_remove_abort_failed": "vCCF-vDB: cluster_node_remove_abort_failed",
- "cluster_node_remove_failed": "vCCF-vDB: cluster_node_remove_failed",
- "cluster_ram_overcommit": "vCCF-vDB: cluster_ram_overcommit",
- "cluster_rebalance_failed": "vCCF-vDB: cluster_rebalance_failed",
- "cluster_too_few_nodes_for_replication": "vCCF-vDB: cluster_too_few_nodes_for_replication",
- "node_cpu_utilization": "vCCF-vDB: node_cpu_utilization",
- "node_ephemeral_storage": "vCCF-vDB: node_ephemeral_storage",
- "node_failed": "vCCF-vDB: node_failed",
- "node_memory": "vCCF-vDB: node_memory",
- "node_net_throughput": "vCCF-vDB: node_net_throughput",
- "node_offline_failed": "vCCF-vDB: node_offline_failed",
- "node_offline_abort_failed": "vCCF-vDB: node_offline_abort_failed",
- "node_online_failed": "vCCF-vDB: node_online_failed",
- "OAM NODE-<OAME-hostname> IS NOT ACTIVE ": "vCCF-vDB: OAM NODE-<OAME-hostname> IS NOT ACTIVE ",
- "LSS_asdaCommunicationFailure": "vCTS: LSS_asdaCommunicationFailure",
- "LSS_ccdbCommunicationFailure": "vCTS: LSS_ccdbCommunicationFailure",
- "LSS_cpiCTS3xxFailRate": "vCTS: LSS_cpiCTS3xxFailRate",
- "LSS_cpiCTS4xxFailRate": "vCTS: LSS_cpiCTS4xxFailRate",
- "LSS_cpiCTS5xxFailRate": "vCTS: LSS_cpiCTS5xxFailRate",
- "LSS_cpiCTS6xxFailRate": "vCTS: LSS_cpiCTS6xxFailRate",
- "LSS_cpiCTSSIPRetransmitInvite": "vCTS: LSS_cpiCTSSIPRetransmitInvite",
- "LSS_cpiCTSSIPRetransmitNonInvite": "vCTS: LSS_cpiCTSSIPRetransmitNonInvite",
- "LSS_glsInvalidCellId": "vCTS: LSS_glsInvalidCellId",
- "LSS_glsServerUnavailable": "vCTS: LSS_glsServerUnavailable",
- "LSS_hlrSyncConnection": "vCTS: LSS_hlrSyncConnection",
- "LSS_hlrSyncQueue": "vCTS: LSS_hlrSyncQueue",
- "LSS_lispBufferFullExternalLIG": "vCTS: LSS_lispBufferFullExternalLIG",
- "LSS_prdbConnectWithAlternateFailure": "vCTS: LSS_prdbConnectWithAlternateFailure",
- "LSS_prdbSyncDataToAlternateFailure": "vCTS: LSS_prdbSyncDataToAlternateFailure",
- "LSS_preAllocatedResourceOverload": "vCTS: LSS_preAllocatedResourceOverload",
- "LSS_prifSocketError": "vCTS: LSS_prifSocketError",
- "LSS_prsCallInstanceExceeded": "vCTS: LSS_prsCallInstanceExceeded",
- "LSS_prsCpuOverload": "vCTS: LSS_prsCpuOverload",
- "LSS_prsDatabaseMigrationFailure": "vCTS: LSS_prsDatabaseMigrationFailure",
- "LSS_prsFailureToConnectWithPRDB": "vCTS: LSS_prsFailureToConnectWithPRDB",
- "LSS_prsQueueExceeded": "vCTS: LSS_prsQueueExceeded",
- "LSS_smdiSocketError": "vCTS: LSS_smdiSocketError",
- "LSS_socketError": "vCTS: LSS_socketError",
- "LSS_softwareComponentDown": "vCTS: LSS_softwareComponentDown",
- "LSS_tlsInitError": "vCTS: LSS_tlsInitError",
- "LSS_usageOfSyncTable": "vCTS: LSS_usageOfSyncTable",
- "LSS_utHttpProxyConnectionDown ": "vCTS: LSS_utHttpProxyConnectionDown ",
- "LSS_wpifSocketError": "vCTS: LSS_wpifSocketError",
- "LSS_acrTemporaryBufferOverload": "vCTS: LSS_acrTemporaryBufferOverload",
- "LSS_adnsExtendedTTLcaching": "vCTS: LSS_adnsExtendedTTLcaching",
- "LSS_adnsQueryFailureCaching": "vCTS: LSS_adnsQueryFailureCaching",
- "LSS_adnsQueueCongestion": "vCTS: LSS_adnsQueueCongestion",
- "LSS_asdaRequestQueue": "vCTS: LSS_asdaRequestQueue",
- "LSS_capacityLicenseKeyExpiration": "vCTS: LSS_capacityLicenseKeyExpiration",
- "LSS_capacityLicenseKeyNearExpiration": "vCTS: LSS_capacityLicenseKeyNearExpiration",
- "LSS_capacityLicenseKeyValidationError": "vCTS: LSS_capacityLicenseKeyValidationError",
- "LSS_cardConnectionLost": "vCTS: LSS_cardConnectionLost",
- "LSS_cpiAlrmCritical": "vCTS: LSS_cpiAlrmCritical",
- "LSS_cpiAlrmMajor": "vCTS: LSS_cpiAlrmMajor",
- "LSS_cpiAlrmMinor": "vCTS: LSS_cpiAlrmMinor",
- "LSS_cpiAlrmWarning": "vCTS: LSS_cpiAlrmWarning",
- "LSS_cpiAsrtEsc": "vCTS: LSS_cpiAsrtEsc",
- "LSS_cpiAsrtNonEsc": "vCTS: LSS_cpiAsrtNonEsc",
- "LSS_cpiAsrtNonEscCritical": "vCTS: LSS_cpiAsrtNonEscCritical",
- "LSS_cpiAsrtNonEscMajor": "vCTS: LSS_cpiAsrtNonEscMajor",
- "LSS_cpiAsrtNonEscMinor": "vCTS: LSS_cpiAsrtNonEscMinor",
- "LSS_cpiAudErrCount": "vCTS: LSS_cpiAudErrCount",
- "LSS_cpiAudManAct": "vCTS: LSS_cpiAudManAct",
- "LSS_cpiAudNewEvent": "vCTS: LSS_cpiAudNewEvent",
- "LSS_cpiCompleteRateAlarm": "vCTS: LSS_cpiCompleteRateAlarm",
- "LSS_cpiDropMGAllocConnReq": "vCTS: LSS_cpiDropMGAllocConnReq",
- "LSS_cpiDropRateAlarm": "vCTS: LSS_cpiDropRateAlarm",
- "LSS_cpiExceptionService": "vCTS: LSS_cpiExceptionService",
- "LSS_cpiFailRateAlarm": "vCTS: LSS_cpiFailRateAlarm",
- "LSS_cpiFailSCTPFastRetransIncr": "vCTS: LSS_cpiFailSCTPFastRetransIncr",
- "LSS_cpiFailSCTPFastRetransRate": "vCTS: LSS_cpiFailSCTPFastRetransRate",
- "LSS_cpiFailSCTPSRTT1Incr": "vCTS: LSS_cpiFailSCTPSRTT1Incr",
- "LSS_cpiFailSCTPSRTT2Incr": "vCTS: LSS_cpiFailSCTPSRTT2Incr",
- "LSS_cpiFailSCTPT3RetransIncr": "vCTS: LSS_cpiFailSCTPT3RetransIncr",
- "LSS_cpiFailSCTPT3RetransRate": "vCTS: LSS_cpiFailSCTPT3RetransRate",
- "LSS_cpiFileSysUsage": "vCTS: LSS_cpiFileSysUsage",
- "LSS_cpiMemAllocFail": "vCTS: LSS_cpiMemAllocFail",
- "LSS_cpiNumOfLICDRDel": "vCTS: LSS_cpiNumOfLICDRDel",
- "LSS_cpiReinitServiceSelf": "vCTS: LSS_cpiReinitServiceSelf",
- "LSS_cpiSIPRetransmitInvite": "vCTS: LSS_cpiSIPRetransmitInvite",
- "LSS_cpiSIPRetransmitNonInvite": "vCTS: LSS_cpiSIPRetransmitNonInvite",
- "LSS_cpiSS7DropSCTPPktsRcvd": "vCTS: LSS_cpiSS7DropSCTPPktsRcvd",
- "LSS_cpiSS7FailSCTPFastRetransRate": "vCTS: LSS_cpiSS7FailSCTPFastRetransRate",
- "LSS_cpiStabilityAlarm": "vCTS: LSS_cpiStabilityAlarm",
- "LSS_cpuOverload": "vCTS: LSS_cpuOverload",
- "LSS_databaseConnectionLost": "vCTS: LSS_databaseConnectionLost",
- "LSS_databaseReplicationLinkDown": "vCTS: LSS_databaseReplicationLinkDown",
- "LSS_databaseSizeExhausted": "vCTS: LSS_databaseSizeExhausted",
- "LSS_dbHighCpuUtilization": "vCTS: LSS_dbHighCpuUtilization",
- "LSS_dbOffline": "vCTS: LSS_dbOffline",
- "LSS_dbStatusUnexpected": "vCTS: LSS_dbStatusUnexpected",
- "LSS_degradedResource": "vCTS: LSS_degradedResource",
- "LSS_degrow": "vCTS: LSS_degrow",
- "LSS_deviceServerCxnLost": "vCTS: LSS_deviceServerCxnLost",
- "LSS_diamLinkDown": "vCTS: LSS_diamLinkDown",
- "LSS_diamMaxClientsExceeded": "vCTS: LSS_diamMaxClientsExceeded",
- "LSS_dnsThreshold": "vCTS: LSS_dnsThreshold",
- "LSS_ethernetError": "vCTS: LSS_ethernetError",
- "LSS_ethernetLinkDown": "vCTS: LSS_ethernetLinkDown",
- "LSS_externalConnectivity": "vCTS: LSS_externalConnectivity",
- "LSS_featureLicenseExpiration": "vCTS: LSS_featureLicenseExpiration",
- "LSS_featureLicenseKeyNearExpiration": "vCTS: LSS_featureLicenseKeyNearExpiration",
- "LSS_featureLockValidationError": "vCTS: LSS_featureLockValidationError",
- "LSS_fqdnError": "vCTS: LSS_fqdnError",
- "LSS_fru": "vCTS: LSS_fru",
- "LSS_gatewayCongestion": "vCTS: LSS_gatewayCongestion",
- "LSS_gatewayForcedOOS": "vCTS: LSS_gatewayForcedOOS",
- "LSS_gatewayProvisioningError": "vCTS: LSS_gatewayProvisioningError",
- "LSS_gatewayUnreachable": "vCTS: LSS_gatewayUnreachable",
- "LSS_gatewayUnregistered": "vCTS: LSS_gatewayUnregistered",
- "LSS_globalParameterNotFound": "vCTS: LSS_globalParameterNotFound",
- "LSS_grow": "vCTS: LSS_grow",
- "LSS_h248MessageBufferDepletion": "vCTS: LSS_h248MessageBufferDepletion",
- "LSS_hostDown": "vCTS: LSS_hostDown",
- "LSS_hostReset": "vCTS: LSS_hostReset",
- "LSS_invalidGateway": "vCTS: LSS_invalidGateway",
- "LSS_iriLinkDown": "vCTS: LSS_iriLinkDown",
- "LSS_ldapServerConnectionLost": "vCTS: LSS_ldapServerConnectionLost",
- "LSS_llcDown": "vCTS: LSS_llcDown",
- "LSS_logicalLinkDown": "vCTS: LSS_logicalLinkDown",
- "LSS_logicalLinkNotFound": "vCTS: LSS_logicalLinkNotFound",
- "LSS_logRotateThreshold": "vCTS: LSS_logRotateThreshold",
- "LSS_memoryOverload": "vCTS: LSS_memoryOverload",
- "LSS_nodeConfigFailure": "vCTS: LSS_nodeConfigFailure",
- "LSS_nodeGroupOOS": "vCTS: LSS_nodeGroupOOS",
- "LSS_nodeOOS": "vCTS: LSS_nodeOOS",
- "LSS_nonCompliantFaultGroupMemberState": "vCTS: LSS_nonCompliantFaultGroupMemberState",
- "LSS_nonCsAddrChannelDepletion": "vCTS: LSS_nonCsAddrChannelDepletion",
- "LSS_numberOfTuplesInUse": "vCTS: LSS_numberOfTuplesInUse",
- "LSS_osSecInfoModificationDetected": "vCTS: LSS_osSecInfoModificationDetected",
- "LSS_osSecInformationMissing": "vCTS: LSS_osSecInformationMissing",
- "LSS_osSecUnexpectedInformation": "vCTS: LSS_osSecUnexpectedInformation",
- "LSS_pdnsMySqlReplication": "vCTS: LSS_pdnsMySqlReplication",
- "LSS_pktCorruptionDetectedViaRCCLANCheck": "vCTS: LSS_pktCorruptionDetectedViaRCCLANCheck",
- "LSS_platformCommandFailure": "vCTS: LSS_platformCommandFailure",
- "LSS_pmDataNotCollected": "vCTS: LSS_pmDataNotCollected",
- "LSS_processDown": "vCTS: LSS_processDown",
- "LSS_processNotStarted": "vCTS: LSS_processNotStarted",
- "LSS_provisioningInhibitedMode": "vCTS: LSS_provisioningInhibitedMode",
- "LSS_rccInhibitedMode": "vCTS: LSS_rccInhibitedMode",
- "LSS_remotedbLinkDown": "vCTS: LSS_remotedbLinkDown",
- "LSS_remoteQueryServerFailure": "vCTS: LSS_remoteQueryServerFailure",
- "LSS_restore": "vCTS: LSS_restore",
- "LSS_serviceCFGDataTimestampError": "vCTS: LSS_serviceCFGDataTimestampError",
- "LSS_serviceCommCxnLost": "vCTS: LSS_serviceCommCxnLost",
- "LSS_serviceOnewayCommunication": "vCTS: LSS_serviceOnewayCommunication",
- "LSS_sheddingOverload": "vCTS: LSS_sheddingOverload",
- "LSS_simxml": "vCTS: LSS_simxml",
- "LSS_sipLinkSetMaxQuarantineList": "vCTS: LSS_sipLinkSetMaxQuarantineList",
- "LSS_sipLinkSetUnavailable": "vCTS: LSS_sipLinkSetUnavailable",
- "LSS_sipLinkUnavailable": "vCTS: LSS_sipLinkUnavailable",
- "LSS_softwareAllocatedResourceOverload": "vCTS: LSS_softwareAllocatedResourceOverload",
- "LSS_softwareComponentStandbyNotReady": "vCTS: LSS_softwareComponentStandbyNotReady",
- "LSS_softwareLicense": "vCTS: LSS_softwareLicense",
- "LSS_svcdegrow": "vCTS: LSS_svcdegrow",
- "LSS_svcgrow": "vCTS: LSS_svcgrow",
- "LSS_swVersionMismatch": "vCTS: LSS_swVersionMismatch",
- "LSS_tftpDownloadCorrupt": "vCTS: LSS_tftpDownloadCorrupt",
- "LSS_timeStampValueOutOfSystemRange": "vCTS: LSS_timeStampValueOutOfSystemRange",
- "LSS_transactionHandlerBlockDepletion": "vCTS: LSS_transactionHandlerBlockDepletion",
- "LSS_upgrade": "vCTS: LSS_upgrade",
- "SYS_BackupFailure": "vCTS: SYS_BackupFailure",
- "SYS_Configuration": "vCTS: SYS_Configuration",
- "SYS_COTRecordTransferFailure": "vCTS: SYS_COTRecordTransferFailure",
- "SYS_CPM_USERDATA_INCONSITENCY": "vCTS: SYS_CPM_USERDATA_INCONSITENCY",
- "SYS_CPM_USERDATA_RESTORED": "vCTS: SYS_CPM_USERDATA_RESTORED",
- "SYS_EventQueueCapacity": "vCTS: SYS_EventQueueCapacity",
- "SYS_ICMPFailure": "vCTS: SYS_ICMPFailure",
- "SYS_IPsecConfig": "vCTS: SYS_IPsecConfig",
- "SYS_LinkDown": "vCTS: SYS_LinkDown",
- "SYS_NotifyDisabled": "vCTS: SYS_NotifyDisabled",
- "SYS_NotifyLocked": "vCTS: SYS_NotifyLocked",
- "SYS_NumTL1MeasThresh": "vCTS: SYS_NumTL1MeasThresh",
- "SYS_RADIUS_TO_LDAP_FAILURE": "vCTS: SYS_RADIUS_TO_LDAP_FAILURE",
- "SYS_ROOT_ACCESS_DENIED": "vCTS: SYS_ROOT_ACCESS_DENIED",
- "SYS_ROOT_FTP_VIOLATION": "vCTS: SYS_ROOT_FTP_VIOLATION",
- "SYS_ROOT_LOGIN_VIOLATION": "vCTS: SYS_ROOT_LOGIN_VIOLATION",
- "SYS_ROOT_SSH_LOGIN_VIOLATION": "vCTS: SYS_ROOT_SSH_LOGIN_VIOLATION",
- "SYS_SetupAAAFailure": "vCTS: SYS_SetupAAAFailure",
- "SYS_SNETrapOverload": "vCTS: SYS_SNETrapOverload",
- "SYS_SNMPAuthenticationFailure": "vCTS: SYS_SNMPAuthenticationFailure",
- "SYS_SNMPFailure": "vCTS: SYS_SNMPFailure",
- "SYS_SU_TO_ROOT_FAILURE": "vCTS: SYS_SU_TO_ROOT_FAILURE",
- "SYS_SYSTEMTrapOverload": "vCTS: SYS_SYSTEMTrapOverload",
- "SYS_ThresholdCrossed": "vCTS: SYS_ThresholdCrossed",
- "SYS_UndiscoveredObject": "vCTS: SYS_UndiscoveredObject",
- "SYS_WriteAAAFailure": "vCTS: SYS_WriteAAAFailure",
- "jnxSpaceDiskUsageRising": "vDBE-EMS-Juniper: jnxSpaceDiskUsageRising",
- "jnxSpaceDiskUsageRisingCleared": "vDBE-EMS-Juniper: jnxSpaceDiskUsageRisingCleared",
- "jnxSpaceSwapUsageRising": "vDBE-EMS-Juniper: jnxSpaceSwapUsageRising",
- "jnxSpaceSwapUsageRisingCleared": "vDBE-EMS-Juniper: jnxSpaceSwapUsageRisingCleared",
- "jnxSpaceCPULARising": "vDBE-EMS-Juniper: jnxSpaceCPULARising",
- "jnxSpaceCPULARisingCleared": "vDBE-EMS-Juniper: jnxSpaceCPULARisingCleared",
- "jnxSpaceWebpProxyProcessDown": "vDBE-EMS-Juniper: jnxSpaceWebpProxyProcessDown",
- "jnxSpaceWebpProxyProcessUp": "vDBE-EMS-Juniper: jnxSpaceWebpProxyProcessUp",
- "jnxSpaceNMAProcessDown": "vDBE-EMS-Juniper: jnxSpaceNMAProcessDown",
- "jnxSpaceNMAProcessUp": "vDBE-EMS-Juniper: jnxSpaceNMAProcessUp",
- "jnxSpaceJbossProcessDown": "vDBE-EMS-Juniper: jnxSpaceJbossProcessDown",
- "jnxSpaceJbossProcessUp": "vDBE-EMS-Juniper: jnxSpaceJbossProcessUp",
- "jnxSpaceMysqlProcessDown": "vDBE-EMS-Juniper: jnxSpaceMysqlProcessDown",
- "jnxSpaceMysqlProcessUp": "vDBE-EMS-Juniper: jnxSpaceMysqlProcessUp",
- "jnxSpacePostgresqlProcessDown": "vDBE-EMS-Juniper: jnxSpacePostgresqlProcessDown",
- "jnxSpacePostgresqlProcessUp": "vDBE-EMS-Juniper: jnxSpacePostgresqlProcessUp",
- "jnxSpaceWatchdogStopped": "vDBE-EMS-Juniper: jnxSpaceWatchdogStopped",
- "jnxSpaceWatchdogStarted": "vDBE-EMS-Juniper: jnxSpaceWatchdogStarted",
- "jnxSpaceSNAProcessDown": "vDBE-EMS-Juniper: jnxSpaceSNAProcessDown",
- "jnxSpaceSNAProcessUp": "vDBE-EMS-Juniper: jnxSpaceSNAProcessUp",
- "jnxSpaceNodeDown": "vDBE-EMS-Juniper: jnxSpaceNodeDown",
- "jnxSpaceNodeUp": "vDBE-EMS-Juniper: jnxSpaceNodeUp",
- "jnxSpaceNodeRemoval": "vDBE-EMS-Juniper: jnxSpaceNodeRemoval",
- "jnxCmCfgChange": "vDBE-Juniper: jnxCmCfgChange",
- "jnxCmRescueChange": "vDBE-Juniper: jnxCmRescueChange",
- "jnxEventTrap": "vDBE-Juniper: jnxEventTrap",
- "jnxJsFwAuthFailure": "vDBE-Juniper: jnxJsFwAuthFailure",
- "jnxJsFwAuthServiceUp": "vDBE-Juniper: jnxJsFwAuthServiceUp",
- "jnxJsFwAuthServiceDown": "vDBE-Juniper: jnxJsFwAuthServiceDown",
- "jnxJsFwAuthCapacityExceeded": "vDBE-Juniper: jnxJsFwAuthCapacityExceeded",
- "jnxJsIdpSignatureUpdate": "vDBE-Juniper: jnxJsIdpSignatureUpdate",
- "jnxJsIdpAttackLog": "vDBE-Juniper: jnxJsIdpAttackLog",
- "jnxJsSrcNatPoolThresholdStatus": "vDBE-Juniper: jnxJsSrcNatPoolThresholdStatus",
- "jnxJsNatRuleThresholdStatus": "vDBE-Juniper: jnxJsNatRuleThresholdStatus",
- "jnxJsScreenAttack": "vDBE-Juniper: jnxJsScreenAttack",
- "jnxJsScreenCfgChange": "vDBE-Juniper: jnxJsScreenCfgChange",
- "jnxJsAvPatternUpdateTrap": "vDBE-Juniper: jnxJsAvPatternUpdateTrap",
- "jnxJsChassisClusterSwitchover": "vDBE-Juniper: jnxJsChassisClusterSwitchover",
- "jnxJsChClusterIntfTrap": "vDBE-Juniper: jnxJsChClusterIntfTrap",
- "jnxJsChClusterSpuMismatchTrap": "vDBE-Juniper: jnxJsChClusterSpuMismatchTrap",
- "jnxJsChClusterWeightTrap": "vDBE-Juniper: jnxJsChClusterWeightTrap",
- "jnxLicenseGraceExpired": "vDBE-Juniper: jnxLicenseGraceExpired",
- "jnxLicenseGraceAboutToExpire": "vDBE-Juniper: jnxLicenseGraceAboutToExpire",
- "jnxLicenseAboutToExpire": "vDBE-Juniper: jnxLicenseAboutToExpire",
- "jnxLicenseInfringeCumulative": "vDBE-Juniper: jnxLicenseInfringeCumulative",
- "jnxLicenseInfringeSingle": "vDBE-Juniper: jnxLicenseInfringeSingle",
- "jnxNatAddrPoolThresholdStatus": "vDBE-Juniper: jnxNatAddrPoolThresholdStatus",
- "jnxSyslogTrap": "vDBE-Juniper: jnxSyslogTrap",
- "jnxAccessAuthServiceUp": "vDBE-Juniper: jnxAccessAuthServiceUp",
- "jnxAccessAuthServiceDown": "vDBE-Juniper: jnxAccessAuthServiceDown",
- "jnxAccessAuthServerDisabled": "vDBE-Juniper: jnxAccessAuthServerDisabled",
- "jnxAccessAuthServerEnabled": "vDBE-Juniper: jnxAccessAuthServerEnabled",
- "jnxAccessAuthAddressPoolHighThreshold": "vDBE-Juniper: jnxAccessAuthAddressPoolHighThreshold",
- "jnxAccessAuthAddressPoolAbateThreshold": "vDBE-Juniper: jnxAccessAuthAddressPoolAbateThreshold",
- "jnxAccessAuthAddressPoolOutOfAddresses": "vDBE-Juniper: jnxAccessAuthAddressPoolOutOfAddresses",
- "jnxAccessAuthAddressPoolOutOfMemory": "vDBE-Juniper: jnxAccessAuthAddressPoolOutOfMemory",
- "LEVEL_WARNING_CPU": "vMRF: LEVEL_WARNING_CPU",
- "LEVEL_MAJOR_CPU": "vMRF: LEVEL_MAJOR_CPU",
- "LEVEL_CRITICAL_CPU": "vMRF: LEVEL_CRITICAL_CPU",
- "LEVEL_WARNING_MEM": "vMRF: LEVEL_WARNING_MEM",
- "LEVEL_MAJOR_MEM": "vMRF: LEVEL_MAJOR_MEM",
- "LEVEL_CRITICAL_MEM": "vMRF: LEVEL_CRITICAL_MEM",
- "LEVEL_WARNING_DISK": "vMRF: LEVEL_WARNING_DISK",
- "LEVEL_MAJOR_DISK": "vMRF: LEVEL_MAJOR_DISK",
- "LEVEL_CRITICAL_DISK": "vMRF: LEVEL_CRITICAL_DISK",
- "LEVEL_WARNING_RTPBANDWIDTH": "vMRF: LEVEL_WARNING_RTPBANDWIDTH",
- "LEVEL_MAJOR_RTPBANDWIDTH": "vMRF: LEVEL_MAJOR_RTPBANDWIDTH",
- "LEVEL_CRITICAL_RTPBANDWIDTH": "vMRF: LEVEL_CRITICAL_RTPBANDWIDTH",
- "LEVEL_WARNING_RTPINPACKETLOSS": "vMRF: LEVEL_WARNING_RTPINPACKETLOSS",
- "LEVEL_MAJOR_RTPINPACKETLOSS": "vMRF: LEVEL_MAJOR_RTPINPACKETLOSS",
- "LEVEL_CRITICAL_RTPINPACKETLOSS": "vMRF: LEVEL_CRITICAL_RTPINPACKETLOSS",
- "LEVEL_WARNING_RTPOUTPACKETLOSS": "vMRF: LEVEL_WARNING_RTPOUTPACKETLOSS",
- "LEVEL_MAJOR_RTPOUTPACKETLOSS": "vMRF: LEVEL_MAJOR_RTPOUTPACKETLOSS",
- "LEVEL_CRITICAL_RTPOUTPACKETLOSS": "vMRF: LEVEL_CRITICAL_RTPOUTPACKETLOSS",
- "LEVEL_WARNING_TCPLOSTRETRANSMITRATE": "vMRF: LEVEL_WARNING_TCPLOSTRETRANSMITRATE",
- "LEVEL_MAJOR_TCPLOSTRETRANSMITRATE": "vMRF: LEVEL_MAJOR_TCPLOSTRETRANSMITRATE",
- "LEVEL_CRITICAL_TCPLOSTRETRANSMITRATE": "vMRF: LEVEL_CRITICAL_TCPLOSTRETRANSMITRATE",
- "LEVEL_WARNING_TCPLOSSFAILURERATE": "vMRF: LEVEL_WARNING_TCPLOSSFAILURERATE",
- "LEVEL_MAJOR_TCPLOSSFAILURERATE": "vMRF: LEVEL_MAJOR_TCPLOSSFAILURERATE",
- "LEVEL_CRITICAL_TCPLOSSFAILURERATE": "vMRF: LEVEL_CRITICAL_TCPLOSSFAILURERATE",
- "LEVEL_CRITICAL_RTPLINKDOWN": "vMRF: LEVEL_CRITICAL_RTPLINKDOWN",
- "TARGET_REACHABLE": "vMRF: TARGET_REACHABLE",
- "PUBLICATION_ERROR": "vMRF: PUBLICATION_ERROR",
- "REMOTE_SERVER_SYNCHRONIZATION_ERROR": "vMRF: REMOTE_SERVER_SYNCHRONIZATION_ERROR",
- "TRANSCODER_TOOL_EXEC_ERROR": "vMRF: TRANSCODER_TOOL_EXEC_ERROR",
- "CLIENT_SYNCHRONIZATION_ERROR": "vMRF: CLIENT_SYNCHRONIZATION_ERROR",
- "CLUSTER_UNREACHABLE": "vMRF: CLUSTER_UNREACHABLE",
- "REMOTE_NODE_OFFLINE": "vMRF: REMOTE_NODE_OFFLINE",
- "IPADDR_STOPPED": "vMRF: IPADDR_STOPPED",
- "MRFC_STOPPED": "vMRF: MRFC_STOPPED",
- "MNGT_STOPPED": "vMRF: MNGT_STOPPED",
- "IPADDR_STARTED": "vMRF: IPADDR_STARTED",
- "MRFC_STARTED": "vMRF: MRFC_STARTED",
- "MNGT_STARTED": "vMRF: MNGT_STARTED",
- "VOLATTACH_FAILED": "vMRF: VOLATTACH_FAILED",
- "VOLDETACH_FAILED": "vMRF: VOLDETACH_FAILED",
- "VOLDEL": "vMRF: VOLDEL",
- "VOLCORRUPT": "vMRF: VOLCORRUPT",
- "VOLFOREIGN": "vMRF: VOLFOREIGN",
- "ACTIVE_ALARM_TABLE_PURGE": "vMRF: ACTIVE_ALARM_TABLE_PURGE",
- "GENERIC_FORMER_STATELESS": "vMRF: GENERIC_FORMER_STATELESS",
- "GENERIC_FORMER_STATEFUL": "vMRF: GENERIC_FORMER_STATEFUL",
- "NO_MORE_ALARM_DESCRIPTION": "vMRF: NO_MORE_ALARM_DESCRIPTION",
- "SERVICE_PROCESS_ENDS": "vMRF: SERVICE_PROCESS_ENDS",
- "DEFENSE_STOPPED": "vMRF: DEFENSE_STOPPED",
- "USER_ACCOUNT_LOCKED": "vMRF: USER_ACCOUNT_LOCKED",
- "CONNECTION_SQL_NOT_ESTABLISHED": "vMRF: CONNECTION_SQL_NOT_ESTABLISHED",
- "FALSE_ALARM": "vMRF: FALSE_ALARM",
- "RADIUS SERVER HS": "vMRF: RADIUS SERVER HS",
- "DRM_PACKAGER_IS_NOT_AVAILABLE": "vMRF: DRM_PACKAGER_IS_NOT_AVAILABLE",
- "DRM_LICENSE_BUILDER_IS_NOT_AVAILABLE": "vMRF: DRM_LICENSE_BUILDER_IS_NOT_AVAILABLE",
- "ERROR_WHILE_CREATING_PLAYLIST_MANAGER_FILE": "vMRF: ERROR_WHILE_CREATING_PLAYLIST_MANAGER_FILE",
- "ERROR_WHILE_BUILDING_PLAYLIST_XML_REPRESENTATION": "vMRF: ERROR_WHILE_BUILDING_PLAYLIST_XML_REPRESENTATION",
- "PLAYLIST_FILE_TO_PUBLISH_NOT_FOUND": "vMRF: PLAYLIST_FILE_TO_PUBLISH_NOT_FOUND",
- "COULD_NOT_CONNECT_TO_PVNS_SERVER": "vMRF: COULD_NOT_CONNECT_TO_PVNS_SERVER",
- "HTTP_OR_HTTPCLIENT_EXCEPTION_HAS_OCCURRED": "vMRF: HTTP_OR_HTTPCLIENT_EXCEPTION_HAS_OCCURRED",
- "I/O_ERROR_WHILE_PUBLISHING_PLAYLIST_FILE": "vMRF: I/O_ERROR_WHILE_PUBLISHING_PLAYLIST_FILE",
- "ERROR_WHILE_REQUESTING_SDP_FILE": "vMRF: ERROR_WHILE_REQUESTING_SDP_FILE",
- "ERROR_WHILE_REQUESTING_SDP_FILE:_REMOTE_EXCEPTION": "vMRF: ERROR_WHILE_REQUESTING_SDP_FILE:_REMOTE_EXCEPTION",
- "NO_STREAMING_RESOURCES": "vMRF: NO_STREAMING_RESOURCES",
- "NO_STREAMING_MODULES_REGISTERED": "vMRF: NO_STREAMING_MODULES_REGISTERED",
- "SM_FAILURE": "vMRF: SM_FAILURE",
- "MISSING_FILE_OR_ENCODER": "vMRF: MISSING_FILE_OR_ENCODER",
- "INVALID_RANGE": "vMRF: INVALID_RANGE",
- "THRESHOLD_VALUE_EXCEEDED": "vMRF: THRESHOLD_VALUE_EXCEEDED",
- "TICKET_QUEUE_FULL": "vMRF: TICKET_QUEUE_FULL",
- "PARSING_INITIALIZATION_EXCEPTION": "vMRF: PARSING_INITIALIZATION_EXCEPTION",
- "CUSTOMERCARE_INTERNAL_EXCEPTION": "vMRF: CUSTOMERCARE_INTERNAL_EXCEPTION",
- "PARSING_EXCEPTION": "vMRF: PARSING_EXCEPTION",
- "I/O_PROBLEM": "vMRF: I/O_PROBLEM",
- "INEXISTENT_FILE_OR_FOLDER": "vMRF: INEXISTENT_FILE_OR_FOLDER",
- "FILE_NOT_IN_XML_FORMAT": "vMRF: FILE_NOT_IN_XML_FORMAT",
- "SERVICE_STATE_CHANGE": "vMRF: SERVICE_STATE_CHANGE",
- "MONITORED_FILE_UPDATE_ERROR": "vMRF: MONITORED_FILE_UPDATE_ERROR",
- "MONITORED_RPM_DELETED_ERROR": "vMRF: MONITORED_RPM_DELETED_ERROR",
- "MONITORED_RPM_ADDED_ERROR": "vMRF: MONITORED_RPM_ADDED_ERROR",
- "MONITORED_CHMOD_ERROR": "vMRF: MONITORED_CHMOD_ERROR",
- "MONITORED_CHOWN_ERROR": "vMRF: MONITORED_CHOWN_ERROR",
- "PASSWD_ROOT_ERROR": "vMRF: PASSWD_ROOT_ERROR",
- "PASSWD_ERROR": "vMRF: PASSWD_ERROR",
- "ROOTKIT_ERROR": "vMRF: ROOTKIT_ERROR",
- "STARTUP_ERR_UNDEFINED_PORT": "vMRF: STARTUP_ERR_UNDEFINED_PORT",
- "STARTUP_ERR_FAIL_FIND_HOSTNAME": "vMRF: STARTUP_ERR_FAIL_FIND_HOSTNAME",
- "STARTUP_ERR_CF_MISSING": "vMRF: STARTUP_ERR_CF_MISSING",
- "STARTUP_ERR_FAILED_TO_OPEN_CF": "vMRF: STARTUP_ERR_FAILED_TO_OPEN_CF",
- "STARTUP_ERR_FAILED_TO_BIND_PORT": "vMRF: STARTUP_ERR_FAILED_TO_BIND_PORT",
- "STARTUP_ERR_CFG_UNIT_MISSING": "vMRF: STARTUP_ERR_CFG_UNIT_MISSING",
- "MCTR_INVALID_CODEC_NAME": "vMRF: MCTR_INVALID_CODEC_NAME",
- "RTSP_SERVER_FAILURE": "vMRF: RTSP_SERVER_FAILURE",
- "RTSP_SERVER_QUARANTINE": "vMRF: RTSP_SERVER_QUARANTINE",
- "TRANSCODING_FAILURE": "vMRF: TRANSCODING_FAILURE",
- "FILE_CACHE_FAILURE": "vMRF: FILE_CACHE_FAILURE",
- "STARTUP_ERROR_INITIALIZATION_FAILED": "vMRF: STARTUP_ERROR_INITIALIZATION_FAILED",
- "CONFERENCE_FAILURE": "vMRF: CONFERENCE_FAILURE",
- "PLC_DEGRADATION_LOW": "vMRF: PLC_DEGRADATION_LOW",
- "PLC_DEGRADATION_MEDIUM": "vMRF: PLC_DEGRADATION_MEDIUM",
- "PLC_DEGRADATION_HIGH": "vMRF: PLC_DEGRADATION_HIGH",
- "AUDIO_RESYNCH_LOW": "vMRF: AUDIO_RESYNCH_LOW",
- "AUDIO_RESYNCH_MEDIUM": "vMRF: AUDIO_RESYNCH_MEDIUM",
- "AUDIO_RESYNCH_HIGH": "vMRF: AUDIO_RESYNCH_HIGH",
- "VIDEO_RESYNCH_LOW": "vMRF: VIDEO_RESYNCH_LOW",
- "VIDEO_RESYNCH_MEDIUM": "vMRF: VIDEO_RESYNCH_MEDIUM",
- "VIDEO_RESYNCH_HIGH": "vMRF: VIDEO_RESYNCH_HIGH",
- "PLAY_FAILURES_LOW": "vMRF: PLAY_FAILURES_LOW",
- "PLAY_FAILURES_MEDIUM": "vMRF: PLAY_FAILURES_MEDIUM",
- "PLAY_FAILURES_HIGH": "vMRF: PLAY_FAILURES_HIGH",
- "NOT_ENOUGH_FREE_CONFEREE": "vMRF: NOT_ENOUGH_FREE_CONFEREE",
- "NO_LONGER_FREE_CONFERENCE_ROOM": "vMRF: NO_LONGER_FREE_CONFERENCE_ROOM",
- "STARTUP_ERROR_FAIL_TO_READ_CF": "vMRF: STARTUP_ERROR_FAIL_TO_READ_CF",
- "STARTUP_ERROR_SIP_ADAPTER_INIT": "vMRF: STARTUP_ERROR_SIP_ADAPTER_INIT",
- "STARTUP_ERROR_MONITORING_INIT": "vMRF: STARTUP_ERROR_MONITORING_INIT",
- "REGISTER_ERROR_FAILURE": "vMRF: REGISTER_ERROR_FAILURE",
- "DRI_ERROR_FAILURE": "vMRF: DRI_ERROR_FAILURE",
- "STARTUP_ERROR_STACK_CONFIGURATION": "vMRF: STARTUP_ERROR_STACK_CONFIGURATION",
- "STARTUP_ERROR_CONF": "vMRF: STARTUP_ERROR_CONF",
- "STARTUP_ERROR_UNDEFINED_PORT": "vMRF: STARTUP_ERROR_UNDEFINED_PORT",
- "HOST_REMOVED": "vMRF: HOST_REMOVED",
- "INTERCEPT_THRESHOLD_NB_DIALOG_ALLOCATED": "vMRF: INTERCEPT_THRESHOLD_NB_DIALOG_ALLOCATED",
- "STARTUP_ERROR_STACK_CONF": "vMRF: STARTUP_ERROR_STACK_CONF",
- "STARTUP_ERROR_CONFIGURATION": "vMRF: STARTUP_ERROR_CONFIGURATION",
- "STARTUP_ERROR_FAILED_TO_RETRIEVE_HOSTNAME": "vMRF: STARTUP_ERROR_FAILED_TO_RETRIEVE_HOSTNAME",
- "LEVEL_WARNING_CALL": "vMRF: LEVEL_WARNING_CALL",
- "LEVEL_ALARM_MINOR_CALL": "vMRF: LEVEL_ALARM_MINOR_CALL",
- "LEVEL_ALARM_MAJOR_CALL": "vMRF: LEVEL_ALARM_MAJOR_CALL",
- "LEVEL_ALARM_MRFPoutOfService": "vMRF: LEVEL_ALARM_MRFPoutOfService",
- "MRFP_CALL_REJECTED_Threshold #1": "vMRF: MRFP_CALL_REJECTED_Threshold #1",
- "MRFP_CALL_REJECTED_Threshold #2": "vMRF: MRFP_CALL_REJECTED_Threshold #2",
- "MRFP_CALL_REJECTED_Threshold #3": "vMRF: MRFP_CALL_REJECTED_Threshold #3",
- "MRFP_CALL_RETRIED_Threshold #1": "vMRF: MRFP_CALL_RETRIED_Threshold #1",
- "MRFP_CALL_RETRIED_Threshold #2": "vMRF: MRFP_CALL_RETRIED_Threshold #2",
- "MRFP_CALL_RETRIED_Threshold #3": "vMRF: MRFP_CALL_RETRIED_Threshold #3",
- "STARTUP_PUB_FILE_NOT_PRESENT": "vMRF: STARTUP_PUB_FILE_NOT_PRESENT",
- "STARTUP_INF_FILE_NOT_PRESENT": "vMRF: STARTUP_INF_FILE_NOT_PRESENT",
- "STARTUP_LIC_FILE_NOT_PRESENT": "vMRF: STARTUP_LIC_FILE_NOT_PRESENT",
- "GENERIC_HARDWARE_PROBLEM": "vMRF: GENERIC_HARDWARE_PROBLEM",
- "HARD_DRIVE_PROBLEM": "vMRF: HARD_DRIVE_PROBLEM",
- "NETWORK_LINK_PROBLEM": "vMRF: NETWORK_LINK_PROBLEM",
- "POWER_SUPPLY_PROBLEM": "vMRF: POWER_SUPPLY_PROBLEM",
- "SMART_HARD_DRIVE_PROBLEM": "vMRF: SMART_HARD_DRIVE_PROBLEM",
- "STARTUP_ERROR": "vMRF: STARTUP_ERROR",
- "RESOURCE_NOT_ACCESSIBLE": "vMRF: RESOURCE_NOT_ACCESSIBLE",
- "RESOURCE_ACCESSIBLE": "vMRF: RESOURCE_ACCESSIBLE",
- "RESOURCE_FULL": "vMRF: RESOURCE_FULL",
- "DRI_ALARM": "vMRF: DRI_ALARM",
- "REGISTER_ERROR_CCF": "vMRF: REGISTER_ERROR_CCF",
- "REGISTER_ERROR_EXTERNAL": "vMRF: REGISTER_ERROR_EXTERNAL",
- "TIMEOUT_ERROR": "vMRF: TIMEOUT_ERROR",
- "VXML_ERROR": "vMRF: VXML_ERROR",
- "A Network Element is no longer available due to a connection failure": "vMVM: A Network Element is no longer available due to a connection failure",
- "A MetaSphere server is reporting a fault with the configuration of its connection to MetaView": "vMVM: A MetaSphere server is reporting a fault with the configuration of its connection to MetaView",
- "Configured OBS IPs don't match available OBS nodes. Configured but unavailable nodes include: [<IP address>]. Real nodes not configured include: []": "vMVM: Configured OBS IPs don't match available OBS nodes. Configured but unavailable nodes include: [<IP address>]. Real nodes not configured include: []",
- "Service Assurance Server <IP address> cannot be contacted": "vMVM: Service Assurance Server <IP address> cannot be contacted",
- "The primary MetaView Director has lost contact with the backup MetaView Director": "vMVM: The primary MetaView Director has lost contact with the backup MetaView Director",
- "The active server has lost connection to the standby": "vMVM: The active server has lost connection to the standby",
- "CrashCounter": "vprobes-vBE-Processing: CrashCounter",
- "IsAlive": "vprobes-vBE-Processing: IsAlive",
- "SwRestart": "vprobes-vLB: SwRestart",
- "Repeated exceptions have occurred.": "vSBC-Metaswitch: Repeated exceptions have occurred.",
- "A licensing limit is close to capacity.": "vSBC-Metaswitch: A licensing limit is close to capacity.",
- "One or more feature packs have been breached.": "vSBC-Metaswitch: One or more feature packs have been breached.",
- "The grace period on this Perimeta system will expire in less than 48 hours, after which calls will not be processed.": "vSBC-Metaswitch: The grace period on this Perimeta system will expire in less than 48 hours, after which calls will not be processed.",
- "The grace period on this Perimeta system will expire in less than 7 days, after which calls will not be processed.": "vSBC-Metaswitch: The grace period on this Perimeta system will expire in less than 7 days, after which calls will not be processed.",
- "The license on this Perimeta system will expire in less than 4 weeks.": "vSBC-Metaswitch: The license on this Perimeta system will expire in less than 4 weeks.",
- "A Perimeta blade has become unlicensed.": "vSBC-Metaswitch: A Perimeta blade has become unlicensed.",
- "Perimeta is licensed with a bypass certificate, which is valid until the time displayed.": "vSBC-Metaswitch: Perimeta is licensed with a bypass certificate, which is valid until the time displayed.",
- "The number of licensed instances exceeded a threshold of the licensed limit.": "vSBC-Metaswitch: The number of licensed instances exceeded a threshold of the licensed limit.",
- "The software token on the primary Distributed Capacity Manager will expire on the displayed date.": "vSBC-Metaswitch: The software token on the primary Distributed Capacity Manager will expire on the displayed date.",
- "A capacity limit on the license installed on this Perimeta system does not match the largest limit across all systems in the deployment.": "vSBC-Metaswitch: A capacity limit on the license installed on this Perimeta system does not match the largest limit across all systems in the deployment.",
- "An adjacency has voice quality alerts.": "vSBC-Metaswitch: An adjacency has voice quality alerts.",
- "The number of calls being audited is congested.": "vSBC-Metaswitch: The number of calls being audited is congested.",
- "Session Controller is rejecting calls because there is no valid active call policy set configured.": "vSBC-Metaswitch: Session Controller is rejecting calls because there is no valid active call policy set configured.",
- "A call policy set is inactive because it has been misconfigured.": "vSBC-Metaswitch: A call policy set is inactive because it has been misconfigured.",
- "Session Controller is inactive and rejecting calls.": "vSBC-Metaswitch: Session Controller is inactive and rejecting calls.",
- "Sources have breached minor or major blacklist thresholds.": "vSBC-Metaswitch: Sources have breached minor or major blacklist thresholds.",
- "Sources are blacklisted.": "vSBC-Metaswitch: Sources are blacklisted.",
- "The blacklisting configuration will change as a result of upgrade and some configured blacklists or alerts will no longer be applied.": "vSBC-Metaswitch: The blacklisting configuration will change as a result of upgrade and some configured blacklists or alerts will no longer be applied.",
- "A large number of downgrades and bans have been created as a result of blacklisting.": "vSBC-Metaswitch: A large number of downgrades and bans have been created as a result of blacklisting.",
- "Session Controller is unable to track further sources for blacklisting.": "vSBC-Metaswitch: Session Controller is unable to track further sources for blacklisting.",
- "A software protection switch was triggered.": "vSBC-Metaswitch: A software protection switch was triggered.",
- "A disk area on a processor blade is nearly full.": "vSBC-Metaswitch: A disk area on a processor blade is nearly full.",
- "Memory use is very high.": "vSBC-Metaswitch: Memory use is very high.",
- "The primary processor-blade has lost contact with the backup.": "vSBC-Metaswitch: The primary processor-blade has lost contact with the backup.",
- "An efix or patch has been applied to this system containing diagnostic versions of some software libraries.": "vSBC-Metaswitch: An efix or patch has been applied to this system containing diagnostic versions of some software libraries.",
- "A software protection switch (SPS) was triggered. Call and registration state was lost.": "vSBC-Metaswitch: A software protection switch (SPS) was triggered. Call and registration state was lost.",
- "The Ethernet Heartbeat between primary and backup processors has failed.": "vSBC-Metaswitch: The Ethernet Heartbeat between primary and backup processors has failed.",
- "The Backplane Heartbeat between primary and backup processors has failed.": "vSBC-Metaswitch: The Backplane Heartbeat between primary and backup processors has failed.",
- "A disk area on a processor blade reported an error.": "vSBC-Metaswitch: A disk area on a processor blade reported an error.",
- "The system is upgrading.": "vSBC-Metaswitch: The system is upgrading.",
- "An error with NTP functionality has been detected.": "vSBC-Metaswitch: An error with NTP functionality has been detected.",
- "One or more users are locked out of the system.": "vSBC-Metaswitch: One or more users are locked out of the system.",
- "The Craft Terminal user FTP directory on a processor blade is nearly full.": "vSBC-Metaswitch: The Craft Terminal user FTP directory on a processor blade is nearly full.",
- "A scheduled configuration snapshot has failed.": "vSBC-Metaswitch: A scheduled configuration snapshot has failed.",
- "The Session Controller is stopping as a result of administrator action.": "vSBC-Metaswitch: The Session Controller is stopping as a result of administrator action.",
- "A Session Controller processor blade is stopping as a result of administrator action.": "vSBC-Metaswitch: A Session Controller processor blade is stopping as a result of administrator action.",
- "An object could not be activated because its service address does not exist or is not fully specified.": "vSBC-Metaswitch: An object could not be activated because its service address does not exist or is not fully specified.",
- "The hardware on a processor does not meet minimum requirements.": "vSBC-Metaswitch: The hardware on a processor does not meet minimum requirements.",
- "The hardware expectations of the two processors are not the same.": "vSBC-Metaswitch: The hardware expectations of the two processors are not the same.",
- "The read speed of the main hard disk on a processor blade is too slow.": "vSBC-Metaswitch: The read speed of the main hard disk on a processor blade is too slow.",
- "An error has occurred reading from the hard disk on a processor blade.": "vSBC-Metaswitch: An error has occurred reading from the hard disk on a processor blade.",
- "Backup and primary processor-blades have an inconsistent system role.": "vSBC-Metaswitch: Backup and primary processor-blades have an inconsistent system role.",
- "Event: The system encountered a critical error and had to restart.": "vSBC-Metaswitch: Event: The system encountered a critical error and had to restart.",
- "Event: A RADIUS server failed to respond to an authentication request.": "vSBC-Metaswitch: Event: A RADIUS server failed to respond to an authentication request.",
- "Event: All configured RADIUS servers failed to respond to authentication requests.": "vSBC-Metaswitch: Event: All configured RADIUS servers failed to respond to authentication requests.",
- "Event: The number of CPUs has changed.": "vSBC-Metaswitch: Event: The number of CPUs has changed.",
- "Event: A user has been automatically deleted": "vSBC-Metaswitch: Event: A user has been automatically deleted",
- "The primary processor blade has lost management connectivity": "vSBC-Metaswitch: The primary processor blade has lost management connectivity",
- "Event: A processor blade is running with DPDK mode disabled when DPDK mode is,expected.": "vSBC-Metaswitch: Event: A processor blade is running with DPDK mode disabled when DPDK mode is,expected.",
- "Event: Processor blade %1 is running with DPDK mode disabled when DPDK mode may be possible.": "vSBC-Metaswitch: Event: Processor blade %1 is running with DPDK mode disabled when DPDK mode may be possible.",
- "Perimeta is attempting to resend cached billing records.": "vSBC-Metaswitch: Perimeta is attempting to resend cached billing records.",
- "The Rf billing cache is full.": "vSBC-Metaswitch: The Rf billing cache is full.",
- "The inbound call queue is congested.": "vSBC-Metaswitch: The inbound call queue is congested.",
- "A configured realm group contains realms that are not available to the SBC.": "vSBC-Metaswitch: A configured realm group contains realms that are not available to the SBC.",
- "An allowed MSC configuration is not connected to any physical MSCs.": "vSBC-Metaswitch: An allowed MSC configuration is not connected to any physical MSCs.",
- "An adjacency has failed as the listen socket could not be created. Check for configuration mismatches with the associated service interface.": "vSBC-Metaswitch: An adjacency has failed as the listen socket could not be created. Check for configuration mismatches with the associated service interface.",
- "No suitable DNS records were found for a peer group's DNS hostname.": "vSBC-Metaswitch: No suitable DNS records were found for a peer group's DNS hostname.",
- "One or more SIP peers from a peer group have stopped responding to SIP OPTIONS pings": "vSBC-Metaswitch: One or more SIP peers from a peer group have stopped responding to SIP OPTIONS pings",
- "An adjacency has failed as its service network does not match the service network on its associated peer group.": "vSBC-Metaswitch: An adjacency has failed as its service network does not match the service network on its associated peer group.",
- "An adjacency has failed as its configured TLS certificate could not be found.": "vSBC-Metaswitch: An adjacency has failed as its configured TLS certificate could not be found.",
- "The caching function has not been initialized properly.": "vSBC-Metaswitch: The caching function has not been initialized properly.",
- "An adjacency has failed as the listen socket could not be created.": "vSBC-Metaswitch: An adjacency has failed as the listen socket could not be created.",
- "An adjacency is congested and may be rejecting calls.": "vSBC-Metaswitch: An adjacency is congested and may be rejecting calls.",
- "There is an issue with a Diameter peer.": "vSBC-Metaswitch: There is an issue with a Diameter peer.",
- "A realm is no longer reachable via any configured peers.": "vSBC-Metaswitch: A realm is no longer reachable via any configured peers.",
- "An FQDN for a configured Diameter peer has failed to resolve to a valid IP address.": "vSBC-Metaswitch: An FQDN for a configured Diameter peer has failed to resolve to a valid IP address.",
- "One or more peers resolved from a DNS lookup of a configured peer's address cannot be contacted": "vSBC-Metaswitch: One or more peers resolved from a DNS lookup of a configured peer's address cannot be contacted",
- "An interface ARP or NDP probe has failed.": "vSBC-Metaswitch: An interface ARP or NDP probe has failed.",
- "One or more IP address conflicts have been detected on service interfaces with zero criticality. If there are other probe failures, this alarm will remain raised until all conflicts are resolved.": "vSBC-Metaswitch: One or more IP address conflicts have been detected on service interfaces with zero criticality. If there are other probe failures, this alarm will remain raised until all conflicts are resolved.",
- "One or more IP address conflicts have been detected on service interfaces with non-zero criticality. If there are other probe failures, this alarm will remain raised until all conflicts are resolved.": "vSBC-Metaswitch: One or more IP address conflicts have been detected on service interfaces with non-zero criticality. If there are other probe failures, this alarm will remain raised until all conflicts are resolved.",
- "An interface device is running below the expected speed. This alarm was originally triggered by a probe failure on a service interface.": "vSBC-Metaswitch: An interface device is running below the expected speed. This alarm was originally triggered by a probe failure on a service interface.",
- "An interface device is running above the expected speed.": "vSBC-Metaswitch: An interface device is running above the expected speed.",
- "An IP address conflict has been detected on a management interface.": "vSBC-Metaswitch: An IP address conflict has been detected on a management interface.",
- "An interface ICMP probe has failed.": "vSBC-Metaswitch: An interface ICMP probe has failed.",
- "A High-Availability link has detected a connectivity issue.": "vSBC-Metaswitch: A High-Availability link has detected a connectivity issue.",
- "An HA-link device is being reported as underspeed.": "vSBC-Metaswitch: An HA-link device is being reported as underspeed.",
- "An IP address conflict has been detected on a replication interface.": "vSBC-Metaswitch: An IP address conflict has been detected on a replication interface.",
- "The Session Controller has started.": "vSBC-Metaswitch: The Session Controller has started.",
- "A statistic exceeded its configured thresholds.": "vSBC-Metaswitch: A statistic exceeded its configured thresholds.",
- "One or more statistic has not been retrieved at least 3 times in a row.": "vSBC-Metaswitch: One or more statistic has not been retrieved at least 3 times in a row.",
- "A Refresh Alarms request was triggered. Alarms not re-raised will be cleared in 5 minutes.": "vSBC-Metaswitch: A Refresh Alarms request was triggered. Alarms not re-raised will be cleared in 5 minutes.",
- "A statistic has exceeded its configured thresholds.": "vSBC-Metaswitch: A statistic has exceeded its configured thresholds.",
- "A Fallback Operation will soon be started": "vSBG: A Fallback Operation will soon be started",
- "BRM, Auto Export Backup Failed": "vSBG: BRM, Auto Export Backup Failed",
- "BRM, Scheduled Backup Failed": "vSBG: BRM, Scheduled Backup Failed",
- "COM SA, AMF Component Cleanup Failed": "vSBG: COM SA, AMF Component Cleanup Failed",
- "COM SA, AMF Component Instantiation Failed": "vSBG: COM SA, AMF Component Instantiation Failed",
- "COM SA, AMF SI Unassigned": "vSBG: COM SA, AMF SI Unassigned",
- "COM SA, CLM Cluster Node Unavailable": "vSBG: COM SA, CLM Cluster Node Unavailable",
- "COM SA, MDF Detected Model Error": "vSBG: COM SA, MDF Detected Model Error",
- "COM SA, Proxy Status of a Component Changed to Unproxied": "vSBG: COM SA, Proxy Status of a Component Changed to Unproxied",
- "File Management, Number of Files in FileGroup Exceeded": "vSBG: File Management, Number of Files in FileGroup Exceeded",
- "File Management, Max Size in FileGroup Exceeded": "vSBG: File Management, Max Size in FileGroup Exceeded",
- "LOTC Disk Replication Communication": "vSBG: LOTC Disk Replication Communication",
- "LOTC Disk Replication Consistency": "vSBG: LOTC Disk Replication Consistency",
- "LOTC Disk Usage": "vSBG: LOTC Disk Usage",
- "LOTC memory Usage": "vSBG: LOTC memory Usage",
- "LOTC Time Synchronization": "vSBG: LOTC Time Synchronization",
- "SBG, BGF Control Link Down": "vSBG: SBG, BGF Control Link Down",
- "SBG, BGF Control Link Disabled": "vSBG: SBG, BGF Control Link Disabled",
- "SBG, BGF Control Link Enabled": "vSBG: SBG, BGF Control Link Enabled",
- "SBG, BGF Control Link Remote Locked": "vSBG: SBG, BGF Control Link Remote Locked",
- "SBG, Charging Data Storage Maximum Records Reached": "vSBG: SBG, Charging Data Storage Maximum Records Reached",
- "SBG, Charging Server Rejects Charging Data": "vSBG: SBG, Charging Server Rejects Charging Data",
- "SBG, Excessive Packet Rate Detected ": "vSBG: SBG, Excessive Packet Rate Detected ",
- "SBG, High Amount of Malformed Packets Received": "vSBG: SBG, High Amount of Malformed Packets Received",
- "SBG, High Amount of STUN Packets Detected": "vSBG: SBG, High Amount of STUN Packets Detected",
- "SBG, High Amount of TCP SYN Packets Received": "vSBG: SBG, High Amount of TCP SYN Packets Received",
- "SBG, High Amount of UDP Packets Received ": "vSBG: SBG, High Amount of UDP Packets Received ",
- "SBG, IP Address Blocked Due to Excessive Packet Rate": "vSBG: SBG, IP Address Blocked Due to Excessive Packet Rate",
- "SBG, Lost Connectivity to Diameter Server": "vSBG: SBG, Lost Connectivity to Diameter Server",
- "SBG, Mated Pair out of Service": "vSBG: SBG, Mated Pair out of Service",
- "SBG, Network Unavailable for Media Handling": "vSBG: SBG, Network Unavailable for Media Handling",
- "SBG, Non-emergency Call Released to Free Resources for Emergency Call": "vSBG: SBG, Non-emergency Call Released to Free Resources for Emergency Call",
- "SBG, Not Enough Disk Space for Storing Charging Data": "vSBG: SBG, Not Enough Disk Space for Storing Charging Data",
- "SBG, Payload Mated Pair Failure": "vSBG: SBG, Payload Mated Pair Failure",
- "SBG, Payload Processor Failure": "vSBG: SBG, Payload Processor Failure",
- "SBG, Processor Overloaded": "vSBG: SBG, Processor Overloaded",
- "SBG, Registered User Set in Quarantine": "vSBG: SBG, Registered User Set in Quarantine",
- "SBG, Registration Contacts Exceed Configured Threshold": "vSBG: SBG, Registration Contacts Exceed Configured Threshold",
- "SBG, Sequential Restart Initiated": "vSBG: SBG, Sequential Restart Initiated",
- "SBG, SIP Abuse Detected": "vSBG: SBG, SIP Abuse Detected",
- "SBG, SIP Network Locked": "vSBG: SBG, SIP Network Locked",
- "SBG, SIP Next Hop Reachable": "vSBG: SBG, SIP Next Hop Reachable",
- "SBG, SIP Next Hop Unreachable": "vSBG: SBG, SIP Next Hop Unreachable",
- "SBG, SIP Request Rejected by Network Throttling": "vSBG: SBG, SIP Request Rejected by Network Throttling",
- "SBG, TLS Certificate Imported": "vSBG: SBG, TLS Certificate Imported",
- "SBG, Trace Recording Session Number Limit Reached": "vSBG: SBG, Trace Recording Session Number Limit Reached",
- "SBG, Trace Session Deactivated": "vSBG: SBG, Trace Session Deactivated",
- "SBG, Trace Session Times Out": "vSBG: SBG, Trace Session Times Out",
- "SBG, Unknown Media Type or Payload Type": "vSBG: SBG, Unknown Media Type or Payload Type"
-}
diff --git a/src/test/resources/example/dao/bpmn-prop.json b/src/test/resources/example/dao/bpmn-prop.json
index f1b87a00..a38d58c3 100644
--- a/src/test/resources/example/dao/bpmn-prop.json
+++ b/src/test/resources/example/dao/bpmn-prop.json
@@ -5,6 +5,80 @@
"value": "uktukk"
}
],
+ "TCA_11n5nl9": {
+ "group1": [
+ {
+ "name": "tname",
+ "value": "group1"
+ },
+ {
+ "name": "tuuid",
+ "value": "f734f031-10aa-t8fb-330f-04dde2886325"
+ },
+ {
+ "name": "tcaPolId",
+ "value": "policy1"
+ },
+ {
+ "name": "eventName",
+ "value": "vFirewallBroadcastPackets"
+ },
+ {
+ "name": "controlLoopSchemaType",
+ "value": "VNF"
+ },
+ {
+ "serviceConfigurations": [
+ [
+ "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
+ "LESS_OR_EQUAL",
+ "123",
+ "ABATED"
+ ],
+ [
+ "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
+ "GREATER_OR_EQUAL",
+ "123",
+ "ONSET"
+ ]
+ ]
+ }
+ ]
+ },
+ "global":
+ [
+ {
+ "name": "service",
+ "value":
+ [
+ "0f983e18-4603-4bb4-a98c-e29691fb16a1"
+ ]
+ },
+
+ {
+ "name": "vf",
+ "value":
+ [
+ "6c7aaec2-59eb-41d9-8681-b7f976ab668d"
+ ]
+ },
+
+ {
+ "name": "actionSet",
+ "value":
+ [
+ "vnfRecipe"
+ ]
+ },
+
+ {
+ "name": "location",
+ "value":
+ [
+ "SNDGCA64"
+ ]
+ }
+ ],
"Policy_19c1hms": {
"policy1": [
{
diff --git a/src/test/resources/example/json-editor-schema/tca-policy-json-editor-schema.json b/src/test/resources/example/json-editor-schema/tca-policy-json-editor-schema.json
new file mode 100644
index 00000000..11b91dfb
--- /dev/null
+++ b/src/test/resources/example/json-editor-schema/tca-policy-json-editor-schema.json
@@ -0,0 +1,115 @@
+{
+ "schema": {
+ "uniqueItems": "true",
+ "format": "tabs-top",
+ "type": "array",
+ "title": "Thresholds",
+ "items": {
+ "type": "object",
+ "title": "Thresholds",
+ "required": [
+ "dummySignatures"
+ ],
+ "properties": {
+ "severity": {
+ "propertyOrder": 1004,
+ "title": "event severity or priority",
+ "type": "string",
+ "enum": [
+ "CRITICAL",
+ "MAJOR",
+ "MINOR",
+ "WARNING",
+ "NORMAL"
+ ]
+ },
+ "fieldPath": {
+ "propertyOrder": 1003,
+ "title": "Field Path",
+ "type": "string"
+ },
+ "thresholdValue": {
+ "propertyOrder": 1005,
+ "default": 0,
+ "maximum": 65535,
+ "title": "ThresholdValue",
+ "type": "integer",
+ "minimum": 0
+ },
+ "dummySignatures": {
+ "propertyOrder": 1007,
+ "uniqueItems": "true",
+ "format": "tabs-top",
+ "title": "dummy Signatures",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "signature",
+ "traversal"
+ ],
+ "properties": {
+ "signature": {
+ "propertyOrder": 1008,
+ "required": [
+ "filter_clause"
+ ],
+ "properties": {
+ "filter_clause": {
+ "propertyOrder": 20002,
+ "title": "Filter Clause",
+ "type": "string",
+ "enum": [
+ "OR",
+ "AND",
+ "NOT"
+ ]
+ }
+ }
+ },
+ "traversal": {
+ "propertyOrder": 1009,
+ "required": [
+ "traversal"
+ ],
+ "properties": {
+ "traversal": {
+ "propertyOrder": 20003,
+ "title": "Dummy Traverse",
+ "type": "string",
+ "enum": [
+ "ONE",
+ "TWO",
+ "THREE"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "closedLoopControlName": {
+ "propertyOrder": 1001,
+ "title": "A UNIQUE string identifying the Closed Loop ID this event is for.",
+ "type": "string"
+ },
+ "version": {
+ "propertyOrder": 1006,
+ "minLength": 1,
+ "title": "Version for the closed loop message",
+ "type": "string"
+ },
+ "direction": {
+ "propertyOrder": 1002,
+ "type": "string",
+ "enum": [
+ "LESS",
+ "LESS_OR_EQUAL",
+ "GREATER",
+ "GREATER_OR_EQUAL"
+ ]
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/example/model-properties/tca_new/model-bpmn.json b/src/test/resources/example/model-properties/tca_new/model-bpmn.json
new file mode 100644
index 00000000..84964c55
--- /dev/null
+++ b/src/test/resources/example/model-properties/tca_new/model-bpmn.json
@@ -0,0 +1,21 @@
+{
+ "policy": [
+ {
+ "id": "Policy_12lup3h",
+ "from": "TCA_1d13unw"
+ }
+ ],
+ "tca": [
+ {
+ "id": "TCA_1d13unw",
+ "from": "VesCollector_1g9cmz0"
+ }
+ ],
+ "holmes": [],
+ "vesCollector": [
+ {
+ "id": "VesCollector_1g9cmz0",
+ "from": "StartEvent_1"
+ }
+ ]
+} \ No newline at end of file
diff --git a/src/test/resources/example/sdc/sdcAlarmsList.csv b/src/test/resources/example/sdc/sdcAlarmsList.csv
index 247dcd9a..43ffdd34 100644
--- a/src/test/resources/example/sdc/sdcAlarmsList.csv
+++ b/src/test/resources/example/sdc/sdcAlarmsList.csv
@@ -1,13 +1,13 @@
,EventSourceType,,AlarmCondition,Severity
-eventType,VPMS,alarmCondition,SwRestart,CRITICAL
+eventType,VNFNAME,alarmCondition,SwRestart,CRITICAL
-eventType,VPMS,alarmCondition,SwRestart,WARNING
+eventType,VNFNAME,alarmCondition,SwRestart,WARNING
-eventType,VPMS,alarmCondition,SwRestart,OK
+eventType,VNFNAME,alarmCondition,SwRestart,OK
-eventType,VPMS,alarmCondition,IsAlive,CRITICAL
+eventType,VNFNAME,alarmCondition,IsAlive,CRITICAL
-eventType,VPMS,alarmCondition,IsAlive,WARNING
+eventType,VNFNAME,alarmCondition,IsAlive,WARNING
-eventType,VPMS,alarmCondition,IsAlive,OK
+eventType,VNFNAME,alarmCondition,IsAlive,OK
diff --git a/src/test/resources/example/sdc/sdcCVFCResourceExample.json b/src/test/resources/example/sdc/sdcCVFCResourceExample.json
index 01998dcb..16ebe74d 100644
--- a/src/test/resources/example/sdc/sdcCVFCResourceExample.json
+++ b/src/test/resources/example/sdc/sdcCVFCResourceExample.json
@@ -10,7 +10,7 @@
"lifecycleState": "CERTIFIED",
"lastUpdaterUserId": "user",
"lastUpdaterFullName": "Zero ASDCMech",
- "toscaResourceName": "org.openecomp.resource.vfc.ClampDev.abstract.nodes.virc_fe_be_0",
+ "toscaResourceName": "org.onap.resource.vfc.ClampDev.abstract.nodes.virc_fe_be_0",
"resources": [
{
"resourceInstanceName": "virc_fe_be_virc_fe_be_management_0_port",
diff --git a/src/test/resources/example/sdc/sdcCVFCResources.json b/src/test/resources/example/sdc/sdcCVFCResources.json
index 54003a64..e8743bba 100644
--- a/src/test/resources/example/sdc/sdcCVFCResources.json
+++ b/src/test/resources/example/sdc/sdcCVFCResources.json
@@ -266,7 +266,7 @@
{
"uuid": "cba89050-752c-4aac-8cec-6f0463eb8a23",
"invariantUUID": "ac6fab25-abc6-4e0e-ba25-cc2ddd7a51ef",
- "name": "LDSA-nodes.ltm",
+ "name": "VNF-nodes.ltm",
"version": "1.0",
"toscaModelURL": "/sdc/v1/catalog/resources/cba89050-752c-4aac-8cec-6f0463eb8a23/toscaModel",
"category": "Generic",
diff --git a/src/test/resources/example/sdc/sdcCinderVolume.json b/src/test/resources/example/sdc/sdcCinderVolume.json
index 1832a9aa..776226c8 100644
--- a/src/test/resources/example/sdc/sdcCinderVolume.json
+++ b/src/test/resources/example/sdc/sdcCinderVolume.json
@@ -10,6 +10,6 @@
"lifecycleState": "CERTIFIED",
"lastUpdaterUserId": "user",
"lastUpdaterFullName": "Jimmy Hendrix",
- "toscaResourceName": "org.openecomp.resource.vfc.nodes.heat.cinder.Volume",
+ "toscaResourceName": "org.onap.resource.vfc.nodes.heat.cinder.Volume",
"description": "Represents a server-local block storage device that provides persistent storage to guest virtual machines. "
} \ No newline at end of file
diff --git a/src/test/resources/example/sdc/sdcResourceDetailsExample.json b/src/test/resources/example/sdc/sdcResourceDetailsExample.json
index 7653b948..16c5708f 100644
--- a/src/test/resources/example/sdc/sdcResourceDetailsExample.json
+++ b/src/test/resources/example/sdc/sdcResourceDetailsExample.json
@@ -10,7 +10,7 @@
"lifecycleState": "CERTIFIED",
"lastUpdaterUserId": "user",
"lastUpdaterFullName": "Three ASDCMech",
- "toscaResourceName": "org.openecomp.resource.vf.ClampDev",
+ "toscaResourceName": "org.onap.resource.vf.ClampDev",
"resources":
[
{
diff --git a/src/test/resources/example/sdc/sdcSecurityRules.json b/src/test/resources/example/sdc/sdcSecurityRules.json
index b73abb05..a7a64123 100644
--- a/src/test/resources/example/sdc/sdcSecurityRules.json
+++ b/src/test/resources/example/sdc/sdcSecurityRules.json
@@ -10,6 +10,6 @@
"lifecycleState": "CERTIFIED",
"lastUpdaterUserId": "user",
"lastUpdaterFullName": "Jimmy Hendrix",
- "toscaResourceName": "org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules",
+ "toscaResourceName": "org.onap.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules",
"description": "Configuration of policy rules to be applied on ports."
} \ No newline at end of file
diff --git a/src/test/resources/example/sdc/sdcServiceDetailsExample.json b/src/test/resources/example/sdc/sdcServiceDetailsExample.json
index b344f419..57232503 100644
--- a/src/test/resources/example/sdc/sdcServiceDetailsExample.json
+++ b/src/test/resources/example/sdc/sdcServiceDetailsExample.json
@@ -10,7 +10,7 @@
"lifecycleState": "CERTIFIED",
"lastUpdaterUserId": "user",
"lastUpdaterFullName": "MONICA LAZER",
- "toscaResourceName": "org.openecomp.resource.vf.Vcts3",
+ "toscaResourceName": "org.onap.resource.vf.Vcts3",
"resources":
[
{
@@ -79,11 +79,11 @@
{
"artifactChecksum": "CheckSum",
- "artifactDescription": "Nimbus Heat OAM",
- "artifactName": "hot-nimbus-oam_v1.0.yaml",
+ "artifactDescription": "Test desc",
+ "artifactName": "vnf_v1.0.yaml",
"artifactTimeout": 100,
"artifactType": "HEAT",
- "artifactURL": "hot-nimbus-oam_v1.0.yaml",
+ "artifactURL": "vnf_v1.0.yaml",
"artifactUUID": "Artifact-UUID1",
"artifactVersion": "1.0",
"generatedArtifact": "EnvArtifact-UUID2",
@@ -96,10 +96,10 @@
{
"artifactChecksum": "CheckSum",
- "artifactDescription": "Nimbus Heat ENV OAM",
- "artifactName": "hot-nimbus-oam_v1.0.env",
+ "artifactDescription": "Vnf desc",
+ "artifactName": "vnf_v1.0.env",
"artifactType": "HEAT_ENV",
- "artifactURL": "hot-nimbus-oam_v1.0.env",
+ "artifactURL": "vnf_v1.0.env",
"artifactUUID": "EnvArtifact-UUID2",
"artifactVersion": "1.0"
},
@@ -128,11 +128,11 @@
{
"artifactChecksum": "CheckSum",
- "artifactDescription": "Script for Nimbus",
- "artifactName": "cloud-nimbus.sh",
+ "artifactDescription": "Script for Vnf",
+ "artifactName": "cloud-Vnf.sh",
"artifactType": "HEAT_ARTIFACT",
- "artifactURL": "cloud-nimbus.sh",
- "artifactUUID": "ScriptNimbusArtifact-UUID1",
+ "artifactURL": "cloud-Vnf.sh",
+ "artifactUUID": "ScriptVnfArtifact-UUID1",
"artifactVersion": "1.0"
},
@@ -149,10 +149,10 @@
{
"artifactChecksum": "CheckSum",
"artifactDescription": "Heat Vol for OAM",
- "artifactName": "hot-nimbus-oam-volumes_v1.0.yaml",
+ "artifactName": "vnf-volumes_v1.0.yaml",
"artifactTimeout": 10,
"artifactType": "HEAT_VOL",
- "artifactURL": "hot-nimbus-oam-volumes_v1.0.yaml",
+ "artifactURL": "vnf-volumes_v1.0.yaml",
"artifactUUID": "VolumeArtifact-UUID1",
"artifactVersion": "1.0",
"generatedArtifact": "VolumeEnvArtifact-UUID1",
@@ -165,9 +165,9 @@
{
"artifactChecksum": "CheckSum",
"artifactDescription": "Heat Env Vol for OAM",
- "artifactName": "hot-nimbus-oam-volumes_v1.0.env",
+ "artifactName": "vnf-volumes_v1.0.env",
"artifactType": "HEAT_ENV",
- "artifactURL": "hot-nimbus-oam-volumes_v1.0.env",
+ "artifactURL": "vnf-volumes_v1.0.env",
"artifactUUID": "VolumeEnvArtifact-UUID1",
"artifactVersion": "1.0"
},
@@ -175,10 +175,10 @@
{
"artifactChecksum": "CheckSum",
"artifactDescription": "Meta data for VFModule",
- "artifactName": "att_nimbus_vsaegw_ht_base_v13_0728v1.yaml",
+ "artifactName": "vnf_1.yaml",
"artifactTimeout": 100,
"artifactType": "HEAT",
- "artifactURL": "att_nimbus_vsaegw_ht_base_v13_0728v1.yaml",
+ "artifactURL": "vnf_1.yaml",
"artifactUUID": "HeatArtifactE2E-UUIDTest",
"artifactVersion": "1.0"
}
diff --git a/src/test/resources/example/sdc/sdcVFCGenericWithAlarms.json b/src/test/resources/example/sdc/sdcVFCGenericWithAlarms.json
index 952650af..5534d992 100644
--- a/src/test/resources/example/sdc/sdcVFCGenericWithAlarms.json
+++ b/src/test/resources/example/sdc/sdcVFCGenericWithAlarms.json
@@ -10,7 +10,7 @@
"lifecycleState": "CERTIFIED",
"lastUpdaterUserId": "user",
"lastUpdaterFullName": "Zero ASDCMech",
- "toscaResourceName": "org.openecomp.resource.vfc.ClampDev.abstract.nodes.virc_fe_be_1",
+ "toscaResourceName": "org.onap.resource.vfc.ClampDev.abstract.nodes.virc_fe_be_1",
"resources":
[
{
diff --git a/src/test/resources/example/sdc/sdcVFCResourceExample.json b/src/test/resources/example/sdc/sdcVFCResourceExample.json
index 5f523e6b..0b0d5811 100644
--- a/src/test/resources/example/sdc/sdcVFCResourceExample.json
+++ b/src/test/resources/example/sdc/sdcVFCResourceExample.json
@@ -10,7 +10,7 @@
"lifecycleState": "CERTIFIED",
"lastUpdaterUserId": "user",
"lastUpdaterFullName": "Zero ASDCMech",
- "toscaResourceName": "org.openecomp.resource.vfc.Clampdev.abstract.nodes.heat.virc_fe_be",
+ "toscaResourceName": "org.onap.resource.vfc.Clampdev.abstract.nodes.heat.virc_fe_be",
"artifacts": [
{
"artifactName": "Fault-alarms-ASDC-vprobes-vLB.csv",
diff --git a/src/test/resources/example/sdc/sdcVFResources.json b/src/test/resources/example/sdc/sdcVFResources.json
index 4274ba8f..e9d1d3b8 100644
--- a/src/test/resources/example/sdc/sdcVFResources.json
+++ b/src/test/resources/example/sdc/sdcVFResources.json
@@ -483,7 +483,7 @@
{
"uuid": "6b934b9d-0785-4b46-8321-943a12b8031b",
"invariantUUID": "785012c2-fdd8-450d-8fa2-81ff60e25f1e",
- "name": "vMMSC_AIC3.0__multi_members_multi_groups_volume.cs",
+ "name": "VNFNAME__multi_members_multi_groups_volume.cs",
"version": "0.2",
"toscaModelURL": "/sdc/v1/catalog/resources/6b934b9d-0785-4b46-8321-943a12b8031b/toscaModel",
"category": "Application L4+",
@@ -574,7 +574,7 @@
{
"uuid": "c8663b6e-bbe2-401d-9500-ec5425463655",
"invariantUUID": "925243cf-e342-4d86-8558-63899fbe88da",
- "name": "VF Module LDSA",
+ "name": "VF Module VNF",
"version": "1.1",
"toscaModelURL": "/sdc/v1/catalog/resources/c8663b6e-bbe2-401d-9500-ec5425463655/toscaModel",
"category": "Application L4+",
@@ -665,7 +665,7 @@
{
"uuid": "c1c02cff-855f-438e-85f8-40c362874896",
"invariantUUID": "64cb5201-90d4-4cab-a6a9-f7416eeb307f",
- "name": "PXTC",
+ "name": "VNFName",
"version": "0.1",
"toscaModelURL": "/sdc/v1/catalog/resources/c1c02cff-855f-438e-85f8-40c362874896/toscaModel",
"category": "Application L4+",
@@ -678,7 +678,7 @@
{
"uuid": "837c2fee-c2b2-4e95-ad48-dd69772d99bd",
"invariantUUID": "e48b3ea8-39bc-41eb-84bf-f5ef267d31e4",
- "name": "vMOG VNF 1",
+ "name": "VNF 1",
"version": "0.1",
"toscaModelURL": "/sdc/v1/catalog/resources/837c2fee-c2b2-4e95-ad48-dd69772d99bd/toscaModel",
"category": "Network L2-3",
@@ -756,7 +756,7 @@
{
"uuid": "1e7f07c7-ff4c-40a6-95f6-a9b05f138027",
"invariantUUID": "cfff70d2-f942-4b25-b2ca-e64f64af511d",
- "name": "vMMSC_AIC3.0__multi_members_multi_groups_volume",
+ "name": "VNFNAME__multi_members_multi_groups_volume",
"version": "2.0",
"toscaModelURL": "/sdc/v1/catalog/resources/1e7f07c7-ff4c-40a6-95f6-a9b05f138027/toscaModel",
"category": "Application L4+",
@@ -938,7 +938,7 @@
{
"uuid": "c9ea2798-f3ba-4826-ae93-0786820cb890",
"invariantUUID": "5882c528-76fe-4884-90c7-71301ca52cf8",
- "name": "vMMSC_ECA",
+ "name": "VNFNAME1",
"version": "0.1",
"toscaModelURL": "/sdc/v1/catalog/resources/c9ea2798-f3ba-4826-ae93-0786820cb890/toscaModel",
"category": "Application L4+",
@@ -1016,7 +1016,7 @@
{
"uuid": "3951e021-7595-43b1-a6fd-de077c01af54",
"invariantUUID": "925243cf-e342-4d86-8558-63899fbe88da",
- "name": "VF Module LDSA",
+ "name": "VF Module VNF",
"version": "1.0",
"toscaModelURL": "/sdc/v1/catalog/resources/3951e021-7595-43b1-a6fd-de077c01af54/toscaModel",
"category": "Application L4+",
@@ -1068,7 +1068,7 @@
{
"uuid": "70974b30-6b89-41d2-8b5d-779279db3b96",
"invariantUUID": "725e5fd1-2520-4669-a5f2-23f9ad2fbec4",
- "name": "vSCP0502",
+ "name": "VnfName2",
"version": "1.0",
"toscaModelURL": "/sdc/v1/catalog/resources/70974b30-6b89-41d2-8b5d-779279db3b96/toscaModel",
"category": "Application L4+",
@@ -1081,7 +1081,7 @@
{
"uuid": "c9e436c3-539f-45e2-90b4-b046af907877",
"invariantUUID": "bc7fe896-e286-41cb-a11f-7081fc92876b",
- "name": "vMMSC",
+ "name": "VNFNAME",
"version": "0.1",
"toscaModelURL": "/sdc/v1/catalog/resources/c9e436c3-539f-45e2-90b4-b046af907877/toscaModel",
"category": "Application L4+",
@@ -1120,7 +1120,7 @@
{
"uuid": "82460d6a-1cd7-4c57-bc89-625600555f80",
"invariantUUID": "c67108d4-a0b0-4eee-8fbc-c881d7bb21d3",
- "name": "VF modules vMMSC",
+ "name": "VF modules VNFNAME",
"version": "1.0",
"toscaModelURL": "/sdc/v1/catalog/resources/82460d6a-1cd7-4c57-bc89-625600555f80/toscaModel",
"category": "Application L4+",
@@ -1172,7 +1172,7 @@
{
"uuid": "ac603264-cdf7-49ab-a9ae-92d341023218",
"invariantUUID": "379ab526-dc81-4b31-b60d-31c1805ddf5a",
- "name": "FDNT1",
+ "name": "VnfName1",
"version": "0.1",
"toscaModelURL": "/sdc/v1/catalog/resources/ac603264-cdf7-49ab-a9ae-92d341023218/toscaModel",
"category": "Application L4+",
@@ -1237,7 +1237,7 @@
{
"uuid": "44ff8000-e703-4538-b26a-f2bc8205d7d4",
"invariantUUID": "26badc5a-d29e-4583-b773-0d42366a8bb1",
- "name": "FDNT1234",
+ "name": "VnfName1234",
"version": "1.0",
"toscaModelURL": "/sdc/v1/catalog/resources/44ff8000-e703-4538-b26a-f2bc8205d7d4/toscaModel",
"category": "Network L2-3",
@@ -1315,7 +1315,7 @@
{
"uuid": "8dec3b8a-a0fa-4634-bbb4-d7bad5a912ab",
"invariantUUID": "eda652e4-6740-46bf-8d0f-92c4752070f6",
- "name": "FCGI_OS",
+ "name": "VNFNAME",
"version": "0.1",
"toscaModelURL": "/sdc/v1/catalog/resources/8dec3b8a-a0fa-4634-bbb4-d7bad5a912ab/toscaModel",
"category": "Application L4+",
@@ -1419,7 +1419,7 @@
{
"uuid": "da3619c1-9b19-4edc-9853-a714c5034371",
"invariantUUID": "b90f7990-667a-4f63-9e7f-ee02f64766f1",
- "name": "FDNT",
+ "name": "VnfName2",
"version": "0.1",
"toscaModelURL": "/sdc/v1/catalog/resources/da3619c1-9b19-4edc-9853-a714c5034371/toscaModel",
"category": "Application L4+",
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.file
index 8b9114f1..5a84698e 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/metadata/.file
@@ -1 +1 @@
-{"uuid":"228aac11-6e48-4412-afbf-327c5c3b04fb","invariantUUID":"ba4d4b5d-f861-4155-886b-b1cdba5e0957","name":"vLoadBalancer-nodes.vlbCvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vloadbalancercvfc.abstract.nodes.vlb","resources":[{"resourceInstanceName":"vlb_vlb_private_2_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vlb_vlb_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vlb","resourceName":"Vloadbalancer.nodes.heat.vlb","resourceInvariantUUID":"3ff44c1d-0384-4501-8e33-dd3000799378","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d"},{"resourceInstanceName":"vlb_vlb_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
+{"uuid":"228aac11-6e48-4412-afbf-327c5c3b04fb","invariantUUID":"ba4d4b5d-f861-4155-886b-b1cdba5e0957","name":"vLoadBalancer-nodes.vlbCvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/228aac11-6e48-4412-afbf-327c5c3b04fb/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vloadbalancercvfc.abstract.nodes.vlb","resources":[{"resourceInstanceName":"vlb_vlb_private_2_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vlb_vlb_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vlb","resourceName":"Vloadbalancer.nodes.heat.vlb","resourceInvariantUUID":"3ff44c1d-0384-4501-8e33-dd3000799378","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d"},{"resourceInstanceName":"vlb_vlb_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.file
index da4363f1..e0b3cd72 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/metadata/.file
@@ -1 +1 @@
-{"uuid":"2bbcbcce-f9e2-4f5d-b975-1f1122d3226c","invariantUUID":"28142b9a-7925-4921-bc81-178c5bae4a9b","name":"vPacketGen-nodes.vpgCvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vpacketgencvfc.abstract.nodes.vpg","resources":[{"resourceInstanceName":"vpg_vpg_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vpg","resourceName":"Vpacketgen.nodes.heat.vpg","resourceInvariantUUID":"86769df9-139b-489f-949d-05efb7f0ed6a","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"c8a01686-2762-483c-98ad-a66606b9947f"},{"resourceInstanceName":"vpg_vpg_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
+{"uuid":"2bbcbcce-f9e2-4f5d-b975-1f1122d3226c","invariantUUID":"28142b9a-7925-4921-bc81-178c5bae4a9b","name":"vPacketGen-nodes.vpgCvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/2bbcbcce-f9e2-4f5d-b975-1f1122d3226c/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vpacketgencvfc.abstract.nodes.vpg","resources":[{"resourceInstanceName":"vpg_vpg_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vpg","resourceName":"Vpacketgen.nodes.heat.vpg","resourceInvariantUUID":"86769df9-139b-489f-949d-05efb7f0ed6a","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"c8a01686-2762-483c-98ad-a66606b9947f"},{"resourceInstanceName":"vpg_vpg_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.file
index 05f71475..9f717326 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/metadata/.file
@@ -1 +1 @@
-{"uuid":"38b62ebd-276a-48e8-948b-de76c81d6686","invariantUUID":"2ef814e3-7c17-420c-bdba-e84e338cd991","name":"vLoadBalancer-nodes.vdns_1Cvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vloadbalancercvfc.abstract.nodes.vdns_1","resources":[{"resourceInstanceName":"vdns_vdns_2_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vdns","resourceName":"Vloadbalancer.nodes.heat.vdns","resourceInvariantUUID":"b4ad5952-aa22-4645-ac57-72d55c8833be","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"cca286e8-5ac0-451c-b874-8cc307181e10"},{"resourceInstanceName":"vdns_vdns_2_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
+{"uuid":"38b62ebd-276a-48e8-948b-de76c81d6686","invariantUUID":"2ef814e3-7c17-420c-bdba-e84e338cd991","name":"vLoadBalancer-nodes.vdns_1Cvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/38b62ebd-276a-48e8-948b-de76c81d6686/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vloadbalancercvfc.abstract.nodes.vdns_1","resources":[{"resourceInstanceName":"vdns_vdns_2_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vdns","resourceName":"Vloadbalancer.nodes.heat.vdns","resourceInvariantUUID":"b4ad5952-aa22-4645-ac57-72d55c8833be","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"cca286e8-5ac0-451c-b874-8cc307181e10"},{"resourceInstanceName":"vdns_vdns_2_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.file
index 9985a8be..46e4922d 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/metadata/.file
@@ -1 +1 @@
-{"uuid":"68bb176c-8d5f-4d27-8407-fd8d9e5910eb","invariantUUID":"1a12347c-6166-4d21-9861-b2c432722a23","name":"Vfirewall.nodes.heat.vfw","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"VFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vfirewall.abstract.nodes.heat.vfw","description":"Not reusable inner VFC"} \ No newline at end of file
+{"uuid":"68bb176c-8d5f-4d27-8407-fd8d9e5910eb","invariantUUID":"1a12347c-6166-4d21-9861-b2c432722a23","name":"Vfirewall.nodes.heat.vfw","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/68bb176c-8d5f-4d27-8407-fd8d9e5910eb/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"VFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vfirewall.abstract.nodes.heat.vfw","description":"Not reusable inner VFC"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.file
index bbae2420..0469714b 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/metadata/.file
@@ -1 +1 @@
-{"uuid":"701bf7b7-ddf1-4658-af5f-66c815348fd3","invariantUUID":"53ebeed7-84db-4638-b1f3-8ed44c75985b","name":"vFirewall-nodes.vfwCvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vfirewallcvfc.abstract.nodes.vfw","resources":[{"resourceInstanceName":"vfw_vfw_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vfw_vfw_private_2_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vfw_vfw_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vfw","resourceName":"Vfirewall.nodes.heat.vfw","resourceInvariantUUID":"1a12347c-6166-4d21-9861-b2c432722a23","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"68bb176c-8d5f-4d27-8407-fd8d9e5910eb"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
+{"uuid":"701bf7b7-ddf1-4658-af5f-66c815348fd3","invariantUUID":"53ebeed7-84db-4638-b1f3-8ed44c75985b","name":"vFirewall-nodes.vfwCvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/701bf7b7-ddf1-4658-af5f-66c815348fd3/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vfirewallcvfc.abstract.nodes.vfw","resources":[{"resourceInstanceName":"vfw_vfw_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vfw_vfw_private_2_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vfw_vfw_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vfw","resourceName":"Vfirewall.nodes.heat.vfw","resourceInvariantUUID":"1a12347c-6166-4d21-9861-b2c432722a23","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"68bb176c-8d5f-4d27-8407-fd8d9e5910eb"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.file
index 940d0ecc..6c99b699 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/metadata/.file
@@ -1 +1 @@
-{"uuid":"8fb4db8b-1d1f-4369-8611-0375d86f0051","invariantUUID":"05e3e25f-b671-433f-8ea6-835c198c15ae","name":"Vloadbalancer.nodes.heat.vpg","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"VFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vloadbalancer.abstract.nodes.heat.vpg","description":"Not reusable inner VFC"} \ No newline at end of file
+{"uuid":"8fb4db8b-1d1f-4369-8611-0375d86f0051","invariantUUID":"05e3e25f-b671-433f-8ea6-835c198c15ae","name":"Vloadbalancer.nodes.heat.vpg","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/8fb4db8b-1d1f-4369-8611-0375d86f0051/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"VFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vloadbalancer.abstract.nodes.heat.vpg","description":"Not reusable inner VFC"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.file
index 53fa9e39..5689e38a 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/metadata/.file
@@ -1 +1 @@
-{"uuid":"948da0c9-536e-4688-85eb-d906fe7324b3","invariantUUID":"702cbc3d-5669-426d-aba6-6ddf4d4a702b","name":"vLoadBalancer-nodes.vpgCvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vloadbalancercvfc.abstract.nodes.vpg","resources":[{"resourceInstanceName":"vpg","resourceName":"Vloadbalancer.nodes.heat.vpg","resourceInvariantUUID":"05e3e25f-b671-433f-8ea6-835c198c15ae","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"8fb4db8b-1d1f-4369-8611-0375d86f0051"},{"resourceInstanceName":"vpg_vpg_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vpg_vpg_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
+{"uuid":"948da0c9-536e-4688-85eb-d906fe7324b3","invariantUUID":"702cbc3d-5669-426d-aba6-6ddf4d4a702b","name":"vLoadBalancer-nodes.vpgCvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/948da0c9-536e-4688-85eb-d906fe7324b3/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vloadbalancercvfc.abstract.nodes.vpg","resources":[{"resourceInstanceName":"vpg","resourceName":"Vloadbalancer.nodes.heat.vpg","resourceInvariantUUID":"05e3e25f-b671-433f-8ea6-835c198c15ae","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"8fb4db8b-1d1f-4369-8611-0375d86f0051"},{"resourceInstanceName":"vpg_vpg_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vpg_vpg_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.file
index 2a272ee6..dd564ea9 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/metadata/.file
@@ -1 +1 @@
-{"uuid":"98c27d0b-9395-4f8b-87ab-e076cd1f627e","invariantUUID":"07e266fc-49ab-4cd7-8378-ca4676f1b9ec","name":"vFirewall","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/toscaModel","category":"Application L4+","subCategory":"Firewall","resourceType":"VF","lifecycleState":"CERTIFIED","lastUpdaterUserId":"jm0007","lastUpdaterFullName":"Joni Mitchell","toscaResourceName":"org.openecomp.resource.vf.Vfirewall","resources":[{"resourceInstanceName":"unprotected_private_network","resourceName":"NeutronNet","resourceInvariantUUID":"e83f8487-8ba2-479c-8d63-23217595dbb2","resourceVersion":"1.0","resoucreType":"VL","resourceUUID":"fc80335e-39cf-44a3-8860-995495fad829"},{"resourceInstanceName":"abstract_vfw","resourceName":"vFirewall-nodes.vfwCvfc","resourceInvariantUUID":"53ebeed7-84db-4638-b1f3-8ed44c75985b","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"701bf7b7-ddf1-4658-af5f-66c815348fd3"},{"resourceInstanceName":"protected_private_network","resourceName":"NeutronNet","resourceInvariantUUID":"e83f8487-8ba2-479c-8d63-23217595dbb2","resourceVersion":"1.0","resoucreType":"VL","resourceUUID":"fc80335e-39cf-44a3-8860-995495fad829"},{"resourceInstanceName":"abstract_vsn","resourceName":"vFirewall-nodes.vsnCvfc","resourceInvariantUUID":"74805001-19f5-4c2c-9928-03014161c32a","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"d6a5add1-162a-4966-80a6-8ba53d83b17f"}],"artifacts":[{"artifactName":"vf-license-model.xml","artifactType":"VF_LICENSE","artifactURL":"/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/artifacts/6e816af9-944d-46d0-826d-5ff7be063a01","artifactDescription":"VF license file","artifactChecksum":"Njg4NTI4ZWY2MTliMGQzOGZmNDA4ZjRiMjllZmJkMzM=","artifactUUID":"6e816af9-944d-46d0-826d-5ff7be063a01","artifactVersion":"1","artifactLabel":"vflicense","artifactGroupType":"DEPLOYMENT"},{"artifactName":"base_vfw.yaml","artifactType":"HEAT","artifactURL":"/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/artifacts/cbc75b18-86d1-4139-95f2-1d91f79a8b25","artifactDescription":"created from csar","artifactTimeout":60,"artifactChecksum":"M2I1YmVjNzZkY2MxMWJkYTM5NzA3NDVhMGQxMzY2MDA=","artifactUUID":"cbc75b18-86d1-4139-95f2-1d91f79a8b25","artifactVersion":"2","artifactLabel":"heat1","artifactGroupType":"DEPLOYMENT"},{"artifactName":"vendor-license-model.xml","artifactType":"VENDOR_LICENSE","artifactURL":"/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/artifacts/5b592087-76bf-4c43-a1e7-d4151ce51cdd","artifactDescription":" Vendor license file","artifactChecksum":"Mjc0NGViYzYyNWZkZTRmYWFkYmUzZjY1MmEwNzRjZDE=","artifactUUID":"5b592087-76bf-4c43-a1e7-d4151ce51cdd","artifactVersion":"1","artifactLabel":"vendorlicense","artifactGroupType":"DEPLOYMENT"}],"description":"vFW, vSink"} \ No newline at end of file
+{"uuid":"98c27d0b-9395-4f8b-87ab-e076cd1f627e","invariantUUID":"07e266fc-49ab-4cd7-8378-ca4676f1b9ec","name":"vFirewall","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/toscaModel","category":"Application L4+","subCategory":"Firewall","resourceType":"VF","lifecycleState":"CERTIFIED","lastUpdaterUserId":"jm0007","lastUpdaterFullName":"Joni Mitchell","toscaResourceName":"org.onap.resource.vf.Vfirewall","resources":[{"resourceInstanceName":"unprotected_private_network","resourceName":"NeutronNet","resourceInvariantUUID":"e83f8487-8ba2-479c-8d63-23217595dbb2","resourceVersion":"1.0","resoucreType":"VL","resourceUUID":"fc80335e-39cf-44a3-8860-995495fad829"},{"resourceInstanceName":"abstract_vfw","resourceName":"vFirewall-nodes.vfwCvfc","resourceInvariantUUID":"53ebeed7-84db-4638-b1f3-8ed44c75985b","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"701bf7b7-ddf1-4658-af5f-66c815348fd3"},{"resourceInstanceName":"protected_private_network","resourceName":"NeutronNet","resourceInvariantUUID":"e83f8487-8ba2-479c-8d63-23217595dbb2","resourceVersion":"1.0","resoucreType":"VL","resourceUUID":"fc80335e-39cf-44a3-8860-995495fad829"},{"resourceInstanceName":"abstract_vsn","resourceName":"vFirewall-nodes.vsnCvfc","resourceInvariantUUID":"74805001-19f5-4c2c-9928-03014161c32a","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"d6a5add1-162a-4966-80a6-8ba53d83b17f"}],"artifacts":[{"artifactName":"vf-license-model.xml","artifactType":"VF_LICENSE","artifactURL":"/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/artifacts/6e816af9-944d-46d0-826d-5ff7be063a01","artifactDescription":"VF license file","artifactChecksum":"Njg4NTI4ZWY2MTliMGQzOGZmNDA4ZjRiMjllZmJkMzM=","artifactUUID":"6e816af9-944d-46d0-826d-5ff7be063a01","artifactVersion":"1","artifactLabel":"vflicense","artifactGroupType":"DEPLOYMENT"},{"artifactName":"base_vfw.yaml","artifactType":"HEAT","artifactURL":"/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/artifacts/cbc75b18-86d1-4139-95f2-1d91f79a8b25","artifactDescription":"created from csar","artifactTimeout":60,"artifactChecksum":"M2I1YmVjNzZkY2MxMWJkYTM5NzA3NDVhMGQxMzY2MDA=","artifactUUID":"cbc75b18-86d1-4139-95f2-1d91f79a8b25","artifactVersion":"2","artifactLabel":"heat1","artifactGroupType":"DEPLOYMENT"},{"artifactName":"vendor-license-model.xml","artifactType":"VENDOR_LICENSE","artifactURL":"/sdc/v1/catalog/resources/98c27d0b-9395-4f8b-87ab-e076cd1f627e/artifacts/5b592087-76bf-4c43-a1e7-d4151ce51cdd","artifactDescription":" Vendor license file","artifactChecksum":"Mjc0NGViYzYyNWZkZTRmYWFkYmUzZjY1MmEwNzRjZDE=","artifactUUID":"5b592087-76bf-4c43-a1e7-d4151ce51cdd","artifactVersion":"1","artifactLabel":"vendorlicense","artifactGroupType":"DEPLOYMENT"}],"description":"vFW, vSink"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.file
index ea376775..7f8d2201 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/metadata/.file
@@ -1 +1 @@
-{"uuid":"a004b0d8-54bd-4ede-9311-c75dc608e9fd","invariantUUID":"023a3f0d-1161-45ff-b4cf-8918a8ccf3ad","name":"vPacketGen","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/toscaModel","category":"Application L4+","subCategory":"Web Server","resourceType":"VF","lifecycleState":"CERTIFIED","lastUpdaterUserId":"jm0007","lastUpdaterFullName":"Joni Mitchell","toscaResourceName":"org.openecomp.resource.vf.Vpacketgen","resources":[{"resourceInstanceName":"abstract_vpg","resourceName":"vPacketGen-nodes.vpgCvfc","resourceInvariantUUID":"28142b9a-7925-4921-bc81-178c5bae4a9b","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"2bbcbcce-f9e2-4f5d-b975-1f1122d3226c"}],"artifacts":[{"artifactName":"vf-license-model.xml","artifactType":"VF_LICENSE","artifactURL":"/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/artifacts/0d837657-c5fe-4042-a105-b650361cc289","artifactDescription":"VF license file","artifactChecksum":"MGU5YWY1NzNmZmM3MTEwYmM0YTgzMmQ5NGUyMmUzODQ=","artifactUUID":"0d837657-c5fe-4042-a105-b650361cc289","artifactVersion":"1","artifactLabel":"vflicense","artifactGroupType":"DEPLOYMENT"},{"artifactName":"base_vpkg.yaml","artifactType":"HEAT","artifactURL":"/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/artifacts/010c5015-477d-4aba-a57a-540daa1b7af6","artifactDescription":"created from csar","artifactTimeout":60,"artifactChecksum":"NzI1ZTM5NDU3ZjBhMzQwNmFiNDYzNDBhOWM2NjNmOWU=","artifactUUID":"010c5015-477d-4aba-a57a-540daa1b7af6","artifactVersion":"2","artifactLabel":"heat1","artifactGroupType":"DEPLOYMENT"},{"artifactName":"vendor-license-model.xml","artifactType":"VENDOR_LICENSE","artifactURL":"/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/artifacts/054e473f-173b-48d5-a4ee-f5ef055c008d","artifactDescription":" Vendor license file","artifactChecksum":"Mjc0NGViYzYyNWZkZTRmYWFkYmUzZjY1MmEwNzRjZDE=","artifactUUID":"054e473f-173b-48d5-a4ee-f5ef055c008d","artifactVersion":"1","artifactLabel":"vendorlicense","artifactGroupType":"DEPLOYMENT"}],"description":"vPacketGen"} \ No newline at end of file
+{"uuid":"a004b0d8-54bd-4ede-9311-c75dc608e9fd","invariantUUID":"023a3f0d-1161-45ff-b4cf-8918a8ccf3ad","name":"vPacketGen","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/toscaModel","category":"Application L4+","subCategory":"Web Server","resourceType":"VF","lifecycleState":"CERTIFIED","lastUpdaterUserId":"jm0007","lastUpdaterFullName":"Joni Mitchell","toscaResourceName":"org.onap.resource.vf.Vpacketgen","resources":[{"resourceInstanceName":"abstract_vpg","resourceName":"vPacketGen-nodes.vpgCvfc","resourceInvariantUUID":"28142b9a-7925-4921-bc81-178c5bae4a9b","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"2bbcbcce-f9e2-4f5d-b975-1f1122d3226c"}],"artifacts":[{"artifactName":"vf-license-model.xml","artifactType":"VF_LICENSE","artifactURL":"/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/artifacts/0d837657-c5fe-4042-a105-b650361cc289","artifactDescription":"VF license file","artifactChecksum":"MGU5YWY1NzNmZmM3MTEwYmM0YTgzMmQ5NGUyMmUzODQ=","artifactUUID":"0d837657-c5fe-4042-a105-b650361cc289","artifactVersion":"1","artifactLabel":"vflicense","artifactGroupType":"DEPLOYMENT"},{"artifactName":"base_vpkg.yaml","artifactType":"HEAT","artifactURL":"/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/artifacts/010c5015-477d-4aba-a57a-540daa1b7af6","artifactDescription":"created from csar","artifactTimeout":60,"artifactChecksum":"NzI1ZTM5NDU3ZjBhMzQwNmFiNDYzNDBhOWM2NjNmOWU=","artifactUUID":"010c5015-477d-4aba-a57a-540daa1b7af6","artifactVersion":"2","artifactLabel":"heat1","artifactGroupType":"DEPLOYMENT"},{"artifactName":"vendor-license-model.xml","artifactType":"VENDOR_LICENSE","artifactURL":"/sdc/v1/catalog/resources/a004b0d8-54bd-4ede-9311-c75dc608e9fd/artifacts/054e473f-173b-48d5-a4ee-f5ef055c008d","artifactDescription":" Vendor license file","artifactChecksum":"Mjc0NGViYzYyNWZkZTRmYWFkYmUzZjY1MmEwNzRjZDE=","artifactUUID":"054e473f-173b-48d5-a4ee-f5ef055c008d","artifactVersion":"1","artifactLabel":"vendorlicense","artifactGroupType":"DEPLOYMENT"}],"description":"vPacketGen"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.file
index b2e0716c..c48a5063 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/metadata/.file
@@ -1 +1 @@
-{"uuid":"a01ebd00-4b64-4607-8422-c3733735800d","invariantUUID":"dd6edb9e-015e-45ae-9597-bac06687f9e3","name":"vLoadBalancer-nodes.vdnsCvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vloadbalancercvfc.abstract.nodes.vdns","resources":[{"resourceInstanceName":"vdns","resourceName":"Vloadbalancer.nodes.heat.vdns","resourceInvariantUUID":"b4ad5952-aa22-4645-ac57-72d55c8833be","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"cca286e8-5ac0-451c-b874-8cc307181e10"},{"resourceInstanceName":"vdns_vdns_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vdns_vdns_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
+{"uuid":"a01ebd00-4b64-4607-8422-c3733735800d","invariantUUID":"dd6edb9e-015e-45ae-9597-bac06687f9e3","name":"vLoadBalancer-nodes.vdnsCvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/a01ebd00-4b64-4607-8422-c3733735800d/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vloadbalancercvfc.abstract.nodes.vdns","resources":[{"resourceInstanceName":"vdns","resourceName":"Vloadbalancer.nodes.heat.vdns","resourceInvariantUUID":"b4ad5952-aa22-4645-ac57-72d55c8833be","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"cca286e8-5ac0-451c-b874-8cc307181e10"},{"resourceInstanceName":"vdns_vdns_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vdns_vdns_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.file
index 24da339a..1156b147 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/metadata/.file
@@ -1 +1 @@
-{"uuid":"b339e576-e433-4be4-8a43-258f629c4e79","invariantUUID":"d66c0bce-d7e1-41ad-bdaf-468d442d0543","name":"Vfirewall.nodes.heat.vsn","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"VFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vfirewall.abstract.nodes.heat.vsn","description":"Not reusable inner VFC"} \ No newline at end of file
+{"uuid":"b339e576-e433-4be4-8a43-258f629c4e79","invariantUUID":"d66c0bce-d7e1-41ad-bdaf-468d442d0543","name":"Vfirewall.nodes.heat.vsn","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/b339e576-e433-4be4-8a43-258f629c4e79/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"VFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vfirewall.abstract.nodes.heat.vsn","description":"Not reusable inner VFC"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.file
index 4a23a0ec..b754b913 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/metadata/.file
@@ -1 +1 @@
-{"uuid":"c041f64d-8d8f-4f89-906f-79dccc63e7f5","invariantUUID":"48504e0e-f3d3-411d-a52b-eda1b8fec073","name":"vLoadBalancer","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/toscaModel","category":"Application L4+","subCategory":"Load Balancer","resourceType":"VF","lifecycleState":"CERTIFIED","lastUpdaterUserId":"jm0007","lastUpdaterFullName":"Joni Mitchell","toscaResourceName":"org.openecomp.resource.vf.Vloadbalancer","resources":[{"resourceInstanceName":"abstract_vdns","resourceName":"vLoadBalancer-nodes.vdnsCvfc","resourceInvariantUUID":"dd6edb9e-015e-45ae-9597-bac06687f9e3","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"a01ebd00-4b64-4607-8422-c3733735800d"},{"resourceInstanceName":"vlb_private_network","resourceName":"NeutronNet","resourceInvariantUUID":"e83f8487-8ba2-479c-8d63-23217595dbb2","resourceVersion":"1.0","resoucreType":"VL","resourceUUID":"fc80335e-39cf-44a3-8860-995495fad829"},{"resourceInstanceName":"abstract_vlb","resourceName":"vLoadBalancer-nodes.vlbCvfc","resourceInvariantUUID":"ba4d4b5d-f861-4155-886b-b1cdba5e0957","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"228aac11-6e48-4412-afbf-327c5c3b04fb"},{"resourceInstanceName":"abstract_vpg","resourceName":"vLoadBalancer-nodes.vpgCvfc","resourceInvariantUUID":"702cbc3d-5669-426d-aba6-6ddf4d4a702b","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"948da0c9-536e-4688-85eb-d906fe7324b3"},{"resourceInstanceName":"abstract_vdns_1","resourceName":"vLoadBalancer-nodes.vdns_1Cvfc","resourceInvariantUUID":"2ef814e3-7c17-420c-bdba-e84e338cd991","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"38b62ebd-276a-48e8-948b-de76c81d6686"},{"resourceInstanceName":"pktgen_private_network","resourceName":"NeutronNet","resourceInvariantUUID":"e83f8487-8ba2-479c-8d63-23217595dbb2","resourceVersion":"1.0","resoucreType":"VL","resourceUUID":"fc80335e-39cf-44a3-8860-995495fad829"}],"artifacts":[{"artifactName":"vf-license-model.xml","artifactType":"VF_LICENSE","artifactURL":"/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/artifacts/51af0540-4863-4900-b3be-0f81abd89194","artifactDescription":"VF license file","artifactChecksum":"ODk5M2NiYzE2ZDk1ZmNkZmRjZDcwMTE1NjExMzViNjA=","artifactUUID":"51af0540-4863-4900-b3be-0f81abd89194","artifactVersion":"1","artifactLabel":"vflicense","artifactGroupType":"DEPLOYMENT"},{"artifactName":"dnsscaling.yaml","artifactType":"HEAT","artifactURL":"/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/artifacts/f5aad388-38b2-4b53-9df7-d8a25595e5cb","artifactDescription":"created from csar","artifactTimeout":60,"artifactChecksum":"NmE1MmVmNThmZmFjZmZiZTA4NDY2NzA2OTM4ZmFlMGM=","artifactUUID":"f5aad388-38b2-4b53-9df7-d8a25595e5cb","artifactVersion":"2","artifactLabel":"heat1","artifactGroupType":"DEPLOYMENT"},{"artifactName":"base_vlb.yaml","artifactType":"HEAT","artifactURL":"/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/artifacts/3370c5c2-cdbc-45b9-ab76-1f0d45cda59e","artifactDescription":"created from csar","artifactTimeout":60,"artifactChecksum":"ZWZiMDg0M2UxMGZmMjlhYTIxODE5ZDBhNWVhZDk2NTU=","artifactUUID":"3370c5c2-cdbc-45b9-ab76-1f0d45cda59e","artifactVersion":"2","artifactLabel":"heat2","artifactGroupType":"DEPLOYMENT"},{"artifactName":"vendor-license-model.xml","artifactType":"VENDOR_LICENSE","artifactURL":"/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/artifacts/28a877c8-2005-43d7-802d-769b5f420608","artifactDescription":" Vendor license file","artifactChecksum":"Mjc0NGViYzYyNWZkZTRmYWFkYmUzZjY1MmEwNzRjZDE=","artifactUUID":"28a877c8-2005-43d7-802d-769b5f420608","artifactVersion":"1","artifactLabel":"vendorlicense","artifactGroupType":"DEPLOYMENT"}],"description":"vLB, vDNS, vPacketGen"} \ No newline at end of file
+{"uuid":"c041f64d-8d8f-4f89-906f-79dccc63e7f5","invariantUUID":"48504e0e-f3d3-411d-a52b-eda1b8fec073","name":"vLoadBalancer","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/toscaModel","category":"Application L4+","subCategory":"Load Balancer","resourceType":"VF","lifecycleState":"CERTIFIED","lastUpdaterUserId":"jm0007","lastUpdaterFullName":"Joni Mitchell","toscaResourceName":"org.onap.resource.vf.Vloadbalancer","resources":[{"resourceInstanceName":"abstract_vdns","resourceName":"vLoadBalancer-nodes.vdnsCvfc","resourceInvariantUUID":"dd6edb9e-015e-45ae-9597-bac06687f9e3","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"a01ebd00-4b64-4607-8422-c3733735800d"},{"resourceInstanceName":"vlb_private_network","resourceName":"NeutronNet","resourceInvariantUUID":"e83f8487-8ba2-479c-8d63-23217595dbb2","resourceVersion":"1.0","resoucreType":"VL","resourceUUID":"fc80335e-39cf-44a3-8860-995495fad829"},{"resourceInstanceName":"abstract_vlb","resourceName":"vLoadBalancer-nodes.vlbCvfc","resourceInvariantUUID":"ba4d4b5d-f861-4155-886b-b1cdba5e0957","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"228aac11-6e48-4412-afbf-327c5c3b04fb"},{"resourceInstanceName":"abstract_vpg","resourceName":"vLoadBalancer-nodes.vpgCvfc","resourceInvariantUUID":"702cbc3d-5669-426d-aba6-6ddf4d4a702b","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"948da0c9-536e-4688-85eb-d906fe7324b3"},{"resourceInstanceName":"abstract_vdns_1","resourceName":"vLoadBalancer-nodes.vdns_1Cvfc","resourceInvariantUUID":"2ef814e3-7c17-420c-bdba-e84e338cd991","resourceVersion":"1.0","resoucreType":"CVFC","resourceUUID":"38b62ebd-276a-48e8-948b-de76c81d6686"},{"resourceInstanceName":"pktgen_private_network","resourceName":"NeutronNet","resourceInvariantUUID":"e83f8487-8ba2-479c-8d63-23217595dbb2","resourceVersion":"1.0","resoucreType":"VL","resourceUUID":"fc80335e-39cf-44a3-8860-995495fad829"}],"artifacts":[{"artifactName":"vf-license-model.xml","artifactType":"VF_LICENSE","artifactURL":"/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/artifacts/51af0540-4863-4900-b3be-0f81abd89194","artifactDescription":"VF license file","artifactChecksum":"ODk5M2NiYzE2ZDk1ZmNkZmRjZDcwMTE1NjExMzViNjA=","artifactUUID":"51af0540-4863-4900-b3be-0f81abd89194","artifactVersion":"1","artifactLabel":"vflicense","artifactGroupType":"DEPLOYMENT"},{"artifactName":"dnsscaling.yaml","artifactType":"HEAT","artifactURL":"/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/artifacts/f5aad388-38b2-4b53-9df7-d8a25595e5cb","artifactDescription":"created from csar","artifactTimeout":60,"artifactChecksum":"NmE1MmVmNThmZmFjZmZiZTA4NDY2NzA2OTM4ZmFlMGM=","artifactUUID":"f5aad388-38b2-4b53-9df7-d8a25595e5cb","artifactVersion":"2","artifactLabel":"heat1","artifactGroupType":"DEPLOYMENT"},{"artifactName":"base_vlb.yaml","artifactType":"HEAT","artifactURL":"/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/artifacts/3370c5c2-cdbc-45b9-ab76-1f0d45cda59e","artifactDescription":"created from csar","artifactTimeout":60,"artifactChecksum":"ZWZiMDg0M2UxMGZmMjlhYTIxODE5ZDBhNWVhZDk2NTU=","artifactUUID":"3370c5c2-cdbc-45b9-ab76-1f0d45cda59e","artifactVersion":"2","artifactLabel":"heat2","artifactGroupType":"DEPLOYMENT"},{"artifactName":"vendor-license-model.xml","artifactType":"VENDOR_LICENSE","artifactURL":"/sdc/v1/catalog/resources/c041f64d-8d8f-4f89-906f-79dccc63e7f5/artifacts/28a877c8-2005-43d7-802d-769b5f420608","artifactDescription":" Vendor license file","artifactChecksum":"Mjc0NGViYzYyNWZkZTRmYWFkYmUzZjY1MmEwNzRjZDE=","artifactUUID":"28a877c8-2005-43d7-802d-769b5f420608","artifactVersion":"1","artifactLabel":"vendorlicense","artifactGroupType":"DEPLOYMENT"}],"description":"vLB, vDNS, vPacketGen"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.file
index ecf6aa73..24fbb474 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/metadata/.file
@@ -1 +1 @@
-{"uuid":"c8a01686-2762-483c-98ad-a66606b9947f","invariantUUID":"86769df9-139b-489f-949d-05efb7f0ed6a","name":"Vpacketgen.nodes.heat.vpg","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"VFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vpacketgen.abstract.nodes.heat.vpg","description":"Not reusable inner VFC"} \ No newline at end of file
+{"uuid":"c8a01686-2762-483c-98ad-a66606b9947f","invariantUUID":"86769df9-139b-489f-949d-05efb7f0ed6a","name":"Vpacketgen.nodes.heat.vpg","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/c8a01686-2762-483c-98ad-a66606b9947f/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"VFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vpacketgen.abstract.nodes.heat.vpg","description":"Not reusable inner VFC"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.file
index 58b5d367..40093178 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/metadata/.file
@@ -1 +1 @@
-{"uuid":"cca286e8-5ac0-451c-b874-8cc307181e10","invariantUUID":"b4ad5952-aa22-4645-ac57-72d55c8833be","name":"Vloadbalancer.nodes.heat.vdns","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"VFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vloadbalancer.abstract.nodes.heat.vdns","description":"Not reusable inner VFC"} \ No newline at end of file
+{"uuid":"cca286e8-5ac0-451c-b874-8cc307181e10","invariantUUID":"b4ad5952-aa22-4645-ac57-72d55c8833be","name":"Vloadbalancer.nodes.heat.vdns","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/cca286e8-5ac0-451c-b874-8cc307181e10/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"VFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vloadbalancer.abstract.nodes.heat.vdns","description":"Not reusable inner VFC"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.file
index 8038b813..7ccde149 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/metadata/.file
@@ -1 +1 @@
-{"uuid":"d6a5add1-162a-4966-80a6-8ba53d83b17f","invariantUUID":"74805001-19f5-4c2c-9928-03014161c32a","name":"vFirewall-nodes.vsnCvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vfirewallcvfc.abstract.nodes.vsn","resources":[{"resourceInstanceName":"vsn","resourceName":"Vfirewall.nodes.heat.vsn","resourceInvariantUUID":"d66c0bce-d7e1-41ad-bdaf-468d442d0543","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"b339e576-e433-4be4-8a43-258f629c4e79"},{"resourceInstanceName":"vsn_vsn_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vsn_vsn_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
+{"uuid":"d6a5add1-162a-4966-80a6-8ba53d83b17f","invariantUUID":"74805001-19f5-4c2c-9928-03014161c32a","name":"vFirewall-nodes.vsnCvfc","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/d6a5add1-162a-4966-80a6-8ba53d83b17f/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"CVFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vfirewallcvfc.abstract.nodes.vsn","resources":[{"resourceInstanceName":"vsn","resourceName":"Vfirewall.nodes.heat.vsn","resourceInvariantUUID":"d66c0bce-d7e1-41ad-bdaf-468d442d0543","resourceVersion":"1.0","resoucreType":"VFC","resourceUUID":"b339e576-e433-4be4-8a43-258f629c4e79"},{"resourceInstanceName":"vsn_vsn_private_1_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"},{"resourceInstanceName":"vsn_vsn_private_0_port","resourceName":"NeutronPort","resourceInvariantUUID":"d8a13756-4f96-40e2-a1ab-108dcda821a9","resourceVersion":"1.0","resoucreType":"CP","resourceUUID":"3a8362d1-b072-4cd1-b55c-73d882c8a388"}],"description":"Complex node type that is used as nested type in VF"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.file b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.file
index 77773830..3113104e 100644
--- a/src/test/resources/http-cache/example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.file
+++ b/src/test/resources/http-cache/example/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/metadata/.file
@@ -1 +1 @@
-{"uuid":"f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d","invariantUUID":"3ff44c1d-0384-4501-8e33-dd3000799378","name":"Vloadbalancer.nodes.heat.vlb","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"VFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.openecomp.resource.vfc.Vloadbalancer.abstract.nodes.heat.vlb","description":"Not reusable inner VFC"} \ No newline at end of file
+{"uuid":"f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d","invariantUUID":"3ff44c1d-0384-4501-8e33-dd3000799378","name":"Vloadbalancer.nodes.heat.vlb","version":"1.0","toscaModelURL":"/sdc/v1/catalog/resources/f2686c0f-11c5-4cab-83bd-b0f2cc35bf4d/toscaModel","category":"Generic","subCategory":"Abstract","resourceType":"VFC","lifecycleState":"CERTIFIED","lastUpdaterUserId":"cs0008","lastUpdaterFullName":"Carlos Santana","toscaResourceName":"org.onap.resource.vfc.Vloadbalancer.abstract.nodes.heat.vlb","description":"Not reusable inner VFC"} \ No newline at end of file
diff --git a/src/test/resources/http-cache/start_http_cache.sh b/src/test/resources/http-cache/start_http_cache.sh
index a8ff96ac..178ac80a 100755
--- a/src/test/resources/http-cache/start_http_cache.sh
+++ b/src/test/resources/http-cache/start_http_cache.sh
@@ -49,4 +49,4 @@ done
echo 'Installing requests packages for Python'
pip install requests
echo 'Executing the Http proxy in Cache mode only'
-python third_party_proxy.py --port 8080 --root /usr/src/http-cache-app/data-cache $python_proxyaddress
+python -u third_party_proxy.py --port 8080 --root /usr/src/http-cache-app/data-cache $python_proxyaddress
diff --git a/src/test/resources/http-cache/third_party_proxy.py b/src/test/resources/http-cache/third_party_proxy.py
index fdc4fab3..30f51075 100755
--- a/src/test/resources/http-cache/third_party_proxy.py
+++ b/src/test/resources/http-cache/third_party_proxy.py
@@ -25,6 +25,7 @@
import json
import requests
import os
+import errno
import sys
import SimpleHTTPServer
import SocketServer
@@ -37,7 +38,8 @@ import shutil
parser = argparse.ArgumentParser(description="3rd party Cache & Replay")
parser.add_argument("--username", "-u", type=str, help="Set the username for contacting 3rd party - only used for GET")
parser.add_argument("--password", "-p", type=str, help="Set the password for contacting 3rd party - only used for GET")
-parser.add_argument("--root", "-r", default=tempfile.mkdtemp, type=str, help="Root folder for the proxy cache")
+parser.add_argument("--root", "-r", default=tempfile.mkdtemp(), type=str, help="Root folder for the proxy cache")
+parser.add_argument("--temp", "-t", default=tempfile.mkdtemp(), type=str, help="Temp folder for the generated content")
parser.add_argument("--proxy" , type=str, help="Url of the Act as a proxy. If not set, this script only uses the cache and will return a 404 if files aren't found")
parser.add_argument("--port", "-P", type=int, default="8081", help="Port on which the proxy should listen to")
parser.add_argument("--verbose", "-v", type=bool, help="Print more information in case of error")
@@ -49,8 +51,9 @@ PORT = options.port
HOST = options.proxy
AUTH = (options.username, options.password)
HEADERS = {'X-ECOMP-InstanceID':'CLAMP'}
-CACHE_ROOT = options.root
-PROXY_ADDRESS=options.proxyaddress
+CACHE_ROOT = str(options.root)
+TMP_ROOT = str(options.temp)
+PROXY_ADDRESS=str(options.proxyaddress)
def signal_handler(signal_sent, frame):
global httpd
@@ -61,7 +64,6 @@ def signal_handler(signal_sent, frame):
httpd.server_close()
class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
-
def print_headers(self):
for header,value in self.headers.items():
print("header: %s : %s" % (header, value))
@@ -82,238 +84,296 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
fc = f.read()
self.wfile.write(fc)
- def _write_cache(self,cached_file, header_file, content_file, response):
- os.makedirs(cached_file, True)
+ def _write_cache(self,cached_file_folder, header_file, content_file, response):
+ os.makedirs(cached_file_folder, 0777)
with open(content_file, 'w') as f:
f.write(response.raw.read())
with open(header_file, 'w') as f:
json.dump(dict(response.raw.headers), f)
# Entry point of the code
+ def _get_cached_file_folder_name(self,folder):
+ cached_file_folder = '%s/%s' % (folder, self.path,)
+ print("Cached file name before escaping : %s" % cached_file_folder)
+ cached_file_folder = cached_file_folder.replace('<','&#60;').replace('>','&#62;').replace('?','&#63;').replace('*','&#42;').replace('\\','&#42;').replace(':','&#58;').replace('|','&#124;')
+ print("Cached file name after escaping (used for cache storage) : %s" % cached_file_folder)
+ return cached_file_folder
+
+ def _get_cached_content_file_name(self,cached_file_folder):
+ return "%s/.file" % (cached_file_folder,)
+
+ def _get_cached_header_file_name(self,cached_file_folder):
+ return "%s/.header" % (cached_file_folder,)
+
+ def _execute_content_generated_cases(self,http_type):
+ print("Testing special cases, cache files will be sent to :" +TMP_ROOT)
+ cached_file_folder = self._get_cached_file_folder_name(TMP_ROOT)
+ cached_file_content = self._get_cached_content_file_name(cached_file_folder)
+ cached_file_header = self._get_cached_header_file_name(cached_file_folder)
+ _file_available = os.path.exists(cached_file_content)
+
+ if self.path.startswith("/dcae-service-types?asdcResourceId=") and http_type == "GET":
+ if not _file_available:
+ print "self.path start with /dcae-service-types?asdcResourceId=, generating response json..."
+ uuidGenerated = str(uuid.uuid4())
+ typeId = "typeId-" + uuidGenerated
+ typeName = "typeName-" + uuidGenerated
+ print "typeId generated: " + typeName + " and typeName: "+ typeId
+ jsonGenerated = "{\"totalCount\":1, \"items\":[{\"typeId\":\"" + typeId + "\", \"typeName\":\"" + typeName +"\"}]}"
+ print "jsonGenerated: " + jsonGenerated
+
+ os.makedirs(cached_file_folder, 0777)
+ with open(cached_file_header, 'w') as f:
+ f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
+ with open(cached_file_content, 'w') as f:
+ f.write(jsonGenerated)
+ return True
+ elif self.path.startswith("/dcae-operationstatus") and http_type == "GET":
+ if not _file_available:
+ print "self.path start with /dcae-operationstatus, generating response json..."
+ jsonGenerated = "{\"operationType\": \"operationType1\", \"status\": \"succeeded\"}"
+ print "jsonGenerated: " + jsonGenerated
+
+ try:
+ os.makedirs(cached_file_folder, 0777)
+ except OSError as e:
+ if e.errno != errno.EEXIST:
+ raise
+ print(cached_file_folder+" already exists")
+
+ with open(cached_file_header, 'w') as f:
+ f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
+ with open(cached_file_content, 'w') as f:
+ f.write(jsonGenerated)
+ return True
+ elif self.path.startswith("/sdc/v1/catalog/services/") and http_type == "POST":
+ if not _file_available:
+ print "self.path start with /sdc/v1/catalog/services/, generating response json..."
+ jsondata = json.loads(self.data_string)
+ jsonGenerated = "{\"artifactName\":\"" + jsondata['artifactName'] + "\",\"artifactType\":\"" + jsondata['artifactType'] + "\",\"artifactURL\":\"" + self.path + "\",\"artifactDescription\":\"" + jsondata['description'] + "\",\"artifactChecksum\":\"ZjJlMjVmMWE2M2M1OTM2MDZlODlmNTVmZmYzNjViYzM=\",\"artifactUUID\":\"" + str(uuid.uuid4()) + "\",\"artifactVersion\":\"1\"}"
+ print "jsonGenerated: " + jsonGenerated
+
+ os.makedirs(cached_file_folder, 0777)
+ with open(cached_file_header, 'w') as f:
+ f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
+ with open(cached_file_content, 'w') as f:
+ f.write(jsonGenerated)
+ return True;
+ elif self.path.startswith("/dcae-deployments/") and (http_type == "PUT" or http_type == "DELETE"):
+ if not _file_available:
+ print "self.path start with /dcae-deployments/, generating response json..."
+ #jsondata = json.loads(self.data_string)
+ jsonGenerated = "{\"links\":{\"status\":\"http:\/\/" + PROXY_ADDRESS + "\/dcae-operationstatus\",\"test2\":\"test2\"}}"
+ print "jsonGenerated: " + jsonGenerated
+
+ os.makedirs(cached_file_folder, 0777)
+ with open(cached_file_header, 'w') as f:
+ f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
+ with open(cached_file_content, 'w') as f:
+ f.write(jsonGenerated)
+ return True
+ elif (self.path.startswith("/pdp/api/") and http_type == "PUT" or http_type == "DELETE") or (self.path.startswith("/pdp/api/policyEngineImport") and http_type == "POST"):
+ print "self.path start with /pdp/api/, copying body to response ..."
+ if not os.path.exists(cached_file_folder):
+ os.makedirs(cached_file_folder, 0777)
+ with open(cached_file_header, 'w+') as f:
+ f.write("{\"Content-Length\": \"" + str(len(self.data_string)) + "\", \"Content-Type\": \""+str(self.headers['Content-Type'])+"\"}")
+ with open(cached_file_content, 'w+') as f:
+ f.write(self.data_string)
+ return True
+ else:
+ return False
+
+
def do_GET(self):
+ cached_file_folder = ""
+ cached_file_content =""
+ cached_file_header=""
print("\n\n\nGot a GET request for %s " % self.path)
self.print_headers()
self.check_credentials()
-
- cached_file = '%s/%s' % (CACHE_ROOT, self.path,)
- print("Cached file name before escaping : %s" % cached_file)
- cached_file = cached_file.replace('<','&#60;').replace('>','&#62;').replace('?','&#63;').replace('*','&#42;').replace('\\','&#42;').replace(':','&#58;').replace('|','&#124;')
- print("Cached file name after escaping (used for cache storage) : %s" % cached_file)
- cached_file_content = "%s/.file" % (cached_file,)
- cached_file_header = "%s/.header" % (cached_file,)
+ # Verify if it's a special case
+ is_special = self._execute_content_generated_cases("GET")
+ if is_special:
+ cached_file_folder = self._get_cached_file_folder_name(TMP_ROOT)
+ cached_file_content = self._get_cached_content_file_name(cached_file_folder)
+ cached_file_header = self._get_cached_header_file_name(cached_file_folder)
+ else:
+ cached_file_folder = self._get_cached_file_folder_name(CACHE_ROOT)
+ cached_file_content = self._get_cached_content_file_name(cached_file_folder)
+ cached_file_header = self._get_cached_header_file_name(cached_file_folder)
_file_available = os.path.exists(cached_file_content)
if not _file_available:
- print("Request for data currently not present in cache: %s" % (cached_file,))
-
- if self.path.startswith("/dcae-service-types?asdcResourceId="):
- print "self.path start with /dcae-service-types?asdcResourceId=, generating response json..."
- uuidGenerated = str(uuid.uuid4())
- typeId = "typeId-" + uuidGenerated
- typeName = "typeName-" + uuidGenerated
- print "typeId generated: " + typeName + " and typeName: "+ typeId
- jsonGenerated = "{\"totalCount\":1, \"items\":[{\"typeId\":\"" + typeId + "\", \"typeName\":\"" + typeName +"\"}]}"
- print "jsonGenerated: " + jsonGenerated
-
- os.makedirs(cached_file, True)
- with open(cached_file_header, 'w') as f:
- f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
- with open(cached_file_content, 'w') as f:
- f.write(jsonGenerated)
- elif self.path.startswith("/dcae-operationstatus"):
- print "self.path start with /dcae-operationstatus, generating response json..."
- jsonGenerated = "{\"operationType\": \"operationType1\", \"status\": \"succeeded\"}"
- print "jsonGenerated: " + jsonGenerated
-
- os.makedirs(cached_file, True)
- with open(cached_file_header, 'w') as f:
- f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
- with open(cached_file_content, 'w') as f:
- f.write(jsonGenerated)
+ print("Request for data currently not present in cache: %s" % (cached_file_folder,))
+
+ if not HOST:
+ self.send_response(404)
+ return "404 Not found"
+
+ url = '%s%s' % (HOST, self.path)
+ response = requests.get(url, auth=AUTH, headers=HEADERS, stream=True)
+
+ if response.status_code == 200:
+ self._write_cache(cached_file_folder, cached_file_header, cached_file_content, response)
else:
- if not HOST:
- self.send_response(404)
- return "404 Not found"
-
- url = '%s%s' % (HOST, self.path)
- response = requests.get(url, auth=AUTH, headers=HEADERS, stream=True)
-
- if response.status_code == 200:
- self._write_cache(cached_file, cached_file_header, cached_file_content, response)
- else:
- print('Error when requesting file :')
- print('Requested url : %s' % (url,))
- print('Status code : %s' % (response.status_code,))
- print('Content : %s' % (response.content,))
- self.send_response(response.status_code)
- return response.content
+ print('Error when requesting file :')
+ print('Requested url : %s' % (url,))
+ print('Status code : %s' % (response.status_code,))
+ print('Content : %s' % (response.content,))
+ self.send_response(response.status_code)
+ return response.content
else:
- print("Request for data currently present in cache: %s" % (cached_file,))
+ print("Request for data currently present in cache: %s" % (cached_file_folder,))
self._send_content(cached_file_header, cached_file_content)
if self.path.startswith("/dcae-service-types?asdcResourceId="):
- print "DCAE case deleting folder created " + cached_file
- shutil.rmtree(cached_file, ignore_errors=False, onerror=None)
+ print "DCAE case deleting folder created " + cached_file_folder
+ shutil.rmtree(cached_file_folder, ignore_errors=False, onerror=None)
else:
- print "NOT in DCAE case deleting folder created " + cached_file
+ print "NOT in DCAE case deleting folder created " + cached_file_folder
def do_POST(self):
+ cached_file_folder = ""
+ cached_file_content =""
+ cached_file_header=""
print("\n\n\nGot a POST for %s" % self.path)
self.check_credentials()
self.data_string = self.rfile.read(int(self.headers['Content-Length']))
print("data-string:\n %s" % self.data_string)
print("self.headers:\n %s" % self.headers)
- cached_file = '%s/%s' % (CACHE_ROOT, self.path,)
- print("Cached file name before escaping : %s" % cached_file)
- cached_file = cached_file.replace('<','&#60;').replace('>','&#62;').replace('?','&#63;').replace('*','&#42;').replace('\\','&#42;').replace(':','&#58;').replace('|','&#124;')
- print("Cached file name after escaping (used for cache storage) : %s" % cached_file)
- cached_file_content = "%s/.file" % (cached_file,)
- cached_file_header = "%s/.header" % (cached_file,)
+ is_special = self._execute_content_generated_cases("POST")
+ if is_special:
+ cached_file_folder = self._get_cached_file_folder_name(TMP_ROOT)
+ cached_file_content = self._get_cached_content_file_name(cached_file_folder)
+ cached_file_header = self._get_cached_header_file_name(cached_file_folder)
+ else:
+ cached_file_folder = self._get_cached_file_folder_name(CACHE_ROOT)
+ cached_file_content = self._get_cached_content_file_name(cached_file_folder)
+ cached_file_header = self._get_cached_header_file_name(cached_file_folder)
_file_available = os.path.exists(cached_file_content)
if not _file_available:
- if self.path.startswith("/sdc/v1/catalog/services/"):
- print "self.path start with /sdc/v1/catalog/services/, generating response json..."
- jsondata = json.loads(self.data_string)
- jsonGenerated = "{\"artifactName\":\"" + jsondata['artifactName'] + "\",\"artifactType\":\"" + jsondata['artifactType'] + "\",\"artifactURL\":\"" + self.path + "\",\"artifactDescription\":\"" + jsondata['description'] + "\",\"artifactChecksum\":\"ZjJlMjVmMWE2M2M1OTM2MDZlODlmNTVmZmYzNjViYzM=\",\"artifactUUID\":\"" + str(uuid.uuid4()) + "\",\"artifactVersion\":\"1\"}"
- print "jsonGenerated: " + jsonGenerated
-
- os.makedirs(cached_file, True)
- with open(cached_file_header, 'w') as f:
- f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
- with open(cached_file_content, 'w') as f:
- f.write(jsonGenerated)
+
+ if not HOST:
+ self.send_response(404)
+ return "404 Not found"
+
+ print("Request for data currently not present in cache: %s" % (cached_file_folder,))
+
+ url = '%s%s' % (HOST, self.path)
+ print("url: %s" % (url,))
+ response = requests.post(url, data=self.data_string, headers=self.headers, stream=True)
+
+ if response.status_code == 200:
+ self._write_cache(cached_file_folder, cached_file_header, cached_file_content, response)
else:
- if not HOST:
- self.send_response(404)
- return "404 Not found"
-
- print("Request for data currently not present in cache: %s" % (cached_file,))
-
- url = '%s%s' % (HOST, self.path)
- print("url: %s" % (url,))
- response = requests.post(url, data=self.data_string, headers=self.headers, stream=True)
-
- if response.status_code == 200:
- self._write_cache(cached_file, cached_file_header, cached_file_content, response)
- else:
- print('Error when requesting file :')
- print('Requested url : %s' % (url,))
- print('Status code : %s' % (response.status_code,))
- print('Content : %s' % (response.content,))
- self.send_response(response.status_code)
- return response.content
+ print('Error when requesting file :')
+ print('Requested url : %s' % (url,))
+ print('Status code : %s' % (response.status_code,))
+ print('Content : %s' % (response.content,))
+ self.send_response(response.status_code)
+ return response.content
else:
- print("Request for data present in cache: %s" % (cached_file,))
+ print("Request for data present in cache: %s" % (cached_file_folder,))
self._send_content(cached_file_header, cached_file_content)
def do_PUT(self):
+ cached_file_folder = ""
+ cached_file_content =""
+ cached_file_header=""
print("\n\n\nGot a PUT for %s " % self.path)
self.check_credentials()
self.data_string = self.rfile.read(int(self.headers['Content-Length']))
print("data-string:\n %s" % self.data_string)
print("self.headers:\n %s" % self.headers)
- cached_file = '%s/%s' % (CACHE_ROOT, self.path,)
- print("Cached file name before escaping : %s" % cached_file)
- cached_file = cached_file.replace('<','&#60;').replace('>','&#62;').replace('?','&#63;').replace('*','&#42;').replace('\\','&#42;').replace(':','&#58;').replace('|','&#124;')
- print("Cached file name after escaping (used for cache storage) : %s" % cached_file)
- cached_file_content = "%s/.file" % (cached_file,)
- cached_file_header = "%s/.header" % (cached_file,)
+ is_special = self._execute_content_generated_cases("PUT")
+ if is_special:
+ cached_file_folder = self._get_cached_file_folder_name(TMP_ROOT)
+ cached_file_content = self._get_cached_content_file_name(cached_file_folder)
+ cached_file_header = self._get_cached_header_file_name(cached_file_folder)
+ else:
+ cached_file_folder = self._get_cached_file_folder_name(CACHE_ROOT)
+ cached_file_content = self._get_cached_content_file_name(cached_file_folder)
+ cached_file_header = self._get_cached_header_file_name(cached_file_folder)
_file_available = os.path.exists(cached_file_content)
if not _file_available:
- if self.path.startswith("/dcae-deployments/"):
- print "self.path start with /dcae-deployments/, generating response json..."
- #jsondata = json.loads(self.data_string)
- jsonGenerated = "{\"links\":{\"status\":\"http:\/\/" + PROXY_ADDRESS + "\/dcae-operationstatus\",\"test2\":\"test2\"}}"
- print "jsonGenerated: " + jsonGenerated
-
- os.makedirs(cached_file, True)
- with open(cached_file_header, 'w') as f:
- f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
- with open(cached_file_content, 'w') as f:
- f.write(jsonGenerated)
+ if not HOST:
+ self.send_response(404)
+ return "404 Not found"
+
+ print("Request for data currently not present in cache: %s" % (cached_file_folder,))
+
+ url = '%s%s' % (HOST, self.path)
+ print("url: %s" % (url,))
+ response = requests.put(url, data=self.data_string, headers=self.headers, stream=True)
+
+ if response.status_code == 200:
+ self._write_cache(cached_file_folder, cached_file_header, cached_file_content, response)
else:
- if not HOST:
- self.send_response(404)
- return "404 Not found"
-
- print("Request for data currently not present in cache: %s" % (cached_file,))
-
- url = '%s%s' % (HOST, self.path)
- print("url: %s" % (url,))
- response = requests.put(url, data=self.data_string, headers=self.headers, stream=True)
-
- if response.status_code == 200:
- self._write_cache(cached_file, cached_file_header, cached_file_content, response)
- else:
- print('Error when requesting file :')
- print('Requested url : %s' % (url,))
- print('Status code : %s' % (response.status_code,))
- print('Content : %s' % (response.content,))
- self.send_response(response.status_code)
- return response.content
+ print('Error when requesting file :')
+ print('Requested url : %s' % (url,))
+ print('Status code : %s' % (response.status_code,))
+ print('Content : %s' % (response.content,))
+ self.send_response(response.status_code)
+ return response.content
else:
- print("Request for data present in cache: %s" % (cached_file,))
+ print("Request for data present in cache: %s" % (cached_file_folder,))
self._send_content(cached_file_header, cached_file_content)
def do_DELETE(self):
+ cached_file_folder = ""
+ cached_file_content =""
+ cached_file_header=""
print("\n\n\nGot a DELETE for %s " % self.path)
self.check_credentials()
+ self.data_string = self.rfile.read(int(self.headers['Content-Length']))
print("self.headers:\n %s" % self.headers)
- cached_file = '%s/%s' % (CACHE_ROOT, self.path,)
- print("Cached file name before escaping : %s" % cached_file)
- cached_file = cached_file.replace('<','&#60;').replace('>','&#62;').replace('?','&#63;').replace('*','&#42;').replace('\\','&#42;').replace(':','&#58;').replace('|','&#124;')
- print("Cached file name after escaping (used for cache storage) : %s" % cached_file)
- cached_file_content = "%s/.file" % (cached_file,)
- cached_file_header = "%s/.header" % (cached_file,)
+ is_special = self._execute_content_generated_cases("DELETE")
+ if is_special:
+ cached_file_folder = self._get_cached_file_folder_name(TMP_ROOT)
+ cached_file_content = self._get_cached_content_file_name(cached_file_folder)
+ cached_file_header = self._get_cached_header_file_name(cached_file_folder)
+ else:
+ cached_file_folder = self._get_cached_file_folder_name(CACHE_ROOT)
+ cached_file_content = self._get_cached_content_file_name(cached_file_folder)
+ cached_file_header = self._get_cached_header_file_name(cached_file_folder)
_file_available = os.path.exists(cached_file_content)
if not _file_available:
- if self.path.startswith("/dcae-deployments/"):
- print "self.path start with /dcae-deployments/, generating response json..."
- #jsondata = json.loads(self.data_string)
- jsonGenerated = "{\"links\":{\"status\":\"http:\/\/" + PROXY_ADDRESS + "\/dcae-operationstatus\",\"test2\":\"test2\"}}"
- print "jsonGenerated: " + jsonGenerated
-
- os.makedirs(cached_file, True)
- with open(cached_file_header, 'w') as f:
- f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
- with open(cached_file_content, 'w') as f:
- f.write(jsonGenerated)
+ if not HOST:
+ self.send_response(404)
+ return "404 Not found"
+
+ print("Request for data currently not present in cache: %s" % (cached_file_folder,))
+
+ url = '%s%s' % (HOST, self.path)
+ print("url: %s" % (url,))
+ response = requests.put(url, data=self.data_string, headers=self.headers, stream=True)
+
+ if response.status_code == 200:
+ self._write_cache(cached_file_folder, cached_file_header, cached_file_content, response)
else:
- if not HOST:
- self.send_response(404)
- return "404 Not found"
-
- print("Request for data currently not present in cache: %s" % (cached_file,))
-
- url = '%s%s' % (HOST, self.path)
- print("url: %s" % (url,))
- response = requests.put(url, data=self.data_string, headers=self.headers, stream=True)
-
- if response.status_code == 200:
- self._write_cache(cached_file, cached_file_header, cached_file_content, response)
- else:
- print('Error when requesting file :')
- print('Requested url : %s' % (url,))
- print('Status code : %s' % (response.status_code,))
- print('Content : %s' % (response.content,))
- self.send_response(response.status_code)
- return response.content
+ print('Error when requesting file :')
+ print('Requested url : %s' % (url,))
+ print('Status code : %s' % (response.status_code,))
+ print('Content : %s' % (response.content,))
+ self.send_response(response.status_code)
+ return response.content
else:
- print("Request for data present in cache: %s" % (cached_file,))
+ print("Request for data present in cache: %s" % (cached_file_folder,))
self._send_content(cached_file_header, cached_file_content)
@@ -322,6 +382,7 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
# Main code that start the HTTP server
httpd = SocketServer.ForkingTCPServer(('', PORT), Proxy)
httpd.allow_reuse_address = True
-print "Listening on port "+ str(PORT) + " and caching in " + CACHE_ROOT + "(Press Ctrl+C to stop HTTPD Caching script)"
+print "Listening on port "+ str(PORT) + "(Press Ctrl+C/Ctrl+Z to stop HTTPD Caching script)"
+print "Caching folder " + CACHE_ROOT + ", Tmp folder for generated files " + TMP_ROOT
signal.signal(signal.SIGINT, signal_handler)
httpd.serve_forever() \ No newline at end of file
diff --git a/src/test/resources/https/https-test.properties b/src/test/resources/https/https-test.properties
index e15ea6ed..7614e177 100644
--- a/src/test/resources/https/https-test.properties
+++ b/src/test/resources/https/https-test.properties
@@ -25,7 +25,7 @@
### (See below for the parameter 'server.http.port' if you want to have both enabled)
### To have only HTTP, keep the lines server.ssl.* commented
### To have only HTTPS enabled, uncomment the server.ssl.* lines and specify a right keystore location
-server.port=10443
+server.port=${clamp.it.tests.https}
### Settings for HTTPS (this automatically enables the HTTPS on the port 'server.port')
server.ssl.key-store=classpath:https/keystore-test.jks
server.ssl.key-store-password=testpass
@@ -34,7 +34,7 @@ server.ssl.key-password=testpass
### In order to be user friendly when HTTPS is enabled,
### you can add another HTTP port that will be automatically redirected to HTTPS
### by enabling this parameter (server.http.port) and set it to another port (80 or 8080, 8090, etc ...)
-server.http-to-https-redirection.port=10080
+server.http-to-https-redirection.port=${clamp.it.tests.http-redirected}
### HTTP Example:
###--------------
diff --git a/src/test/resources/tosca/tca-policy-test.yaml b/src/test/resources/tosca/tca-policy-test.yaml
new file mode 100644
index 00000000..3c5afb01
--- /dev/null
+++ b/src/test/resources/tosca/tca-policy-test.yaml
@@ -0,0 +1,80 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+node_types:
+ policy.nodes.cdap.tca.hi.lo.app:
+ derived_from: policy.nodes.Root
+ properties:
+ domain:
+ type: string
+ description: Domain
+ constraints:
+ - equal: measurementsForVfScaling
+ functionalRole:
+ type: string
+ description: Function of the event source e.g., vnf1, vnf2, vnf3
+ thresholds:
+ type: list
+ description: Thresholds
+ entry_schema:
+ type: policy.data.thresholds
+data_types:
+ policy.data.thresholds:
+ properties:
+ closedLoopControlName:
+ type: string
+ description: A UNIQUE string identifying the Closed Loop ID this event is for.
+ direction:
+ type: string
+ constraints:
+ - valid_values: [ LESS, LESS_OR_EQUAL, GREATER, GREATER_OR_EQUAL]
+ fieldPath:
+ description: Field Path
+ type: string
+ severity:
+ type: string
+ description: event severity or priority
+ constraints:
+ - valid_values: [CRITICAL, MAJOR, MINOR, WARNING, NORMAL]
+ thresholdValue:
+ type: integer
+ description: ThresholdValue
+ default: 0
+ constraints:
+ - in_range: [ 0, 65535 ]
+ version:
+ type: string
+ description: Version for the closed loop message
+ constraints:
+ - min_length: 1
+ dummySignatures:
+ type: list
+ description: dummy Signatures
+ required: true
+ entry_schema:
+ type: policy.data.dummySignatureTraversal
+ policy.data.dummySignatureTraversal:
+ derived_from: tosca.nodes.Root
+ properties:
+ signature:
+ type: policy.data.DUMMY_Signature_FM
+ required: true
+ traversal:
+ type: policy.data.traverse
+ required: true
+ policy.data.traverse:
+ derived_from: tosca.nodes.Root
+ properties:
+ traversal:
+ type: string
+ description: Dummy Traverse
+ required: true
+ constraints:
+ - valid_values: [ ONE, TWO, THREE ]
+ policy.data.DUMMY_Signature_FM:
+ derived_from: tosca.nodes.Root
+ properties:
+ filter_clause:
+ type: string
+ description: Filter Clause
+ required: true
+ constraints:
+ - valid_values: [ OR, AND, NOT ]
diff --git a/src/test/resources/tosca/tosca_example.yaml b/src/test/resources/tosca/tosca_example.yaml
new file mode 100644
index 00000000..3c5afb01
--- /dev/null
+++ b/src/test/resources/tosca/tosca_example.yaml
@@ -0,0 +1,80 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+node_types:
+ policy.nodes.cdap.tca.hi.lo.app:
+ derived_from: policy.nodes.Root
+ properties:
+ domain:
+ type: string
+ description: Domain
+ constraints:
+ - equal: measurementsForVfScaling
+ functionalRole:
+ type: string
+ description: Function of the event source e.g., vnf1, vnf2, vnf3
+ thresholds:
+ type: list
+ description: Thresholds
+ entry_schema:
+ type: policy.data.thresholds
+data_types:
+ policy.data.thresholds:
+ properties:
+ closedLoopControlName:
+ type: string
+ description: A UNIQUE string identifying the Closed Loop ID this event is for.
+ direction:
+ type: string
+ constraints:
+ - valid_values: [ LESS, LESS_OR_EQUAL, GREATER, GREATER_OR_EQUAL]
+ fieldPath:
+ description: Field Path
+ type: string
+ severity:
+ type: string
+ description: event severity or priority
+ constraints:
+ - valid_values: [CRITICAL, MAJOR, MINOR, WARNING, NORMAL]
+ thresholdValue:
+ type: integer
+ description: ThresholdValue
+ default: 0
+ constraints:
+ - in_range: [ 0, 65535 ]
+ version:
+ type: string
+ description: Version for the closed loop message
+ constraints:
+ - min_length: 1
+ dummySignatures:
+ type: list
+ description: dummy Signatures
+ required: true
+ entry_schema:
+ type: policy.data.dummySignatureTraversal
+ policy.data.dummySignatureTraversal:
+ derived_from: tosca.nodes.Root
+ properties:
+ signature:
+ type: policy.data.DUMMY_Signature_FM
+ required: true
+ traversal:
+ type: policy.data.traverse
+ required: true
+ policy.data.traverse:
+ derived_from: tosca.nodes.Root
+ properties:
+ traversal:
+ type: string
+ description: Dummy Traverse
+ required: true
+ constraints:
+ - valid_values: [ ONE, TWO, THREE ]
+ policy.data.DUMMY_Signature_FM:
+ derived_from: tosca.nodes.Root
+ properties:
+ filter_clause:
+ type: string
+ description: Filter Clause
+ required: true
+ constraints:
+ - valid_values: [ OR, AND, NOT ]