diff options
8 files changed, 280 insertions, 5 deletions
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vFW_vNF_Artifact.vtl b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vFW_vNF_Artifact.vtl index 0faf09ca..f7947ef8 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vFW_vNF_Artifact.vtl +++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vFW_vNF_Artifact.vtl @@ -30,7 +30,7 @@ }, { "param-name": "onap_private_subnet_id", - "param-value": "${onap_private_net_id}_sub" + "param-value": "${onap_private_subnet_id}" } ], "capability-data": [ diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRest.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRest.java index 988cad06..0f485a08 100644 --- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRest.java +++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRest.java @@ -44,18 +44,18 @@ public class ModelTypeRest { }
@GetMapping(path = "/{name}", produces = MediaType.APPLICATION_JSON_VALUE)
- public ModelType getModelTypeByName(@PathVariable(value = "name") String name) throws BluePrintException {
+ public ModelType getModelTypeByName(@PathVariable(value = "name") String name) {
return modelTypeService.getModelTypeByName(name);
}
@GetMapping(path = "/search/{tags}", produces = MediaType.APPLICATION_JSON_VALUE)
- public List<ModelType> searchModelTypes(@PathVariable(value = "tags") String tags) throws BluePrintException {
+ public List<ModelType> searchModelTypes(@PathVariable(value = "tags") String tags) {
return modelTypeService.searchModelTypes(tags);
}
@GetMapping(path = "/by-definition/{definitionType}", produces = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody
- List<ModelType> getModelTypeByDefinitionType(@PathVariable(value = "definitionType") String definitionType) throws BluePrintException {
+ List<ModelType> getModelTypeByDefinitionType(@PathVariable(value = "definitionType") String definitionType) {
return modelTypeService.getModelTypeByDefinitionType(definitionType);
}
@@ -66,7 +66,7 @@ public class ModelTypeRest { }
@DeleteMapping(path = "/{name}")
- public void deleteModelTypeByName(@PathVariable(value = "name") String name) throws BluePrintException {
+ public void deleteModelTypeByName(@PathVariable(value = "name") String name) {
modelTypeService.deleteByModelName(name);
}
}
diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlangtagapi/core/model/AssignVlanTagResponseTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlangtagapi/core/model/AssignVlanTagResponseTest.java index bbcebbad..30f817ee 100644 --- a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlangtagapi/core/model/AssignVlanTagResponseTest.java +++ b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlangtagapi/core/model/AssignVlanTagResponseTest.java @@ -62,5 +62,12 @@ public class AssignVlanTagResponseTest { assertTrue((Integer)assignVlanTagResponse.hashCode() instanceof Integer); } + @Test + public void testErrorMessage() + { + assignVlanTagResponse.errorMessage("test error message"); + assertEquals("test error message",assignVlanTagResponse.getErrorMessage()); + } + } diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlangtagapi/core/model/UnassignVlanTagRequestInputTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlangtagapi/core/model/UnassignVlanTagRequestInputTest.java index 6081d0b4..99498d6d 100644 --- a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlangtagapi/core/model/UnassignVlanTagRequestInputTest.java +++ b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlangtagapi/core/model/UnassignVlanTagRequestInputTest.java @@ -64,4 +64,12 @@ public class UnassignVlanTagRequestInputTest { } + @Test + public void testVlanTagKey() + { + unassignVlanTagRequestInput.vlanTagKey("testVlanTagKey"); + assertEquals("testVlanTagKey",unassignVlanTagRequestInput.getVlanTagKey()); + + } + } diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ElementsTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ElementsTest.java new file mode 100644 index 00000000..6d534ff0 --- /dev/null +++ b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ElementsTest.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright © 2018 IBM. + * + * 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. + ****************************************************************************** +*/ + +package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Before; +import org.junit.Test; + +public class ElementsTest { + private Elements elements; + + @Before + public void setUp() { + elements = new Elements(); + } + + @Test + public void testGetSetRecycleVlantagRange() { + elements.setRecycleVlantagRange("recycleVlantagRange"); + assertEquals("recycleVlantagRange", elements.getRecycleVlantagRange()); + } + + @Test + public void testGetSetOverwrite() { + elements.setOverwrite("overwrite"); + assertEquals("overwrite", elements.getOverwrite()); + } + + @Test + public void testGetSetElementVlanRole() { + elements.setElementVlanRole("elementVlanRole"); + assertEquals("elementVlanRole", elements.getElementVlanRole()); + } + + @Test + public void testToString() { + assertTrue(elements.toString() instanceof String); + } +} diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfigTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfigTest.java new file mode 100644 index 00000000..cf928ce0 --- /dev/null +++ b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfigTest.java @@ -0,0 +1,113 @@ +/******************************************************************************* + * Copyright © 2018 IBM. + * + * 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. + ****************************************************************************** +*/ + +package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Before; +import org.junit.Test; + +public class PolicyConfigTest { + + private PolicyConfig policyConfig; + + @Before + public void setUp() { + policyConfig = new PolicyConfig(); + } + + @Test + public void testGetSetConfigName() { + policyConfig.setConfigName("configName"); + assertEquals("configName", policyConfig.getConfigName()); + } + + @Test + public void testGetSetRiskLevel() { + policyConfig.setRiskLevel("RiskLevel"); + assertEquals("RiskLevel", policyConfig.getRiskLevel()); + } + + @Test + public void testGetSetPolicyName() { + policyConfig.setPolicyName("PolicyName"); + assertEquals("PolicyName", policyConfig.getPolicyName()); + } + + @Test + public void testGetSetPolicyScope() { + policyConfig.setPolicyScope("PolicyScope"); + assertEquals("PolicyScope", policyConfig.getPolicyScope()); + } + + @Test + public void testGetSetGuard() { + policyConfig.setGuard("Guard"); + assertEquals("Guard", policyConfig.getGuard()); + } + + @Test + public void testGetSetDescription() { + policyConfig.setDescription("Description"); + assertEquals("Description", policyConfig.getDescription()); + } + + @Test + public void testGetSetPriority() { + policyConfig.setPriority("Priority"); + assertEquals("Priority", policyConfig.getPriority()); + } + + @Test + public void testGetSetUuid() { + policyConfig.setUuid("Uuid"); + assertEquals("Uuid", policyConfig.getUuid()); + } + + @Test + public void testGetSetVersion() { + policyConfig.setVersion("Version"); + assertEquals("Version", policyConfig.getVersion()); + } + + @Test + public void testGetSetService() { + policyConfig.setService("Service"); + assertEquals("Service", policyConfig.getService()); + } + + @Test + public void testGetSetLocation() { + policyConfig.setLocation("Location"); + assertEquals("Location", policyConfig.getLocation()); + } + + @Test + public void testGetSetTemplateVersion() { + policyConfig.setTemplateVersion("TemplateVersion"); + assertEquals("TemplateVersion", policyConfig.getTemplateVersion()); + } + + @Test + public void testToString() + { + assertTrue(policyConfig.toString() instanceof String); + } + +}
\ No newline at end of file diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContentTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContentTest.java new file mode 100644 index 00000000..a0207238 --- /dev/null +++ b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContentTest.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright © 2018 IBM. + * + * 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. + ****************************************************************************** +*/ + +package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Before; +import org.junit.Test; + +public class PolicyContentTest { + + public PolicyContent policyContent; + + @Before + public void setUp() { + policyContent = new PolicyContent(); + } + + @Test + public void testGetSetPolicyInstanceName() { + policyContent.setPolicyInstanceName("policyInstanceName"); + assertEquals("policyInstanceName", policyContent.getPolicyInstanceName()); + } + + @Test + public void testToString() + { + assertTrue(policyContent.toString() instanceof String); + } + +} diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObjectTest.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObjectTest.java new file mode 100644 index 00000000..1bc869eb --- /dev/null +++ b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObjectTest.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright © 2018 IBM. + * + * 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. + ****************************************************************************** +*/ + +package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Before; +import org.junit.Test; + +public class RequestObjectTest { + public RequestObject requestObject; + + @Before + public void setUp() { + requestObject = new RequestObject(); + } + + @Test + public void testGetSetPolicyName() { + requestObject.setPolicyName("PolicyName"); + assertEquals("PolicyName", requestObject.getPolicyName()); + } + + @Test + public void testToString() { + assertTrue(requestObject.toString() instanceof String); + } +} |