diff options
Diffstat (limited to 'src')
15 files changed, 107 insertions, 72 deletions
diff --git a/src/main/java/org/onap/aai/auth/AAIAuthException.java b/src/main/java/org/onap/aai/auth/AAIAuthException.java index a29ee98..35adb5a 100644 --- a/src/main/java/org/onap/aai/auth/AAIAuthException.java +++ b/src/main/java/org/onap/aai/auth/AAIAuthException.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright © 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,10 +18,11 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.auth; public class AAIAuthException extends Exception { - /** */ + private static final long serialVersionUID = 1L; public AAIAuthException(String string) { diff --git a/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java index ee5fb26..ddbc002 100644 --- a/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java +++ b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright © 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.auth; import com.fasterxml.jackson.core.JsonProcessingException; @@ -60,11 +61,7 @@ public class AAIMicroServiceAuthCore { private static String policyAuthFileName; public enum HTTP_METHODS { - GET, - PUT, - DELETE, - HEAD, - POST + GET, PUT, DELETE, HEAD, POST } // Don't instantiate diff --git a/src/main/java/org/onap/aai/auth/FileWatcher.java b/src/main/java/org/onap/aai/auth/FileWatcher.java index d974e66..9c4e04e 100644 --- a/src/main/java/org/onap/aai/auth/FileWatcher.java +++ b/src/main/java/org/onap/aai/auth/FileWatcher.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright © 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.auth; import java.io.File; diff --git a/src/main/java/org/onap/aai/babel/BabelApplication.java b/src/main/java/org/onap/aai/babel/BabelApplication.java index 0b0285b..267642e 100644 --- a/src/main/java/org/onap/aai/babel/BabelApplication.java +++ b/src/main/java/org/onap/aai/babel/BabelApplication.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright © 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.babel; import java.util.HashMap; @@ -44,7 +45,8 @@ public class BabelApplication extends SpringBootServletInitializer { throw new IllegalArgumentException("Env property KEY_STORE_PASSWORD not set"); } HashMap<String, Object> props = new HashMap<>(); - String decryptedValue = keyStorePassword.startsWith(OBFS_PATTERN)? Password.deobfuscate(keyStorePassword) : keyStorePassword; + String decryptedValue = + keyStorePassword.startsWith(OBFS_PATTERN) ? Password.deobfuscate(keyStorePassword) : keyStorePassword; props.put("server.ssl.key-store-password", decryptedValue); String requireClientAuth = System.getenv("REQUIRE_CLIENT_AUTH"); diff --git a/src/main/java/org/onap/aai/babel/csar/CsarToXmlConverter.java b/src/main/java/org/onap/aai/babel/csar/CsarToXmlConverter.java index 98db8ae..9e1ff6e 100644 --- a/src/main/java/org/onap/aai/babel/csar/CsarToXmlConverter.java +++ b/src/main/java/org/onap/aai/babel/csar/CsarToXmlConverter.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright © 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.babel.csar; import java.util.List; @@ -53,7 +54,7 @@ public class CsarToXmlConverter { * the name of the archive file * @param version * the version of the archive file - * @return List<org.onap.sdc.generator.data.Artifact> a list of generated XML artifacts + * @return a list of generated XML artifacts * @throws CsarConverterException * if there is an error either extracting the YAML files or generating XML artifacts */ diff --git a/src/main/java/org/onap/aai/babel/parser/ArtifactGeneratorToscaParser.java b/src/main/java/org/onap/aai/babel/parser/ArtifactGeneratorToscaParser.java index c79c2ef..ce1c352 100644 --- a/src/main/java/org/onap/aai/babel/parser/ArtifactGeneratorToscaParser.java +++ b/src/main/java/org/onap/aai/babel/parser/ArtifactGeneratorToscaParser.java @@ -112,8 +112,9 @@ public class ArtifactGeneratorToscaParser { /** * Initializes the Widget to UUID mapping configuration. - * + * * @throws IOException + * if an error occurs reading the configuration properties */ public static void initWidgetConfiguration() throws IOException { log.debug("Getting Widget Configuration"); @@ -172,6 +173,7 @@ public class ArtifactGeneratorToscaParser { * @param serviceNodeTemplate * @return resources for which XML Models should be generated * @throws XmlArtifactGenerationException + * if there is no configuration defined for a member Widget of an instance group */ public List<Resource> processInstanceGroups(Model resourceModel, NodeTemplate serviceNodeTemplate) throws XmlArtifactGenerationException { @@ -212,9 +214,13 @@ public class ArtifactGeneratorToscaParser { } /** + * Add the resource/widget to the specified model. + * * @param model * @param relation + * resource or widget model to add * @throws XmlArtifactGenerationException + * if the relation is a widget and there is no configuration defined for the relation's widget type */ public void addRelatedModel(final Model model, final Resource relation) throws XmlArtifactGenerationException { if (relation.isResource()) { @@ -299,6 +305,7 @@ public class ArtifactGeneratorToscaParser { * the properties of the Group * @return the Instance Group and Member resource models * @throws XmlArtifactGenerationException + * if there is no configuration defined for one of the member Widgets */ private List<Resource> processInstanceGroup(Model resourceModel, ArrayList<NodeTemplate> memberNodes, Map<String, String> metaProperties, Map<String, Property> properties) @@ -317,8 +324,10 @@ public class ArtifactGeneratorToscaParser { /** * @param memberNodes * @param groupModel - * @return + * @return a list of Resources * @throws XmlArtifactGenerationException + * if a member node template is a widget and there is no configuration defined for that relation's + * widget type */ private List<Resource> generateResourcesAndWidgets(final ArrayList<NodeTemplate> memberNodes, final Resource groupModel) throws XmlArtifactGenerationException { diff --git a/src/main/java/org/onap/aai/babel/service/GenerateArtifactsServiceImpl.java b/src/main/java/org/onap/aai/babel/service/GenerateArtifactsServiceImpl.java index 72d8ae2..8d89db9 100644 --- a/src/main/java/org/onap/aai/babel/service/GenerateArtifactsServiceImpl.java +++ b/src/main/java/org/onap/aai/babel/service/GenerateArtifactsServiceImpl.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright © 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.babel.service; import com.google.gson.Gson; @@ -59,7 +60,9 @@ public class GenerateArtifactsServiceImpl implements GenerateArtifactsService { private AAIMicroServiceAuth aaiMicroServiceAuth; - /** @param authorization */ + /** + * @param authorization + */ @Inject public GenerateArtifactsServiceImpl(final AAIMicroServiceAuth authorization) { this.aaiMicroServiceAuth = authorization; diff --git a/src/main/java/org/onap/aai/babel/xml/generator/api/AaiArtifactGenerator.java b/src/main/java/org/onap/aai/babel/xml/generator/api/AaiArtifactGenerator.java index 4415c47..75c5073 100644 --- a/src/main/java/org/onap/aai/babel/xml/generator/api/AaiArtifactGenerator.java +++ b/src/main/java/org/onap/aai/babel/xml/generator/api/AaiArtifactGenerator.java @@ -84,7 +84,7 @@ public class AaiArtifactGenerator implements ArtifactGenerator { ArtifactGeneratorToscaParser.initWidgetConfiguration(); ArtifactGeneratorToscaParser.initToscaMappingsConfiguration(configLocation); } catch (IOException e) { - log.error(ApplicationMsgs.LOAD_PROPERTIES, e); + log.error(ApplicationMsgs.LOAD_PROPERTIES, e, configLocation); return createErrorData(e); } diff --git a/src/main/java/org/onap/aai/babel/xml/generator/model/Model.java b/src/main/java/org/onap/aai/babel/xml/generator/model/Model.java index 3c407bd..3f081df 100644 --- a/src/main/java/org/onap/aai/babel/xml/generator/model/Model.java +++ b/src/main/java/org/onap/aai/babel/xml/generator/model/Model.java @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.babel.xml.generator.model; import java.util.Collections; @@ -110,10 +111,10 @@ public abstract class Model { protected Set<Widget> widgets = new HashSet<>(); /** - * Gets the object (model) corresponding to the supplied TOSCA type. + * Gets the Resource Model corresponding to the supplied TOSCA type. * * @param toscaType - * the tosca type + * the tosca type * @return the model for the type, or null */ public static Resource getModelFor(String toscaType) { @@ -142,9 +143,9 @@ public abstract class Model { * information. * * @param toscaType - * the TOSCA type + * the TOSCA type * @param metaDataType - * the type from the TOSCA metadata + * the type from the TOSCA metadata * @return the model for the type, or null */ public static Resource getModelFor(String toscaType, String metaDataType) { @@ -219,7 +220,7 @@ public abstract class Model { * Gets widget version id. * * @return the widget version id - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException */ public String getWidgetId() throws XmlArtifactGenerationException { return Widget.getWidget(getWidgetType()).getId(); @@ -229,17 +230,17 @@ public abstract class Model { * Gets invariant id. * * @return the invariant id - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException */ public String getWidgetInvariantId() throws XmlArtifactGenerationException { return Widget.getWidget(getWidgetType()).getWidgetId(); } - + /** * Populate model identification information. * * @param modelIdentInfo - * the model ident info + * the model ident info */ public void populateModelIdentificationInformation(Map<String, String> modelIdentInfo) { Iterator<String> iter = modelIdentInfo.keySet().iterator(); diff --git a/src/main/java/org/onap/aai/babel/xml/generator/model/Service.java b/src/main/java/org/onap/aai/babel/xml/generator/model/Service.java index fe8ba04..8a9e428 100644 --- a/src/main/java/org/onap/aai/babel/xml/generator/model/Service.java +++ b/src/main/java/org/onap/aai/babel/xml/generator/model/Service.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright © 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.babel.xml.generator.model; import java.util.Collections; diff --git a/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java b/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java index e66b06c..67fac05 100644 --- a/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java +++ b/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java @@ -57,7 +57,7 @@ public class Widget extends Model { * Copy Constructor * * @param baseWidget - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException */ public Widget(Widget baseWidget) throws XmlArtifactGenerationException { this(baseWidget.getWidgetType(), baseWidget.getName(), baseWidget.getDeleteFlag()); @@ -75,7 +75,8 @@ public class Widget extends Model { * @param type * the type * @return a new widget of the specified type - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException + * if there is no configuration defined for the specified type */ public static Widget getWidget(Type type) throws XmlArtifactGenerationException { Widget widget = WidgetConfigurationUtil.createWidgetFromType(type); diff --git a/src/main/resources/babel-logging-resources.properties b/src/main/resources/babel-logging-resources.properties index 841bdaf..d749cd0 100644 --- a/src/main/resources/babel-logging-resources.properties +++ b/src/main/resources/babel-logging-resources.properties @@ -1,8 +1,8 @@ # ============LICENSE_START======================================================= # org.onap.aai # ================================================================================ -# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. -# Copyright © 2017-2018 European Software Marketing Ltd. +# Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2019 European Software Marketing Ltd. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,27 +17,23 @@ # limitations under the License. # ============LICENSE_END========================================================= -#Resource key=Error Code|Message text|Resolution text |Description text -####### -#Newlines can be utilized to add some clarity ensuring continuing line -#has at least one leading space -#ResourceKey=\ +# Resource key=Error Code|Message text|Resolution text |Description text +# +# For example: +# ResourceKey=\ # ERR0000E\ # Sample error msg txt\ # Sample resolution msg\ # Sample description txt # -###### -#Error code classification category -#000 Info/Debug -#100 Permission errors -#200 Availability errors/Timeouts -#300 Data errors -#400 Schema Interface type/validation errors -#500 Business process errors -#900 Unknown errors -# -######################################################################## +# Error code classification category +# 000 Info/Debug +# 100 Permission errors +# 200 Availability errors/Timeouts +# 300 Data errors +# 400 Schema Interface type/validation errors +# 500 Business process errors +# 900 Unknown errors DISTRIBUTION_EVENT=\ BABEL0001I|\ @@ -92,6 +88,5 @@ TEMP_FILE_ERROR=\ LOAD_PROPERTIES=\ BABEL0013E|\ - Error loading properties: {0}|Correct the file contents|\ - -
\ No newline at end of file + Error loading properties: {0}|\ + Correct the file contents|\ diff --git a/src/test/java/org/onap/aai/babel/parser/TestArtifactGeneratorToscaParser.java b/src/test/java/org/onap/aai/babel/parser/TestArtifactGeneratorToscaParser.java index 4451a28..2de10b9 100644 --- a/src/test/java/org/onap/aai/babel/parser/TestArtifactGeneratorToscaParser.java +++ b/src/test/java/org/onap/aai/babel/parser/TestArtifactGeneratorToscaParser.java @@ -57,6 +57,7 @@ public class TestArtifactGeneratorToscaParser { * Initialize the Generator with an invalid artifact generator properties file path. * * @throws IOException + * if an error occurs reading the configuration properties */ @Test(expected = IllegalArgumentException.class) public void testMissingPropertiesFile() throws IOException { @@ -68,6 +69,7 @@ public class TestArtifactGeneratorToscaParser { * Initialize the Generator with an invalid mappings file path. * * @throws IOException + * if the file content could not be read successfully */ @Test(expected = IllegalArgumentException.class) public void testMissingMappingsFile() throws IOException { @@ -78,6 +80,7 @@ public class TestArtifactGeneratorToscaParser { * Initialize the Generator with no Widget Mappings content. * * @throws IOException + * if the file content could not be read successfully */ @Test(expected = IOException.class) public void testMissingMappingsContent() throws IOException { @@ -89,6 +92,7 @@ public class TestArtifactGeneratorToscaParser { * Initialize the Generator with invalid Widget Mappings content. * * @throws IOException + * if the file content could not be read successfully */ @Test(expected = IOException.class) public void testInvalidMappingsContent() throws IOException { @@ -118,7 +122,7 @@ public class TestArtifactGeneratorToscaParser { } /** - * Initialise the Artifact Generator Widget Mapping config with incomplete data. + * Initialise the Artifact Generator Widget Mapping config with incomplete data (no type). */ @Test(expected = IllegalArgumentException.class) public void testToscaMappingWithoutType() { @@ -128,7 +132,7 @@ public class TestArtifactGeneratorToscaParser { } /** - * Initialise the Artifact Generator Widget Mapping config with incomplete data. + * Initialise the Artifact Generator Widget Mapping config with incomplete data (no widget name). */ @Test(expected = IllegalArgumentException.class) public void testToscaMappingWithoutWidget() { @@ -141,6 +145,7 @@ public class TestArtifactGeneratorToscaParser { * Process a dummy Group object for a Service Resource. * * @throws XmlArtifactGenerationException + * if there is no configuration defined for a member Widget of an instance group */ @Test public void testInstanceGroups() throws XmlArtifactGenerationException { diff --git a/src/test/java/org/onap/aai/babel/xml/generator/model/TestVfModule.java b/src/test/java/org/onap/aai/babel/xml/generator/model/TestVfModule.java index 4171023..cc6d968 100644 --- a/src/test/java/org/onap/aai/babel/xml/generator/model/TestVfModule.java +++ b/src/test/java/org/onap/aai/babel/xml/generator/model/TestVfModule.java @@ -46,6 +46,8 @@ public class TestVfModule { } /** + * Initialize the Widget mappings. + * * @throws IOException * if a properties file is not loaded */ @@ -99,7 +101,9 @@ public class TestVfModule { /** * Add a new Widget to a VF Module, where the Widget is NOT set as a member. N.B. For the current VF Module * implementation the actual Widget type is not important. - * @throws XmlArtifactGenerationException + * + * @throws XmlArtifactGenerationException + * if the Widget mapping configuration is missing */ @Test public void testNonMemberWidgetToVf() throws XmlArtifactGenerationException { @@ -110,7 +114,9 @@ public class TestVfModule { /** * OAM Network is specifically excluded from a VF Module. - * @throws XmlArtifactGenerationException + * + * @throws XmlArtifactGenerationException + * if the Widget mapping configuration is missing */ @Test public void testAddOamNetworkWidgetToVf() throws XmlArtifactGenerationException { @@ -126,7 +132,9 @@ public class TestVfModule { * <li>Add a Volume Widget</li> * <li>Add a vserver Widget</li> * <li>Check that the Volume Widget appears under the vserver</li> - * @throws XmlArtifactGenerationException + * + * @throws XmlArtifactGenerationException + * if the Widget mapping configuration is missing */ @Test public void testAddVolumeWidgetToVf() throws XmlArtifactGenerationException { @@ -159,7 +167,9 @@ public class TestVfModule { * <li>Add an L-Interface Widget</li> * <li>Add a vserver Widget</li> * <li>Check that the L-Interface Widget appears under the vserver</li> - * @throws XmlArtifactGenerationException + * + * @throws XmlArtifactGenerationException + * if the Widget mapping configuration is missing */ @Test public void testAddLinterfaceWidgetToVf() throws XmlArtifactGenerationException { @@ -193,7 +203,9 @@ public class TestVfModule { * <li>Add an L-Interface Widget</li> * <li>Add a vserver Widget</li> * <li>Check that both Widgets appear under the vserver</li> - * @throws XmlArtifactGenerationException + * + * @throws XmlArtifactGenerationException + * if the Widget mapping configuration is missing */ @Test public void testAddVolumeAndLinterfaceWidgetToVf() throws XmlArtifactGenerationException { @@ -234,7 +246,8 @@ public class TestVfModule { * @param widgetType * type of Widget to create * @return a new Widget - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException + * if the Widget mapping configuration is missing */ private Widget createNewWidget(Type widgetType) throws XmlArtifactGenerationException { return Widget.getWidget(widgetType); @@ -270,7 +283,8 @@ public class TestVfModule { * the VF Module to update * @param widgetType * the type of Widget to create and add - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException + * if the Widget mapping configuration is missing */ private void assertAddWidget(Resource vfModule, Type widgetType) throws XmlArtifactGenerationException { assertThat(createNewWidgetForModule(vfModule, widgetType), is(true)); @@ -283,7 +297,8 @@ public class TestVfModule { * the VF Module * @param widgetType * the type of Widget to create and attempt to add - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException + * if the Widget mapping configuration is missing */ private void assertFailToAddWidget(Resource vfModule, Type widgetType) throws XmlArtifactGenerationException { assertThat(createNewWidgetForModule(vfModule, widgetType), is(false)); @@ -297,7 +312,8 @@ public class TestVfModule { * @param widgetType * the type of Widget to create and attempt to add * @return whether or not the Widget was added to the module - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException + * if the Widget mapping configuration is missing */ private boolean createNewWidgetForModule(Resource vfModule, Type widgetType) throws XmlArtifactGenerationException { Widget widget = createNewWidget(widgetType); @@ -327,7 +343,8 @@ public class TestVfModule { * @param vfModule * the VF Module to update * @return the number of Widgets present in the vserver on creation - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException + * if the Widget mapping configuration is missing */ private int createVserverForVf(Resource vfModule) throws XmlArtifactGenerationException { Widget vserverWidget = createNewWidget(Type.VSERVER); @@ -345,7 +362,8 @@ public class TestVfModule { * @param vserverWidget * the Widget to add * @return initial widget count for the vserver Widget - * @throws XmlArtifactGenerationException + * @throws XmlArtifactGenerationException + * if the Widget mapping configuration is missing */ private int addVserverToVf(Resource vfModule, Widget vserverWidget) throws XmlArtifactGenerationException { // A vserver (initially) has Flavor, Image, Tenant and Vfc. diff --git a/src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java b/src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java index da6e4d5..00694b2 100644 --- a/src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java +++ b/src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java @@ -34,7 +34,7 @@ import org.onap.aai.babel.xml.generator.model.Widget.Type; import org.onap.aai.babel.xml.generator.types.ModelType; /** - * Direct tests of the Widget class for code coverage. + * Direct tests of the Widget class for code coverage. */ public class TestWidget { @@ -61,7 +61,7 @@ public class TestWidget { assertThat(widget.getType(), is(ModelType.WIDGET)); assertThat(widget.getName(), is("service-instance")); assertThat(widget.getDeleteFlag(), is(true)); - + widget = Widget.getWidget(Type.VF); assertThat(widget.getType(), is(ModelType.WIDGET)); assertThat(widget.getName(), is("generic-vnf")); |