Also fix some checkstyle warnings regarding Javadoc comments.
Issue-ID: AAI-2057
Change-Id: If654c63ec6a5f9888fdf597e51ad0cad9f363a90
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
<?xml version="1.0"?>
<!--
-============LICENSE_START===================================================
-Copyright (c) 2018-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.
-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=====================================================
+
+ ============LICENSE_START=======================================================
+ org.onap.aai
+ ================================================================================
+ Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (c) 2018-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.
+ 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=========================================================
+
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version.org.eclipse.persistence.moxy>2.6.2</version.org.eclipse.persistence.moxy>
<version.org.hamcrest.hamcrest-library>1.3</version.org.hamcrest.hamcrest-library>
<version.org.json.json>20160212</version.org.json.json>
- <version.aai.aai-schema>1.4.1-SNAPSHOT</version.aai.aai-schema>
- <version.aai.aai-schema-ingest>1.4.1-SNAPSHOT</version.aai.aai-schema-ingest>
- <aai.oxm.target.folder>${project.build.directory}/bundleconfig/etc/oxm/</aai.oxm.target.folder>
- <version.org.glassfish.jersey.core.jersey-client>2.23</version.org.glassfish.jersey.core.jersey-client>
+ <version.aai.aai-schema>1.4.1-SNAPSHOT</version.aai.aai-schema>
+ <version.aai.aai-schema-ingest>1.4.1-SNAPSHOT</version.aai.aai-schema-ingest>
+ <aai.oxm.target.folder>${project.build.directory}/bundleconfig/etc/oxm/</aai.oxm.target.folder>
+ <version.org.glassfish.jersey.core.jersey-client>2.23</version.org.glassfish.jersey.core.jersey-client>
<docker.location>${basedir}/target</docker.location>
</properties>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
+
<dependency>
<groupId>org.onap.aai.logging-service</groupId>
<artifactId>logging-api</artifactId>
<artifactId>aai-schema-ingest</artifactId>
<version>${version.aai.aai-schema-ingest}</version>
</dependency>
-
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
-
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
- </dependency>
+
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-library</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<executions>
<execution>
<id>unpack</id>
- <phase>initialize</phase>
- <goals>
+ <phase>initialize</phase>
+ <goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItem>
<groupId>org.onap.aai.aai-common</groupId>
<artifactId>aai-schema</artifactId>
- <version>${version.aai.aai-schema}</version>
- <type>jar</type>
- <includes>onap/oxm/**/</includes>
- <outputDirectory>${aai.oxm.target.folder}</outputDirectory>
- </artifactItem>
+ <version>${version.aai.aai-schema}</version>
+ <type>jar</type>
+ <includes>onap/oxm/**/</includes>
+ <outputDirectory>${aai.oxm.target.folder}</outputDirectory>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
- * Copyright ?? 2018-2019 AT&T Intellectual Property. All rights reserved.
- * Copyright ?? 2018-2019 European Software Marketing Ltd.
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-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.
/**
* @param validationServiceAuthConfig
* @throws AAIAuthException
- * if the policy file cannot be loaded
+ * if the policy file cannot be loaded
*/
@Inject
public AAIMicroServiceAuth(final ValidationServiceAuthConfig validationServiceAuthConfig) throws AAIAuthException {
}
}
+ /**
+ * Check whether the given user may access the give function.
+ *
+ * @param username
+ * user to be authorized
+ * @param authFunction
+ * function the user wishes to access
+ * @return true if the user is authorized to access the function, false otherwsie
+ * @throws AAIAuthException
+ * if the auth object has not been initialized
+ */
public boolean authBasic(String username, String authFunction) throws AAIAuthException {
return authCore.authorize(username, authFunction);
}
+
+ /**
+ * Check whether the given user may access the give function.
+ *
+ * @param username
+ * user to be authorized
+ * @param authFunction
+ * function the user wishes to access
+ * @return true if the user is authorized to access the function, false otherwsie
+ * @throws AAIAuthException
+ * if the auth object has not been initialized
+ */
public String authUser(String authUser, String authFunction) throws AAIAuthException {
StringBuilder username = new StringBuilder();
/**
* @param authPolicyFile
- * @throws AAIAuthException if the policy file cannot be loaded
+ * @throws AAIAuthException
+ * if the policy file cannot be loaded
*/
public void init(String authPolicyFile) throws AAIAuthException {
try {
}
}
+ /**
+ * Check whether the given user may access the give function.
+ *
+ * @param username
+ * user to be authorized
+ * @param authFunction
+ * function the user wishes to access
+ * @return true if the user is authorized to access the function, false otherwsie
+ * @throws AAIAuthException
+ * of the auth object has not been initialized
+ */
public boolean authorize(String username, String authFunction) throws AAIAuthException {
if (!usersInitialized || users == null) {
throw new AAIAuthException("Auth module not initialized");
-/*
- * ============LICENSE_START===================================================
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
* Copyright (c) 2018-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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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=====================================================
+ * ============LICENSE_END=========================================================
*/
package org.onap.aai.validation.config;
/**
* Gets the configuration of the topics using Spring.
*/
-
public class TopicConfig {
private List<String> consumerTopicNames;
-
private List<String> publisherTopicNames;
@Resource(name = "topicProperties")
return populateTopics(consumerTopics, consumerTopicNames);
}
-
/**
* Gets the configuration of topics for publishing.
*
* Populates the topics list with topic objects created from each item in the topicNames list.
*
* @param topics
- * The topic list to populate.
+ * The topic list to populate.
* @param topicNames
- * The list of topic names to populate the topic list with.
+ * The list of topic names to populate the topic list with.
* @return The populated topic list.
*/
private List<Topic> populateTopics(List<Topic> topics, List<String> topicNames) {
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.onap.aai.validation.factory;
import org.onap.aai.event.client.DMaaPEventPublisher;
-public class DMaaPEventPublisherFactory {
+public class DMaaPEventPublisherFactory {
public DMaaPEventPublisher createEventPublisher(String topicHost, String topicName, String topicUsername,
String topicPassword, String transportType, String protocol) {
import org.onap.aai.validation.logging.LogHelper;
/**
- * Event Publisher
+ * Event Publisher.
*
*/
public class ValidationEventPublisher implements MessagePublisher {
/**
* @param ruleConfig
+ * @throws GroovyConfigurationException
+ * if the Groovy expression cannot be compiled
+ * @throws IOException
+ * if the Groovy class loader throws an internal exception
* @throws InstantiationException
* @throws IllegalAccessException
- * @throws IOException
- * @throws GroovyConfigurationException
*/
public GroovyRule(RuleSection ruleConfig)
- throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException {
+ throws GroovyConfigurationException, IOException, InstantiationException, IllegalAccessException {
setName(ruleConfig.getName());
setErrorCategory(ruleConfig.getCategory());
setErrorMessage(ruleConfig.getErrorMessage());
*
* @param values
*
- * @param groovyObject an instance/object of a Groovy class that implements one or more rule methods
+ * @param groovyObject
+ * an instance/object of a Groovy class that implements one or more rule methods
* @return the result of evaluating the expression
*/
@Override
}
/**
- * @param fields
+ * Create an anonymous Java Class implementing a Groovy Rule method for the supplied attributes and rule expression.
+ *
+ * @param attributes
+ * the attributes that form the parameters of the Groovy method
* @param expression
- * @return
- * @throws IOException
+ * a valid Groovy method expression (implementing a rule)
+ * @return the Java Class for accessing the Groovy method
* @throws GroovyConfigurationException
+ * if the Groovy expression cannot be compiled
+ * @throws IOException
+ * if the Groovy class loader throws an internal exception
*/
- private Class<?> createRule(List<String> fields, String expression)
- throws IOException, GroovyConfigurationException {
+ private Class<?> createRule(List<String> attributes, String expression)
+ throws GroovyConfigurationException, IOException {
originalExpression = expression;
groovyExpression = expression;
String methodParams = "";
int i = 1;
- for (String attribute : fields) {
+ for (String attribute : attributes) {
if (isValidAttributeName(attribute)) {
String fieldName = "field" + i++;
methodParams = appendParameter(methodParams, fieldName);
}
/**
- * Load and parse a Groovy script to create an anonymous class
+ * Load and parse a Groovy script to create an anonymous Java Class.
*
- * @param script a file containing the Groovy scripting language
- * @return the Java Class for accessing the Groovy methods
- * @throws IOException
+ * @param script
+ * valid Groovy content (for the class)
+ * @return the Java Class for accessing the Groovy script
* @throws GroovyConfigurationException
+ * if the Groovy script cannot be compiled
+ * @throws IOException
+ * if the Groovy class loader throws an internal exception
*/
@SuppressWarnings("rawtypes")
- private static Class loadGroovyClass(String expression) throws IOException, GroovyConfigurationException {
+ private static Class loadGroovyClass(String script) throws GroovyConfigurationException, IOException {
ClassLoader parent = GroovyRule.class.getClassLoader();
GroovyClassLoader loader = new GroovyClassLoader(parent);
Class groovyClass;
try {
- groovyClass = loader.parseClass(expression);
+ groovyClass = loader.parseClass(script);
} catch (CompilationFailedException e) {
throw new GroovyConfigurationException(e);
} finally {
* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
- * Copyright © 2018-2019 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2018-2019 European Software Marketing Ltd.
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-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.
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.onap.aai.validation.services;
import com.google.common.collect.Iterables;
* 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
+ * 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,
import org.onap.aai.auth.AAIAuthException;
import org.onap.aai.auth.AAIMicroServiceAuth;
import org.onap.aai.validation.config.ValidationServiceAuthConfig;
+import org.onap.aai.validation.test.util.TestUtil;
import org.springframework.mock.web.MockHttpServletRequest;
/**
- * Tests @{link AAIMicroServiceAuth}
+ * Tests @{link AAIMicroServiceAuth}.
*/
public class MicroServiceAuthTest {
* of a policy file that does not exist.
*
* @throws AAIAuthException
- * @throws IOException
+ * if the authorization policy file cannot be loaded
*/
@Test(expected = AAIAuthException.class)
- public void missingPolicyFile() throws AAIAuthException, IOException {
+ public void missingPolicyFile() throws AAIAuthException {
ValidationServiceAuthConfig authConfig = new ValidationServiceAuthConfig();
authConfig.setAuthPolicyFile("invalid.file.name");
new AAIMicroServiceAuth(authConfig);
}
/**
- * Test loading of a temporary file created with the specified roles
+ * Test loading of a temporary file created with the specified roles.
*
- * @throws AAIAuthException
* @throws IOException
- * @throws JSONException
+ * if the policy file could not be written
+ * @throws AAIAuthException
+ * if the policy file cannot be loaded
*/
@Test
- public void createLocalAuthFile() throws AAIAuthException, IOException, JSONException {
+ public void createLocalAuthFile() throws AAIAuthException, IOException {
JSONObject roles = createRoleObject("role", createUserObject("user"), createFunctionObject("func"));
AAIMicroServiceAuth auth = createAuthService(roles);
assertThat(auth.authUser("nosuchuser", "method:func"), is(equalTo("AAI_9101")));
}
/**
- * Test loading of the policy file relative to CONFIG_HOME
+ * Test loading of the policy file relative to CONFIG_HOME.
*
* @throws AAIAuthException
+ * if the policy file cannot be loaded
*/
@Test
public void createAuth() throws AAIAuthException {
servletRequest.setScheme("https");
servletRequest.setServerPort(9501);
servletRequest.setServerName("localhost");
- servletRequest.setRequestURI("/services/validation-service/v1/app/validate");
+ servletRequest.setRequestURI(TestUtil.VALIDATION_SERVICE_URL);
X509Certificate mockCertificate = Mockito.mock(X509Certificate.class);
Mockito.when(mockCertificate.getSubjectX500Principal())
return servletRequest;
}
+ /**
+ * Create a new auth object using the standard policy JSON
+ *
+ * @return a new auth object
+ * @throws AAIAuthException
+ * if the policy file cannot be loaded
+ */
private AAIMicroServiceAuth createStandardAuth() throws AAIAuthException {
ValidationServiceAuthConfig authConfig = new ValidationServiceAuthConfig();
authConfig.setAuthPolicyFile(authPolicyFile);
}
/**
- * @param rolesJson
- * @return
+ * @param roles
+ * @return a new auth object (to be tested)
* @throws IOException
+ * if the policy file could not be written
* @throws AAIAuthException
+ * if the policy file cannot be loaded
+ *
*/
private AAIMicroServiceAuth createAuthService(JSONObject roles) throws IOException, AAIAuthException {
- ValidationServiceAuthConfig authConfig = new ValidationServiceAuthConfig();
File file = File.createTempFile("auth-policy", "json");
file.deleteOnExit();
FileWriter fileWriter = new FileWriter(file);
fileWriter.flush();
fileWriter.close();
+ ValidationServiceAuthConfig authConfig = new ValidationServiceAuthConfig();
authConfig.setAuthPolicyFile(file.getAbsolutePath());
return new AAIMicroServiceAuth(authConfig);
}
/**
- * Assert authorisation results for an admin user based on the test policy file
+ * Assert authorisation results for an admin user based on the test policy file.
*
* @param auth
+ * the auth object
* @param adminUser
+ * the admin user name
* @throws AAIAuthException
*/
private void assertAdminUserAuthorisation(AAIMicroServiceAuth auth, String adminUser) throws AAIAuthException {
return usersArray;
}
- private JSONObject createRoleObject(String roleName, JSONArray usersArray, JSONArray functionsArray)
- throws JSONException {
- JSONObject roles = new JSONObject();
-
+ private JSONObject createRoleObject(String roleName, JSONArray usersArray, JSONArray functionsArray) {
JSONObject role = new JSONObject();
role.put("name", roleName);
role.put("functions", functionsArray);
JSONArray rolesArray = new JSONArray();
rolesArray.put(role);
+
+ JSONObject roles = new JSONObject();
roles.put("roles", rolesArray);
return roles;
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.onap.aai.validation.config;
import static org.hamcrest.Matchers.containsInAnyOrder;
@SpringBootTest
@RunWith(SpringJUnit4ClassRunner.class)
@Import(TopicPropertiesConfig.class)
-@TestPropertySource(locations = { "classpath:test-application.properties" })
-@ContextConfiguration(locations = { "classpath:topic-config/test-validation-service-beans.xml" })
+@TestPropertySource(locations = {"classpath:test-application.properties"})
+@ContextConfiguration(locations = {"classpath:topic-config/test-validation-service-beans.xml"})
public class TestTopicConfig {
static {
eventTopic.setConsumerGroup("event-dummy-consumer-group");
eventTopic.setConsumerId("event-dummy-consumer-id");
eventTopic.setTransportType("event-dummy-transport-type");
+ eventTopic.setProtocol("event-dummy-protocol-type");
Topic exportTopic = new TopicConfig("aai-data-export", "aai-data-integrity").new Topic();
exportTopic.setName("aai-data-export");
integrityTopic.setUsername("integrity-dummy-username");
integrityTopic.setPassword("integrity-dummy-password");
integrityTopic.setTransportType("integrity-dummy-transport-type");
+ integrityTopic.setProtocol("http");
List<Topic> publisherTopics = topicConfig.getPublisherTopics();
cachedReader = getReader(logDirectory, logFilePrefix);
}
+ /**
+ * @param logDirectory
+ * the directory containing all log files
+ * @param logFilePrefix
+ * the prefix to match
+ * @return a new buffered reader
+ * @throws IOException
+ * if an I/O error occurs when opening the log directory, or no files were found
+ */
private BufferedReader getReader(String logDirectory, String logFilePrefix) throws IOException {
BufferedReader reader = new BufferedReader(new FileReader(getLogFile(logDirectory, logFilePrefix)));
while (reader.readLine() != null) {
}
/**
+ * Find the log file matching the given prefix.
+ *
* @param logDirectory
+ * the directory containing all log files
* @return the most recently created log file.
* @throws IOException
+ * if an I/O error occurs when opening the log directory, or no files were found
*/
private File getLogFile(String logDirectory, String filenamePrefix) throws IOException {
- Optional<Path> latestFilePath = Files.list(Paths.get(logDirectory))
- .filter(f -> Files.isDirectory(f) == false //
- && f.getFileName().toString().startsWith(filenamePrefix)
- && !f.getFileName().toString().endsWith(".zip"))
+ Optional<Path> latestFilePath = Files.list(Paths.get(logDirectory)).filter(f -> Files.isDirectory(f) == false //
+ && f.getFileName().toString().startsWith(filenamePrefix)
+ && !f.getFileName().toString().endsWith(".zip"))
.max(Comparator.comparingLong(f -> f.toFile().lastModified()));
if (latestFilePath.isPresent()) {
cachedLog = latestFilePath.get();
* 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
+ * 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,
/**
* Simple test to log each of the validation messages in turn.
- *
+ *
* This version tests only the error logger at INFO level.
*
*/
/**
* Check that each message can be logged and that (by implication of successful logging) there is a corresponding
* resource (message format).
- *
+ *
* @throws IOException
+ * if an I/O error occurs when opening the log directory, or no files were found
*/
@Test
public void logAllMessages() throws IOException {
}
if (logger.isDebugEnabled()) {
- logger.debug(msg, args);
- validateLoggedMessage(msg, debugReader, "DEBUG");
+ logger.debug(msg, args);
+ validateLoggedMessage(msg, debugReader, "DEBUG");
}
// The trace level is not enabled
/**
* Check that each message can be logged and that (by implication of successful logging) there is a corresponding
* resource (message format).
- *
+ *
* @throws IOException
*/
@Test
/**
* Check logAudit with HTTP headers
- *
+ *
* @throws IOException
*/
@Test
/**
* Check logAudit with no HTTP headers
- *
+ *
* @throws IOException
*/
@Test
/**
* Check logMetrics
- *
+ *
* @throws IOException
*/
@Test
/**
* Call a logger method which is expected to throw an UnsupportedOperationException
- *
+ *
* @param logMethod
* @param dummyMsg
*/
/**
* Assert that a log message was logged to the expected log file at the expected severity
- *
+ *
* @param msg
* @param reader
* @param severity
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
- * ============================================================================
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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=====================================================
+ * ============LICENSE_END=========================================================
*/
+
package org.onap.aai.validation.modeldriven.configuration.mapping;
import static org.hamcrest.Matchers.is;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
-import org.onap.aai.validation.modeldriven.configuration.mapping.Filter;
-import org.onap.aai.validation.modeldriven.configuration.mapping.ModelInstanceMapper;
-import org.onap.aai.validation.modeldriven.configuration.mapping.ValueConfiguration;
import org.onap.aai.validation.modeldriven.configuration.mapping.ModelInstanceMapper.MappingType;
public class TestModelInstanceMapper {
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
- * ============================================================================
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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=====================================================
+ * ============LICENSE_END=========================================================
*/
package org.onap.aai.validation.modeldriven.parser;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.onap.aai.validation.modeldriven.parser.XMLModelParser;
-public class TestXMLModelParser {
+public class TestXmlModelParser {
static {
System.setProperty("APP_HOME", ".");
}
@Test
- public void testParseXMLModelFile() throws Exception {
+ public void testParseXmlModelFile() throws Exception {
assertEquals("Invalid model element name.", "model", modelElement.getName());
}
List<Node> relatedNodes = XMLModelParser.getObjectsFromXPath(modelElement, relObjsXPath);
assertEquals("Unexpected number of related objects.", 1, relatedNodes.size());
- Node relatedObjUUIDNode = relatedNodes.get(0).selectSingleNode("model-element-uuid");
- assertEquals("Unexpected related object UUID.", "71b825be-febf-45f7-b86a-ca0e3de19c90",
- relatedObjUUIDNode.getText());
+ Node relatedNode = relatedNodes.get(0).selectSingleNode("model-element-uuid");
+ assertEquals("Unexpected related object UUID.", "71b825be-febf-45f7-b86a-ca0e3de19c90", relatedNode.getText());
}
@Test
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018-2019 Amdocs
- * ============================================================================
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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=====================================================
+ * ============LICENSE_END=========================================================
*/
package org.onap.aai.validation.modeldriven.validator;
JsonElement genericVnfJsonElement = jsonParser.parse(expectedGenericVnf);
String expectedGenericVnf = genericVnfJsonElement.toString();
-
// Method under test
Multimap<String, String> values = instanceReader.getValues(connectorSibling, mapping);
// Method under test
values = instanceReader.getValues(logicalLinkInstance, mapping);
-
assertThat(values.get("generic-vnf").iterator().next(), is(equalTo(expectedGenericVnf)));
assertThat(values.get("pserver").iterator().next(), is(equalTo(jsonParser.parse(expectedPserver).toString())));
}
@Test
public void testGetResourceVersion() throws Exception {
String resourceVersion = instanceReader.getResourceVersion(connector);
-
assertThat(resourceVersion, is("1467975776"));
}
private static ModelInstanceMapper getMapping(String mappingFileName) throws Exception {
JSONArray jsonArray = new JSONArray(TestUtil.getFileAsString(mappingFileName));
JSONObject jsonObject = jsonArray.getJSONObject(0);
-
return JsonUtil.fromJson(jsonObject.toString(), ModelInstanceMapper.class);
}
}
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018-2019 Amdocs
- * ============================================================================
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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=====================================================
+ * ============LICENSE_END=========================================================
*/
package org.onap.aai.validation.reader;
public void testEntityLinkIsStripped() throws Exception {
Entity entity = eventReader.getEntity(vserverEvent);
String entityLink = entity.getEntityLink();
- assertThat(entityLink, is(
- "cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666"));
+ assertThat(entityLink,
+ is("cloud-infrastructure/cloud-regions/cloud-region/"
+ + "region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/"
+ + "vservers/vserver/example-vserver-id-val-34666"));
}
}
/**
- * ============LICENSE_START===================================================
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
* Copyright (c) 2018-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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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=====================================================
+ * ============LICENSE_END=========================================================
*/
package org.onap.aai.validation.result;
Map<String, Object> violationDetails = new HashMap<>();
//@formatter:off
- Violation violation = new Violation.Builder(entity)
- .category("category")
- .severity("severity")
- .violationType("violationType")
- .violationDetails(violationDetails)
- .errorMessage("errorMessage")
- .build();
- //@formatter:on
+ Violation violation = new Violation.Builder(entity)
+ .category("category")
+ .severity("severity")
+ .violationType("violationType")
+ .violationDetails(violationDetails)
+ .errorMessage("errorMessage")
+ .build();
+ //@formatter:on
validationResult.addViolation(violation);
assertThat(validationResult, is(not(equalTo(other))));
ValidationResult validationResult = new ValidationResultBuilder(eventReader, vserverEvent).build();
//@formatter:off
- Violation violation = new Violation.Builder(entity)
- .category("category")
- .severity("severity")
- .violationType("violationType")
- .violationDetails(violationDetails)
- .errorMessage("errorMessage")
- .build();
- //@formatter:on
+ Violation violation = new Violation.Builder(entity)
+ .category("category")
+ .severity("severity")
+ .violationType("violationType")
+ .violationDetails(violationDetails)
+ .errorMessage("errorMessage")
+ .build();
+ //@formatter:on
validationResult.addViolation(violation);
assertThat(validationResult.getEntityId(), is(expectedEntityId));
assertThat(validationResult.getEntityType(), is("vserver"));
assertThat(validationResult.getResourceVersion(), is("1464193654"));
- assertThat(validationResult.getEntityLink(), is("cloud-infrastructure/cloud-regions/cloud-region/region1/"
- + "AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666"));
+ assertThat(validationResult.getEntityLink(),
+ is("cloud-infrastructure/cloud-regions/cloud-region/region1/"
+ + "AAIregion1/tenants/tenant/example-tenant-id-val-88551"
+ + "/vservers/vserver/example-vserver-id-val-34666"));
}
private Violation assertThatViolationIsValid(ValidationResult validationResult, Violation expectedViolation) {
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
- * ============================================================================
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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=====================================================
+ * ============LICENSE_END=========================================================
*/
package org.onap.aai.validation.ruledriven.configuration;
import org.junit.rules.TemporaryFolder;
import org.onap.aai.cl.api.Logger;
import org.onap.aai.validation.logging.LogHelper;
-import org.onap.aai.validation.ruledriven.configuration.EntitySection;
-import org.onap.aai.validation.ruledriven.configuration.RulesConfigurationLoader;
import org.onap.aai.validation.ruledriven.configuration.build.ContentBuilder;
import org.onap.aai.validation.ruledriven.configuration.build.EntityBuilder;
import org.onap.aai.validation.ruledriven.configuration.build.RuleBuilder;
* 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
+ * 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,
* Test for "vserver is related to vpe and vserver-name contains me6".
*
* @throws Exception
- * if the rule expression in this test is invalid
+ * if the rule expression in this test is invalid
*/
@Test
public void testConditionalRegExp() throws Exception {
}
/**
- * location_clli is 8 or 11 characters and must be characters only
+ * location_clli is 8 or 11 characters and must be characters only.
*/
@Test
public void testStringLengthAndChars() throws Exception {
return new GroovyRule(ruleConfig);
}
- private GroovyRule buildRuleWithErrorMessage(String name, String attribute, String expression, String errorMessage)
- throws IOException, InstantiationException, IllegalAccessException, GroovyConfigurationException {
- RuleSection ruleConfig = new RuleSection();
- ruleConfig.setName(name);
- ruleConfig.setAttributes(Collections.singletonList(attribute));
- ruleConfig.setExpression(expression);
- if(errorMessage != null) {
- ruleConfig.setErrorMessage(errorMessage);
- }
- return new GroovyRule(ruleConfig);
- }
-
/**
* Build a simple rule (with a default name) using a RuleConfiguration object
*
return buildRule("testRule", attributes, expression);
}
+ private GroovyRule buildRuleWithErrorMessage(String name, String attribute, String expression, String errorMessage)
+ throws IOException, InstantiationException, IllegalAccessException, GroovyConfigurationException {
+ RuleSection ruleConfig = new RuleSection();
+ ruleConfig.setName(name);
+ ruleConfig.setAttributes(Collections.singletonList(attribute));
+ ruleConfig.setExpression(expression);
+ if (errorMessage != null) {
+ ruleConfig.setErrorMessage(errorMessage);
+ }
+ return new GroovyRule(ruleConfig);
+ }
+
private GroovyRule buildRuleWithErrorMessage(String attribute, String expression, String errorText)
throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException {
return buildRuleWithErrorMessage("testRule", attribute, expression, errorText);
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
- * ============================================================================
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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=====================================================
+ * ============LICENSE_END=========================================================
*/
package org.onap.aai.validation.ruledriven.rule;
}
/**
- * Utility to build a rule and test that the attribute is valid
+ * Utility to build a rule and test that the attribute passed to it is valid.
*
* @param attribute
* attribute (field) identifier
@SpringBootTest
@RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(locations = { "classpath:oxm-reader/schemaIngest.properties", "classpath:application.properties" })
-@ContextConfiguration(locations = { "classpath:/info-service/test-validation-service-beans.xml" })
+@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties", "classpath:application.properties"})
+@ContextConfiguration(locations = {"classpath:/info-service/test-validation-service-beans.xml"})
public class TestInfoService {
static {
}
enum TestData {
- VSERVER(
- "rule-driven-validator/test_events/vserver-create-event.json"
- );
+ VSERVER("rule-driven-validator/test_events/vserver-create-event.json");
private String filename;
assertThat(info, containsString("errored=1"));
}
-
@Test
public void testVserverEventRecorded() throws URISyntaxException, IOException {
Path vserverTestFile = Paths.get(ClassLoader.getSystemResource(TestData.VSERVER.getFilename()).toURI());
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
- * ============================================================================
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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=====================================================
+ * ============LICENSE_END=========================================================
*/
package org.onap.aai.validation.services;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
-import java.net.URISyntaxException;
import java.security.cert.X509Certificate;
import java.util.Collections;
import java.util.List;
import org.mockito.Mockito;
import org.onap.aai.auth.AAIMicroServiceAuth;
import org.onap.aai.validation.controller.ValidationController;
-import org.onap.aai.validation.services.ValidateServiceImpl;
+import org.onap.aai.validation.test.util.TestUtil;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
}
/**
- * Create a (mocked) HTTPS request and invoke the Babel generate artifacts API
- *
- * @param request
- * for the Babel Service
- * @return the Response from the HTTP API
- * @throws URISyntaxException
+ * Create a (mocked) HTTPS request and invoke the Validation Service API.
*/
@Test
- public void testRequestWithHeaders() throws URISyntaxException {
+ public void testRequestWithHeaders() {
// Create mocked request headers map
MultivaluedHashMap<String, String> headersMap = new MultivaluedHashMap<>();
headersMap.put("X-TransactionId", createSingletonList("transaction-id"));
servletRequest.setScheme("https");
servletRequest.setServerPort(9501);
servletRequest.setServerName("localhost");
- servletRequest.setRequestURI("/services/validation-service/v1/app/validate");
+ servletRequest.setRequestURI(TestUtil.VALIDATION_SERVICE_URL);
X509Certificate mockCertificate = Mockito.mock(X509Certificate.class);
Mockito.when(mockCertificate.getSubjectX500Principal())
/**
- * ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
- * ============================================================================
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-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.
* You may obtain a copy of the License at
* 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=====================================================
+ * ============LICENSE_END=========================================================
*/
package org.onap.aai.validation.test.util;
public File inputFile;
public String expectedResultsFile;
+ /**
+ * Create a new test entity.
+ *
+ * @param root
+ * the top-level folder for the test suite
+ * @param inputFilePath
+ * the path to the input file to be tested
+ * @param inputEventsPath
+ * the folder containing the input file(s)
+ * @param outputEventsPath
+ * the folder to write the outputs to
+ */
public TestEntity(Path root, Path inputFilePath, String inputEventsPath, String outputEventsPath) {
String rootUri = root.toUri().toString();
String resultsRoot = rootUri.replaceAll(inputEventsPath + "/$", outputEventsPath + "/");
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
- * ============================================================================
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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=====================================================
+ * ============LICENSE_END=========================================================
*/
package org.onap.aai.validation.test.util;
*/
public class TestUtil {
+ public static final String VALIDATION_SERVICE_URL = "/services/validation-service/v1/app/validate";
+
/**
* Gets files, such as test data from the classpath.
*
<?xml version="1.0" encoding="UTF-8"?>
<!--
-============LICENSE_START===================================================
-Copyright (c) 2018 Amdocs
-============================================================================
-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=====================================================
+
+ ============LICENSE_START=======================================================
+ org.onap.aai
+ ================================================================================
+ Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (c) 2018-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.
+ 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=========================================================
+
-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<bean id="topicAdminConfig" class="org.onap.aai.validation.config.TopicAdminConfig" />
<bean id="validationControllerConfig" class="org.onap.aai.validation.config.ValidationControllerConfig" />
<bean id="mappingFile" class="org.apache.commons.io.IOUtils" factory-method="toString">
- <constructor-arg value="file:src/test/resources/model-instance-mapping.json_conf" type="java.io.InputStream" />
+ <constructor-arg value="file:src/test/resources/model-validation/model-instance-mapping.json_conf" type="java.io.InputStream" />
</bean>
<bean id="modelConfig" class="org.onap.aai.validation.config.ModelConfig">
<property name="modelCacheExpirySeconds" value="${model.cache.expirySeconds}" />
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-============LICENSE_START===================================================
-Copyright (c) 2018 Amdocs
-============================================================================
-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=====================================================
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-
- <!-- TOPIC NAMES -->
- <bean id="topicConfig" class="org.onap.aai.validation.config.TopicConfig">
- <property name="consumerTopicNames">
- <list>
- <value>aai-event</value>
- <value>aai-data-export</value>
- </list>
- </property>
- <property name="publisherTopicNames">
- <list>
- <value>aai-data-integrity</value>
- </list>
- </property>
- </bean>
-
- <!-- DEFINE THE TOPIC PROPERTY FILES. Naming convention: topic-[topic name].properties. Each property must be pre-fixed with [topic name] -->
- <bean id="topicProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
- <property name="locations">
- <list>
- <value>classpath:topic-config/topic-aai-event.properties</value>
- <value>classpath:topic-config/topic-aai-data-export.properties</value>
- <value>classpath:topic-config/topic-aai-data-integrity.properties</value>
- </list>
- </property>
- </bean>
-</beans>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
-<!--
-============LICENSE_START===================================================
-Copyright (c) 2018 Amdocs
-============================================================================
-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
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd">
- http://www.apache.org/licenses/LICENSE-2.0
+ <bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor" />
-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=====================================================
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <import resource="test-topic-config-beans.xml" />
+ <bean id="topicConfig" class="org.onap.aai.validation.config.TopicConfig" />
</beans>
\ No newline at end of file
# ============LICENSE_START===================================================
-# Copyright (c) 2018 Amdocs
+# Copyright (c) 2018-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.
aai-data-integrity.publisher.partition=integrity-dummy-partition
aai-data-integrity.username=integrity-dummy-username
aai-data-integrity.password=integrity-dummy-password
-aai-data-integrity.transport.type=integrity-dummy-transport-type
\ No newline at end of file
+aai-data-integrity.transport.type=integrity-dummy-transport-type
+aai-data-integrity.protocol=http
# ============LICENSE_START===================================================
-# Copyright (c) 2018 Amdocs
+# Copyright (c) 2018-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.
aai-event.password=event-dummy-password
aai-event.consumer.group=event-dummy-consumer-group
aai-event.consumer.id=event-dummy-consumer-id
-aai-event.transport.type=event-dummy-transport-type
\ No newline at end of file
+aai-event.transport.type=event-dummy-transport-type
+aai-event.protocol=event-dummy-protocol-type
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
-============LICENSE_START===================================================
-Copyright (c) 2018 Amdocs
-============================================================================
-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=====================================================
--->
+ ============LICENSE_START=======================================================
+ org.onap.aai
+ ================================================================================
+ Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (c) 2018-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.
+ 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=========================================================
+
+-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd