diff options
Diffstat (limited to 'src/test')
156 files changed, 33110 insertions, 0 deletions
diff --git a/src/test/java/org/onap/aai/validation/auth/MicroServiceAuthTest.java b/src/test/java/org/onap/aai/validation/auth/MicroServiceAuthTest.java new file mode 100644 index 0000000..f9bd177 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/auth/MicroServiceAuthTest.java @@ -0,0 +1,227 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.auth; + +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.file.Paths; +import java.security.cert.X509Certificate; +import javax.security.auth.x500.X500Principal; +import javax.ws.rs.core.Cookie; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.junit.Test; +import org.mockito.Mockito; +import org.onap.aai.auth.AAIAuthException; +import org.onap.aai.auth.AAIMicroServiceAuth; +import org.onap.aai.auth.AAIMicroServiceAuthCore; +import org.onap.aai.validation.config.ValidationServiceAuthConfig; +import org.springframework.mock.web.MockHttpServletRequest; + +/** + * Tests @{link AAIMicroServiceAuth} + */ + +public class MicroServiceAuthTest { + + static { + System.setProperty("APP_HOME", "."); + System.setProperty("CONFIG_HOME", Paths.get(System.getProperty("user.dir"), "src/test/resources").toString()); + } + + private static final String VALID_ADMIN_USER = "cn=common-name, ou=org-unit, o=org, l=location, st=state, c=us"; + private static final String authPolicyFile = "auth_policy.json"; + + /** + * Temporarily invalidate the default policy file and then try to initialise the authorisation class using the name + * of a policy file that does not exist. + * + * @throws AAIAuthException + * @throws IOException + */ + @Test(expected = AAIAuthException.class) + public void missingPolicyFile() throws AAIAuthException, IOException { + String defaultFile = AAIMicroServiceAuthCore.getDefaultAuthFileName(); + try { + AAIMicroServiceAuthCore.setDefaultAuthFileName("invalid.default.file"); + ValidationServiceAuthConfig authConfig = new ValidationServiceAuthConfig(); + authConfig.setAuthPolicyFile("invalid.file.name"); + new AAIMicroServiceAuth(authConfig); + } finally { + AAIMicroServiceAuthCore.setDefaultAuthFileName(defaultFile); + } + } + + /** + * Test loading of a temporary file created with the specified roles + * + * @throws AAIAuthException + * @throws IOException + * @throws JSONException + */ + @Test + public void createLocalAuthFile() throws AAIAuthException, IOException, JSONException { + JSONObject roles = createRoleObject("role", createUserObject("user"), createFunctionObject("func")); + AAIMicroServiceAuth auth = createAuthService(roles); + assertThat(auth.authUser("nosuchuser", "method:func"), is(equalTo("AAI_9101"))); + assertThat(auth.authUser("user", "method:func"), is(equalTo("OK"))); + } + + /** + * Test loading of the policy file relative to CONFIG_HOME + * + * @throws AAIAuthException + */ + @Test + public void createAuth() throws AAIAuthException { + AAIMicroServiceAuth auth = createStandardAuth(); + assertAdminUserAuthorisation(auth, VALID_ADMIN_USER); + } + + @Test + public void testAuthUser() throws AAIAuthException { + AAIMicroServiceAuth auth = createStandardAuth(); + assertThat(auth.authUser(VALID_ADMIN_USER, "GET:actions"), is(equalTo("OK"))); + assertThat(auth.authUser(VALID_ADMIN_USER, "WRONG:action"), is(equalTo("AAI_9101"))); + } + + @Test + public void testAuthCookie() throws AAIAuthException { + AAIMicroServiceAuth auth = createStandardAuth(); + Cookie mockCookie = new Cookie("name", null); + StringBuilder user = new StringBuilder(VALID_ADMIN_USER); + + assertThat(auth.authCookie(null, "GET:actions", user), is(false)); + assertThat(auth.authCookie(null, "WRONG:action", user), is(false)); + + assertThat(auth.authCookie(mockCookie, "GET:actions", user), is(true)); + assertThat(auth.authCookie(mockCookie, "WRONG:action", user), is(false)); + } + + @Test + public void testValidateRequests() throws AAIAuthException { + AAIMicroServiceAuth auth = createStandardAuth(); + assertThat(auth.validateRequest(new MockHttpServletRequest(), null, "app/v1/service"), is(false)); + assertThat(auth.validateRequest(createMockRequest(), "POST", "getAndPublish"), is(false)); + assertThat(auth.validateRequest(createMockRequest(), "POST", "validate"), is(true)); + } + + private MockHttpServletRequest createMockRequest() { + MockHttpServletRequest servletRequest = new MockHttpServletRequest(); + servletRequest.setSecure(true); + servletRequest.setScheme("https"); + servletRequest.setServerPort(9501); + servletRequest.setServerName("localhost"); + servletRequest.setRequestURI("/services/validation-service/v1/app/validate"); + + X509Certificate mockCertificate = Mockito.mock(X509Certificate.class); + Mockito.when(mockCertificate.getSubjectX500Principal()) + .thenReturn(new X500Principal("CN=test, OU=qa, O=Test Ltd, L=London, ST=London, C=GB")); + + servletRequest.setAttribute("javax.servlet.request.X509Certificate", new X509Certificate[] {mockCertificate}); + servletRequest.setAttribute("javax.servlet.request.cipher_suite", ""); + return servletRequest; + } + + private AAIMicroServiceAuth createStandardAuth() throws AAIAuthException { + ValidationServiceAuthConfig authConfig = new ValidationServiceAuthConfig(); + authConfig.setAuthPolicyFile(authPolicyFile); + return new AAIMicroServiceAuth(authConfig); + } + + /** + * @param rolesJson + * @return + * @throws IOException + * @throws AAIAuthException + */ + 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.write(roles.toString()); + fileWriter.flush(); + fileWriter.close(); + + authConfig.setAuthPolicyFile(file.getAbsolutePath()); + return new AAIMicroServiceAuth(authConfig); + } + + /** + * Assert authorisation results for an admin user based on the test policy file + * + * @param auth + * @param adminUser + * @throws AAIAuthException + */ + private void assertAdminUserAuthorisation(AAIMicroServiceAuth auth, String adminUser) throws AAIAuthException { + assertThat(auth.authUser(adminUser, "GET:actions"), is(equalTo("OK"))); + assertThat(auth.authUser(adminUser, "POST:actions"), is(equalTo("OK"))); + assertThat(auth.authUser(adminUser, "PUT:actions"), is(equalTo("OK"))); + assertThat(auth.authUser(adminUser, "DELETE:actions"), is(equalTo("OK"))); + } + + private JSONArray createFunctionObject(String functionName) throws JSONException { + JSONArray functionsArray = new JSONArray(); + JSONObject func = new JSONObject(); + func.put("name", functionName); + func.put("methods", createMethodObject("method")); + functionsArray.put(func); + return functionsArray; + } + + private JSONArray createMethodObject(String methodName) throws JSONException { + JSONArray methodsArray = new JSONArray(); + JSONObject method = new JSONObject(); + method.put("name", methodName); + methodsArray.put(method); + return methodsArray; + } + + private JSONArray createUserObject(String username) throws JSONException { + JSONArray usersArray = new JSONArray(); + JSONObject user = new JSONObject(); + user.put("username", username); + usersArray.put(user); + return usersArray; + } + + private JSONObject createRoleObject(String roleName, JSONArray usersArray, JSONArray functionsArray) + throws JSONException { + JSONObject roles = new JSONObject(); + + JSONObject role = new JSONObject(); + role.put("name", roleName); + role.put("functions", functionsArray); + role.put("users", usersArray); + + JSONArray rolesArray = new JSONArray(); + rolesArray.put(role); + roles.put("roles", rolesArray); + + return roles; + } + +} diff --git a/src/test/java/org/onap/aai/validation/config/TestRestConfig.java b/src/test/java/org/onap/aai/validation/config/TestRestConfig.java new file mode 100644 index 0000000..313c847 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/config/TestRestConfig.java @@ -0,0 +1,79 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.config; + +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import javax.inject.Inject; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.aai.validation.config.RestConfig; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = {"classpath:/rest-config/test-validation-service-beans.xml"}) +public class TestRestConfig { + + static { + System.setProperty("APP_HOME", "."); + } + + @Inject + private RestConfig restConfig; + + @Test + public void testRestConfigPopulation() throws Exception { + RestConfig expectedRestConfig = new RestConfig(); + + expectedRestConfig.setHost("localhost"); + expectedRestConfig.setPort(8080); + expectedRestConfig.setProtocol("https"); + expectedRestConfig.setBaseModelURI("${baseModelURI}"); + expectedRestConfig.setTrustStorePath("/dir1/dir2/trustStorePath"); + expectedRestConfig.setTrustStorePassword("70c87528c88dcd9f9c2558d30e817868"); + expectedRestConfig.setKeyStorePath("/dir1/dir2/keyStorePath"); + expectedRestConfig.setKeyStorePassword("70c87528c88dcd9f9c2558d30e817868"); + expectedRestConfig.setKeyManagerFactoryAlgorithm("AES"); + expectedRestConfig.setKeyStoreType("jks"); + expectedRestConfig.setSecurityProtocol("TLS"); + expectedRestConfig.setConnectionTimeout(100); + expectedRestConfig.setReadTimeout(200); + + assertThat(expectedRestConfig, is(restConfig)); + assertThat(expectedRestConfig.getBaseModelURI(), is(restConfig.getBaseModelURI())); + assertThat(expectedRestConfig.getConnectionTimeout(), is(restConfig.getConnectionTimeout())); + assertThat(expectedRestConfig.getHost(), is(restConfig.getHost())); + assertThat(expectedRestConfig.getKeyManagerFactoryAlgorithm(), is(restConfig.getKeyManagerFactoryAlgorithm())); + assertThat(expectedRestConfig.getKeyStorePassword(), is(restConfig.getKeyStorePassword())); + assertThat(expectedRestConfig.getKeyStorePath(), is(restConfig.getKeyStorePath())); + assertThat(expectedRestConfig.getKeyStoreType(), is(restConfig.getKeyStoreType())); + assertThat(expectedRestConfig.getPort(), is(restConfig.getPort())); + assertThat(expectedRestConfig.getProtocol(), is(restConfig.getProtocol())); + assertThat(expectedRestConfig.getReadTimeout(), is(restConfig.getReadTimeout())); + assertThat(expectedRestConfig.getSecurityProtocol(), is(restConfig.getSecurityProtocol())); + assertThat(expectedRestConfig.getTrustStorePassword(), is(restConfig.getTrustStorePassword())); + assertThat(expectedRestConfig.getTrustStorePath(), is(restConfig.getTrustStorePath())); + assertThat(expectedRestConfig.hashCode(), is(restConfig.hashCode())); + assertThat(expectedRestConfig.toString(), is(restConfig.toString())); + assertTrue(expectedRestConfig.equals(restConfig)); + + } +} diff --git a/src/test/java/org/onap/aai/validation/config/TestTopicAdminConfig.java b/src/test/java/org/onap/aai/validation/config/TestTopicAdminConfig.java new file mode 100644 index 0000000..f6a6195 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/config/TestTopicAdminConfig.java @@ -0,0 +1,60 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.config; + +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import javax.inject.Inject; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.aai.validation.config.TopicAdminConfig; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = {"classpath:/topic-admin-config/test-validation-service-beans.xml"}) +public class TestTopicAdminConfig { + + static { + System.setProperty("APP_HOME", "."); + } + + @Inject + private TopicAdminConfig topicAdminConfig; + + @Test + public void testTopicAdminConfigPopulation() throws Exception { + TopicAdminConfig expectedTopicAdminConfig = new TopicAdminConfig(); + + expectedTopicAdminConfig.setPublishEnable(true); + expectedTopicAdminConfig.setPublishRetries(3l); + expectedTopicAdminConfig.setConsumeEnable(true); + expectedTopicAdminConfig.setConsumePollingIntervalSeconds(3l); + + assertThat(expectedTopicAdminConfig, is(topicAdminConfig)); + assertThat(expectedTopicAdminConfig.hashCode(), is(topicAdminConfig.hashCode())); + assertThat(expectedTopicAdminConfig.toString(), is(topicAdminConfig.toString())); + assertThat(expectedTopicAdminConfig.getConsumePollingIntervalSeconds(), + is(topicAdminConfig.getConsumePollingIntervalSeconds())); + assertThat(expectedTopicAdminConfig.getPublishRetries(), is(topicAdminConfig.getPublishRetries())); + assertTrue(expectedTopicAdminConfig.equals(topicAdminConfig)); + } + +} diff --git a/src/test/java/org/onap/aai/validation/config/TestTopicConfig.java b/src/test/java/org/onap/aai/validation/config/TestTopicConfig.java new file mode 100644 index 0000000..efe82b8 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/config/TestTopicConfig.java @@ -0,0 +1,107 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.config; + +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; + +import java.util.List; +import java.util.Properties; +import javax.annotation.Resource; +import javax.inject.Inject; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.aai.validation.config.TopicConfig; +import org.onap.aai.validation.ValidationServiceApplication; +import org.onap.aai.validation.config.TopicConfig.Topic; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = {"classpath:/topic-config/test-validation-service-beans.xml"}) +public class TestTopicConfig { + + static { + System.setProperty("APP_HOME", "."); + } + + @Inject + private TopicConfig topicConfigurations; + + @Resource(name = "topicProperties") + private Properties topicProperties; + + + @Test + public void testGetTopicProperties() throws Exception { + assertThat(topicProperties.getProperty("aai-event.name"), is("aai-event")); + assertThat(topicProperties.getProperty("aai-data-export.name"), is("aai-data-export")); + } + + + + @Test + public void testGetConsumerTopicsFromTopicConfig() throws Exception { + assertThat(topicConfigurations.getConsumerTopicNames(), containsInAnyOrder("aai-event", "aai-data-export")); + } + + + @Test + public void testGetConsumerTopicConfigurationObjects() throws Exception { + Topic eventTopic = new TopicConfig("aai-event","aai-data-integrity").new Topic(); + eventTopic.setName("aai-event"); + eventTopic.setHost("event-dummy-host"); + eventTopic.setUsername("event-dummy-username"); + eventTopic.setPassword("event-dummy-password"); + eventTopic.setConsumerGroup("event-dummy-consumer-group"); + eventTopic.setConsumerId("event-dummy-consumer-id"); + eventTopic.setTransportType("event-dummy-transport-type"); + + Topic exportTopic = new TopicConfig("aai-data-export","aai-data-integrity").new Topic(); + exportTopic.setName("aai-data-export"); + exportTopic.setHost("export-dummy-host"); + exportTopic.setUsername("export-dummy-username"); + exportTopic.setPassword("export-dummy-password"); + exportTopic.setConsumerGroup("export-dummy-consumer-group"); + exportTopic.setConsumerId("export-dummy-consumer-id"); + exportTopic.setTransportType("export-dummy-transport-type"); + + List<Topic> consumerTopics = topicConfigurations.getConsumerTopics(); + + assertThat(consumerTopics, containsInAnyOrder(eventTopic, exportTopic)); + } + + @Test + public void testGetPublisherTopicConfigurationObjects() throws Exception { + Topic integrityTopic = new TopicConfig("aai-data-export","aai-data-integrity").new Topic(); + integrityTopic.setName("aai-data-integrity"); + integrityTopic.setHost("integrity-dummy-host"); + integrityTopic.setPartition("integrity-dummy-partition"); + integrityTopic.setUsername("integrity-dummy-username"); + integrityTopic.setPassword("integrity-dummy-password"); + integrityTopic.setTransportType("integrity-dummy-transport-type"); + + List<Topic> publisherTopics = topicConfigurations.getPublisherTopics(); + + assertThat(publisherTopics, containsInAnyOrder(integrityTopic)); + } + + +} diff --git a/src/test/java/org/onap/aai/validation/config/TestValidationControllerConfig.java b/src/test/java/org/onap/aai/validation/config/TestValidationControllerConfig.java new file mode 100644 index 0000000..a8e03eb --- /dev/null +++ b/src/test/java/org/onap/aai/validation/config/TestValidationControllerConfig.java @@ -0,0 +1,69 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.config; + +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; + +import java.util.ArrayList; +import java.util.List; +import javax.inject.Inject; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.aai.validation.config.ValidationControllerConfig; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = {"classpath:/validation-controller-config/test-validation-service-beans.xml"}) +public class TestValidationControllerConfig { + + static { + System.setProperty("APP_HOME", "."); + } + + @Inject + private ValidationControllerConfig validationControllerConfig; + + @Test + public void testValidationControllerConfig() { + ValidationControllerConfig expected = new ValidationControllerConfig(); + List<String> excludedEventActionList = new ArrayList<String>(); + excludedEventActionList.add("DELETE"); + + List<String> eventTypeRuleList = new ArrayList<String>(2); + eventTypeRuleList.add("AAI-EVENT"); + eventTypeRuleList.add("AAI-DATA-EXPORT-API"); + + List<String> eventTypeModelList = new ArrayList<String>(); + eventTypeModelList.add("AAI-DATA-EXPORT-NQ"); + + expected.setEventDomain("devINT1"); + expected.setExcludedEventActions(excludedEventActionList); + expected.setEventTypeRule(eventTypeRuleList); + expected.setEventTypeModel(eventTypeModelList); + expected.setEventTypeEnd("END-EVENT"); + + assertThat(expected.getEventDomain(), is(validationControllerConfig.getEventDomain())); + assertThat(expected.getExcludedEventActions(), is(validationControllerConfig.getExcludedEventActions())); + assertThat(expected.getEventTypeRule(), is(validationControllerConfig.getEventTypeRule())); + assertThat(expected.getEventTypeModel(), is(validationControllerConfig.getEventTypeModel())); + assertThat(expected.getEventTypeEnd(), is(validationControllerConfig.getEventTypeEnd())); + } + +} diff --git a/src/test/java/org/onap/aai/validation/controller/TestValidationController.java b/src/test/java/org/onap/aai/validation/controller/TestValidationController.java new file mode 100644 index 0000000..ff67181 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/controller/TestValidationController.java @@ -0,0 +1,391 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.controller; + +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.runners.MockitoJUnitRunner; +import org.onap.aai.validation.Validator; +import org.onap.aai.validation.config.EventReaderConfig; +import org.onap.aai.validation.config.ValidationControllerConfig; +import org.onap.aai.validation.controller.ValidationController; +import org.onap.aai.validation.exception.ValidationServiceError; +import org.onap.aai.validation.exception.ValidationServiceException; +import org.onap.aai.validation.publisher.MessagePublisher; +import org.onap.aai.validation.reader.EventReader; +import org.onap.aai.validation.reader.data.Entity; +import org.onap.aai.validation.reader.data.EntityId; +import org.onap.aai.validation.result.ValidationResult; +import org.onap.aai.validation.result.Violation; + +@RunWith(MockitoJUnitRunner.class) +public class TestValidationController { + + private static final String AAI_EVENT = "AAI-EVENT"; + private static final String CREATE = "CREATE"; + private static final String DELETE = "DELETE"; + private static final String DEV_INT_1 = "devINT1"; + private static final String ENTITY_LINK = "entityLink"; + private static final String MODEL = "model"; + private static final String RULE = "rule"; + private static final String TEST = "test"; + private static final String TESTDATA_EVENTTYPE_NAMEDQUERY = "aai named query eventtype"; + private static final String TESTDATA_EVENTTYPE_API = "aai api eventtype"; + private static final String TESTDATA_EVENTTYPE_AAI = "aai event eventype"; + private static final String TESTDATA_EVENTTYPE_UNKNOWN = "unknown eventtype"; + private static final String TESTDATA_EVENTTYPE_NULL = "event with null eventtype"; + private static final String TESTDATA_EVENTTYPE_END_EVENT = "END-EVENT"; + private static final String TESTDATA_DOMAIN_INVALID = "event with invalid domain"; + private static final String TESTDATA_DOMAIN_NULL = "event with null domain"; + private static final String TESTDATA_EVENTACTION_DELETE = "event with delete event action"; + private static final String TESTDATA_EVENTACTION_NULL = "event with null event action"; + private static final String TESTDATA_EXCEPTION_EVENT = "event causing exception"; + private static final String TESTDATA_HANDLE_EXCEPTION_EXCEPTION_EVENT = + "event causing exception during handling of the original exception"; + private static final String TESTDATA_VALIDATION_RESULT_PUBLISH_ERROR = + "event causing exception during publishing of validation result"; + private static final String VSERVER = "vserver"; + + @Mock + private ValidationControllerConfig validationControllerConfig; + + @Mock + private EventReader eventReader; + + @Mock + private Validator ruleDrivenValidator; + + @Mock + private Validator modelDrivenValidator; + + @Mock + private MessagePublisher messagePublisher; + + @InjectMocks + private ValidationController validationController = new ValidationController(validationControllerConfig, + eventReader, ruleDrivenValidator, modelDrivenValidator, messagePublisher); + + @Mock + private Entity entity; + + static { + System.setProperty("APP_HOME", "."); + } + + @Before + public void setupMocks() throws ValidationServiceException { + + Map<String, List<ValidationResult>> validationResultsMap = setupTestData(); + + when(ruleDrivenValidator.validate(TESTDATA_EVENTTYPE_AAI)) + .thenReturn(validationResultsMap.get(TESTDATA_EVENTTYPE_AAI)); + when(ruleDrivenValidator.validate(TESTDATA_EVENTTYPE_API)) + .thenReturn(validationResultsMap.get(TESTDATA_EVENTTYPE_API)); + when(modelDrivenValidator.validate(TESTDATA_EVENTTYPE_NAMEDQUERY)) + .thenReturn(validationResultsMap.get(TESTDATA_EVENTTYPE_NAMEDQUERY)); + when(ruleDrivenValidator.validate(TESTDATA_EXCEPTION_EVENT)) + .thenThrow(new RuntimeException("Failed to validate")); + when(ruleDrivenValidator.validate(TESTDATA_HANDLE_EXCEPTION_EXCEPTION_EVENT)) + .thenThrow(new RuntimeException("Failed to validate")); + when(ruleDrivenValidator.validate(TESTDATA_VALIDATION_RESULT_PUBLISH_ERROR)) + .thenReturn(validationResultsMap.get(TESTDATA_VALIDATION_RESULT_PUBLISH_ERROR)); + when(ruleDrivenValidator.validate(TESTDATA_EVENTACTION_NULL)) + .thenReturn(validationResultsMap.get(TESTDATA_EVENTTYPE_AAI)); + + Map<String, List<String>> eventTypeDataMap = setupEventTypeData(); + when(validationControllerConfig.getEventTypeRule()).thenReturn(eventTypeDataMap.get(RULE)); + when(validationControllerConfig.getEventTypeModel()).thenReturn(eventTypeDataMap.get(MODEL)); + when(validationControllerConfig.getEventTypeEnd()).thenReturn("END-EVENT"); + + when(eventReader.getEventType(TESTDATA_EVENTTYPE_AAI)).thenReturn(Optional.of(AAI_EVENT)); + when(eventReader.getEventType(TESTDATA_EVENTTYPE_API)).thenReturn(Optional.of("AAI-DATA-EXPORT-API")); + when(eventReader.getEventType(TESTDATA_EVENTTYPE_NAMEDQUERY)).thenReturn(Optional.of("AAI-DATA-EXPORT-NQ")); + when(eventReader.getEventType(TESTDATA_EVENTTYPE_UNKNOWN)).thenReturn(Optional.of("EVENTTYPE-UNKNOWN")); + when(eventReader.getEventType(TESTDATA_EVENTTYPE_NULL)).thenReturn(Optional.empty()); + when(eventReader.getEventType(TESTDATA_EXCEPTION_EVENT)).thenReturn(Optional.of(AAI_EVENT)); + when(eventReader.getEventType(TESTDATA_HANDLE_EXCEPTION_EXCEPTION_EVENT)).thenReturn(Optional.of(AAI_EVENT)); + when(eventReader.getEventType(TESTDATA_VALIDATION_RESULT_PUBLISH_ERROR)).thenReturn(Optional.of(AAI_EVENT)); + when(eventReader.getEventType(TESTDATA_EVENTACTION_NULL)).thenReturn(Optional.of(AAI_EVENT)); + + when(validationControllerConfig.getEventDomain()).thenReturn(DEV_INT_1); + when(eventReader.getEventDomain(TESTDATA_EVENTTYPE_AAI)).thenReturn(Optional.of(DEV_INT_1)); + when(eventReader.getEventDomain(TESTDATA_EVENTTYPE_API)).thenReturn(Optional.of(DEV_INT_1)); + when(eventReader.getEventDomain(TESTDATA_EVENTTYPE_NAMEDQUERY)).thenReturn(Optional.of(DEV_INT_1)); + when(eventReader.getEventDomain(TESTDATA_EVENTTYPE_UNKNOWN)).thenReturn(Optional.of(DEV_INT_1)); + when(eventReader.getEventDomain(TESTDATA_EVENTTYPE_NULL)).thenReturn(Optional.of(DEV_INT_1)); + when(eventReader.getEventDomain(TESTDATA_DOMAIN_INVALID)).thenReturn(Optional.of("invalidDomain")); + when(eventReader.getEventDomain(TESTDATA_DOMAIN_NULL)).thenReturn(Optional.empty()); + when(eventReader.getEventDomain(TESTDATA_EXCEPTION_EVENT)).thenReturn(Optional.of(DEV_INT_1)); + when(eventReader.getEventDomain(TESTDATA_HANDLE_EXCEPTION_EXCEPTION_EVENT)).thenReturn(Optional.of(DEV_INT_1)); + when(eventReader.getEventDomain(TESTDATA_VALIDATION_RESULT_PUBLISH_ERROR)).thenReturn(Optional.of(DEV_INT_1)); + when(eventReader.getEventDomain(TESTDATA_EVENTACTION_DELETE)).thenReturn(Optional.of(DEV_INT_1)); + when(eventReader.getEventDomain(TESTDATA_EVENTACTION_NULL)).thenReturn(Optional.of(DEV_INT_1)); + + List<String> excludedActions = new ArrayList<>(); + excludedActions.add(DELETE); + when(validationControllerConfig.getExcludedEventActions()).thenReturn(excludedActions); + when(eventReader.getEventAction(TESTDATA_EVENTTYPE_AAI)).thenReturn(Optional.of(CREATE)); + when(eventReader.getEventAction(TESTDATA_EVENTTYPE_API)).thenReturn(Optional.of(CREATE)); + when(eventReader.getEventAction(TESTDATA_EVENTTYPE_NAMEDQUERY)).thenReturn(Optional.of(CREATE)); + when(eventReader.getEventAction(TESTDATA_EVENTTYPE_UNKNOWN)).thenReturn(Optional.of(CREATE)); + when(eventReader.getEventAction(TESTDATA_EVENTTYPE_NULL)).thenReturn(Optional.of(CREATE)); + when(eventReader.getEventAction(TESTDATA_EXCEPTION_EVENT)).thenReturn(Optional.of(CREATE)); + when(eventReader.getEventAction(TESTDATA_HANDLE_EXCEPTION_EXCEPTION_EVENT)).thenReturn(Optional.of(CREATE)); + when(eventReader.getEventAction(TESTDATA_VALIDATION_RESULT_PUBLISH_ERROR)).thenReturn(Optional.of(CREATE)); + when(eventReader.getEventAction(TESTDATA_EVENTACTION_DELETE)).thenReturn(Optional.of(DELETE)); + when(eventReader.getEventAction(TESTDATA_EVENTACTION_NULL)).thenReturn(Optional.empty()); + + when(eventReader.getEntityType(TESTDATA_EXCEPTION_EVENT)).thenReturn(Optional.of(VSERVER)); + when(eventReader.getEntity(TESTDATA_EXCEPTION_EVENT)).thenReturn(entity); + when(eventReader.getEntityType(TESTDATA_HANDLE_EXCEPTION_EXCEPTION_EVENT)).thenThrow( + new RuntimeException("Error during handling the exception for an event that couldn't be validated")); + //@formatter:off + Mockito.doThrow(new ValidationServiceException(ValidationServiceError.EVENT_CLIENT_PUBLISHER_INIT_ERROR)) + .when(messagePublisher) + .publishMessage( + Mockito.contains("\"entityId\":\"[vserver-id=instanceid1]\",\"entityType\":\"entitytype1\",\"resourceVersion\":\"resourceVersion1\"")); + //@formatter:on + } + + private Map<String, List<String>> setupEventTypeData() { + Map<String, List<String>> eventTypeDataMap = new HashMap<>(); + List<String> eventTypeRule = new ArrayList<>(); + + eventTypeRule.add(AAI_EVENT); + eventTypeRule.add("AAI-DATA-EXPORT-API"); + eventTypeDataMap.put(RULE, eventTypeRule); + + List<String> eventTypeModel = new ArrayList<>(); + eventTypeModel.add("AAI-DATA-EXPORT-NQ"); + eventTypeDataMap.put(MODEL, eventTypeModel); + + return eventTypeDataMap; + } + + private Map<String, List<ValidationResult>> setupTestData() throws ValidationServiceException { + + Map<String, List<ValidationResult>> validationResultsMap = new HashMap<>(); + + List<ValidationResult> aaiEventValidationResults = new ArrayList<>(); + + setUpEntityMock("20160525162737-61c49d41-5338-4755-af54-06cee9fe4aca", VSERVER, "1464193654"); + + aaiEventValidationResults.add(new ValidationResult(entity)); + aaiEventValidationResults.add(new ValidationResult(entity)); + validationResultsMap.put(TESTDATA_EVENTTYPE_AAI, aaiEventValidationResults); + + List<ValidationResult> apiEventValidationResults = new ArrayList<>(); + + setUpEntityMock("20160525162737-61c49d41-5338-4755-af54-06cee9fe4acb", VSERVER, "1464193655"); + + apiEventValidationResults.add(new ValidationResult(entity)); + validationResultsMap.put(TESTDATA_EVENTTYPE_API, apiEventValidationResults); + + List<ValidationResult> namedQueryEventValidationResults = new ArrayList<>(); + + setUpEntityMock("20160525162737-61c49d41-5338-4755-af54-06cee9fe4acc", VSERVER, "1464193656"); + + namedQueryEventValidationResults.add(new ValidationResult(entity)); + validationResultsMap.put(TESTDATA_EVENTTYPE_NAMEDQUERY, namedQueryEventValidationResults); + + List<ValidationResult> messagePublishExceptionValidationResults = new ArrayList<>(); + + setUpEntityMock("instanceid1", "entitytype1", "resourceVersion1"); + + messagePublishExceptionValidationResults.add(new ValidationResult(entity)); + validationResultsMap.put(TESTDATA_VALIDATION_RESULT_PUBLISH_ERROR, messagePublishExceptionValidationResults); + + return validationResultsMap; + } + + @Test + public void testExecuteForAAIEvent() throws Exception { + // Test for AAI-EVENT + validationController.execute(TESTDATA_EVENTTYPE_AAI, TEST); + verify(ruleDrivenValidator, times(1)).validate(TESTDATA_EVENTTYPE_AAI); + verify(messagePublisher, times(2)).publishMessage(Mockito.contains( + "\"entityId\":{\"vserver-id\":\"20160525162737-61c49d41-5338-4755-af54-06cee9fe4aca\"},\"entityType\":\"vserver\",\"entityLink\":\"entityLink\",\"resourceVersion\":\"1464193654\",\"entity\":{},\"violations\":[]}")); + } + + @Test + public void testExecuteForAPIEvent() throws Exception { + // Test for AAI-DATA-EXPORT-API + validationController.execute(TESTDATA_EVENTTYPE_API, TEST); + verify(ruleDrivenValidator, times(1)).validate(TESTDATA_EVENTTYPE_API); + verify(messagePublisher, times(1)).publishMessage(Mockito.contains( + "\"entityId\":{\"vserver-id\":\"20160525162737-61c49d41-5338-4755-af54-06cee9fe4acb\"},\"entityType\":\"vserver\",\"entityLink\":\"entityLink\",\"resourceVersion\":\"1464193655\",\"entity\":{},\"violations\":[]}")); + } + + @Test + public void testExecuteForNQEvent() throws Exception { + // Test for AAI-DATA-EXPORT-NQ + validationController.execute(TESTDATA_EVENTTYPE_NAMEDQUERY, TEST); + verify(modelDrivenValidator, times(1)).validate(TESTDATA_EVENTTYPE_NAMEDQUERY); + verify(messagePublisher, times(1)).publishMessage(Mockito.contains( + "\"entityId\":{\"vserver-id\":\"20160525162737-61c49d41-5338-4755-af54-06cee9fe4acc\"},\"entityType\":\"vserver\",\"entityLink\":\"entityLink\",\"resourceVersion\":\"1464193656\",\"entity\":{},\"violations\":[]}")); + } + + @Test + public void testExecuteForNullDomain() throws Exception { + doVerifyMockInteractionsTest(TESTDATA_DOMAIN_NULL, TEST); + } + + private void doVerifyMockInteractionsTest(String event, String eventSource) throws Exception { + validationController.execute(event, eventSource); + verify(eventReader, times(1)).getEventType(Mockito.anyString()); + verify(ruleDrivenValidator, times(0)).validate(Mockito.anyString()); + verify(modelDrivenValidator, times(0)).validate(Mockito.anyString()); + verify(messagePublisher, times(0)).publishMessage(Mockito.anyString()); + + } + + @Test + public void testExecuteForInvalidDomain() throws Exception { + doVerifyMockInteractionsTest(TESTDATA_DOMAIN_INVALID, TEST); + } + + @Test + public void testExecuteForExcludedAction() throws Exception { + doVerifyMockInteractionsTest(TESTDATA_EVENTACTION_DELETE, TEST); + } + + @Test + public void testExecuteForNullAction() throws Exception { + validationController.execute(TESTDATA_EVENTACTION_NULL, TEST); + verify(eventReader, times(2)).getEventType(Mockito.anyString()); + verify(ruleDrivenValidator, times(1)).validate(Mockito.anyString()); + verify(modelDrivenValidator, times(0)).validate(Mockito.anyString()); + verify(messagePublisher, times(2)).publishMessage(Mockito.anyString()); + } + + + + private void doEventTypeTest(String event, String eventSource, int numEventReaderInvocations) throws Exception { + validationController.execute(event, eventSource); + verify(eventReader, times(numEventReaderInvocations)).getEventType(event); + verify(ruleDrivenValidator, times(0)).validate(Mockito.anyString()); + verify(modelDrivenValidator, times(0)).validate(Mockito.anyString()); + verify(messagePublisher, times(0)).publishMessage(Mockito.anyString()); + } + + @Test + public void testExecuteForNullEventType() throws Exception { + // The implementation checks whether this is an end event + // Given that it is not, the event is then examined to see if it is a validation candidate + doEventTypeTest(TESTDATA_EVENTTYPE_NULL, TEST, 2); + } + + @Test + public void testExecuteForUnknownEventType() throws Exception { + doEventTypeTest(TESTDATA_EVENTTYPE_UNKNOWN, TEST, 2); + } + + @Test + public void testExecuteForEndEventType() throws Exception { + doVerifyMockInteractionsTest(TESTDATA_EVENTTYPE_END_EVENT, TEST); + } + + @Test + public void testExceptionDuringValidation() throws Exception { + String primaryKey = "vserver-id"; + String value = "example-vserver-id-val-34666"; + String resourceVersion = "123456789"; + + EntityId entityId = new EntityId(primaryKey, value); + + when(entity.getResourceVersion()).thenReturn(Optional.of(resourceVersion)); + when(entity.getIds()).thenReturn(Collections.singletonList(entityId)); + validationController.execute(TESTDATA_EXCEPTION_EVENT, TEST); + verify(ruleDrivenValidator, times(1)).validate(TESTDATA_EXCEPTION_EVENT); + + // @formatter:off + Violation violation = new Violation.Builder(entity) + .category("CANNOT_VALIDATE") + .severity("CRITICAL") + .violationType("NONE") + .errorMessage("Failed to validate") + .build(); + // @formatter:on + + JsonObject violationObject = new JsonParser().parse(violation.toString()).getAsJsonObject(); + violationObject.remove("validationRule"); // Not set + + JsonObject validationResult = new JsonObject(); + JsonObject entityIdObject = new JsonObject(); + JsonElement entity = new JsonObject(); + entityIdObject.addProperty(primaryKey, value); + validationResult.add(Violation.ENTITY_ID_PROPERTY, entityIdObject); + validationResult.addProperty(Violation.ENTITY_TYPE_PROPERTY, "entitytype1"); + validationResult.addProperty(ENTITY_LINK, ENTITY_LINK); + validationResult.addProperty("resourceVersion", resourceVersion); + validationResult.add("entity", entity); + JsonArray violations = new JsonArray(); + violations.add(violationObject); + validationResult.add("violations", violations); + + String json = validationResult.toString(); + String messageContent = json.substring(1, json.length() - 1); // Remove the { } from the JSON string + verify(messagePublisher).publishMessage(Mockito.contains(messageContent)); + } + + @Test + public void testExceptionDuringHandlingValidationException() throws Exception { + // Test for exception during handling of an exception scenario + validationController.execute(TESTDATA_HANDLE_EXCEPTION_EXCEPTION_EVENT, TEST); + verify(ruleDrivenValidator, times(1)).validate(TESTDATA_HANDLE_EXCEPTION_EXCEPTION_EVENT); + verify(messagePublisher, times(0)).publishMessage(Mockito.anyString()); + } + + @Test + public void testExceptionDuringMessagePublish() throws Exception { + // Test for exception during publishing message. + // Cant verify if the static application logger has been called. + // This test is here for code coverage. + validationController.execute(TESTDATA_VALIDATION_RESULT_PUBLISH_ERROR, TEST); + verify(ruleDrivenValidator, times(1)).validate(TESTDATA_VALIDATION_RESULT_PUBLISH_ERROR); + verify(messagePublisher, times(1)).publishMessage(Mockito.contains( + "\"entityId\":{\"vserver-id\":\"instanceid1\"},\"entityType\":\"entitytype1\",\"entityLink\":\"entityLink\",\"resourceVersion\":\"resourceVersion1\",\"entity\":{},\"violations\":[]}")); + } + + private void setUpEntityMock(String id, String type, String resourceVersion) throws ValidationServiceException { + when(eventReader.getEventReaderConfig()).thenReturn(new EventReaderConfig()); + when(entity.getType()).thenReturn(type); + EntityId entityId = new EntityId("vserver-id", id); + when(entity.getIds()).thenReturn(Collections.singletonList(entityId)); + when(entity.getEntityLink()).thenReturn(ENTITY_LINK); + when(entity.getResourceVersion()).thenReturn(Optional.of(resourceVersion)); + } +} diff --git a/src/test/java/org/onap/aai/validation/data/client/TestRestClient.java b/src/test/java/org/onap/aai/validation/data/client/TestRestClient.java new file mode 100644 index 0000000..9f2807b --- /dev/null +++ b/src/test/java/org/onap/aai/validation/data/client/TestRestClient.java @@ -0,0 +1,74 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.data.client; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; + +import javax.ws.rs.core.MediaType; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; +import org.onap.aai.validation.config.RestConfig; +import org.onap.aai.validation.data.client.RestClient; +import org.onap.aai.validation.exception.ValidationServiceException; + +/** + * Simple tests for GET and POST failures so as to increase code coverage. + * + * Note that the REST client is not properly initialised. + * + */ +public class TestRestClient { + + static { + System.setProperty("APP_HOME", "."); + } + + private static final String TEST_URL = "/aai/v11"; + private RestConfig mockRestConfig; + + @Before + public void setUp() { + mockRestConfig = Mockito.mock(RestConfig.class); + Mockito.when(mockRestConfig.getProtocol()).thenReturn("http"); + Mockito.when(mockRestConfig.getHost()).thenReturn("localhost"); + Mockito.when(mockRestConfig.getPort()).thenReturn(8080); + } + + @Test + public void validateConstructor() { + RestClient restClient = new RestClient(mockRestConfig); + assertNotNull(restClient); + assertThat(restClient.toString(), is(notNullValue())); + } + + @Test(expected = ValidationServiceException.class) + public void getOperationFailure() throws ValidationServiceException { + RestClient restClient = new RestClient(mockRestConfig); + restClient.get(TEST_URL, MediaType.TEXT_PLAIN); + } + + @Test(expected = ValidationServiceException.class) + public void postOperationFailure() throws ValidationServiceException { + RestClient restClient = new RestClient(mockRestConfig); + restClient.post(TEST_URL, MediaType.TEXT_PLAIN); + } +} diff --git a/src/test/java/org/onap/aai/validation/logging/LogReader.java b/src/test/java/org/onap/aai/validation/logging/LogReader.java new file mode 100644 index 0000000..096221d --- /dev/null +++ b/src/test/java/org/onap/aai/validation/logging/LogReader.java @@ -0,0 +1,101 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.logging; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.TimeUnit; +import org.apache.commons.lang.time.StopWatch; +import org.junit.Assert; + +public class LogReader { + + private Map<String, Path> cachedLogMap = new HashMap<>(); + private Map<String, BufferedReader> readersMap = new HashMap<>(); + private BufferedReader cachedReader; + + public LogReader(String logDirectory, String logFilePrefix) throws IOException { + cachedReader = getReader(logDirectory, logFilePrefix); + } + + private BufferedReader getReader(String logDirectory, String logFilePrefix) throws IOException { + BufferedReader reader = readersMap.get(logFilePrefix); + if (reader == null) { + reader = new BufferedReader(new FileReader(getLogFile(logDirectory, logFilePrefix))); + while (reader.readLine() != null) { + // Consume all lines + } + readersMap.put(logFilePrefix, reader); + } + return reader; + } + + /** + * @param logDirectory + * @return the most recently created log file. + * @throws IOException + */ + public File getLogFile(String logDirectory, String filenamePrefix) throws IOException { + Path cachedLog = cachedLogMap.get(filenamePrefix); + + if (cachedLog == null) { + Optional<Path> latestFilePath = Files.list(Paths.get(logDirectory)) + .filter(f -> Files.isDirectory(f) == false && f.getFileName().toString().startsWith(filenamePrefix)) + .max(Comparator.comparingLong(f -> f.toFile().lastModified())); + if (latestFilePath.isPresent()) { + cachedLog = latestFilePath.get(); + } else { + throw new IOException("No validation log files were found!"); + } + } + + return cachedLog.toFile(); + } + + /** + * @return new lines appended to the log file + * @throws IOException + */ + public String getNewLines() throws IOException { + StopWatch stopwatch = new StopWatch(); + stopwatch.start(); + + while (!cachedReader.ready()) { + if (stopwatch.getTime() > TimeUnit.SECONDS.toMillis(30)) { + Assert.fail("Test took too long"); + } + // else keep waiting + } + + StringBuilder lines = new StringBuilder(); + String line; + while ((line = cachedReader.readLine()) != null) { + lines.append(line).append(System.lineSeparator()); + } + return lines.toString(); + } +} diff --git a/src/test/java/org/onap/aai/validation/logging/TestApplicationLogger.java b/src/test/java/org/onap/aai/validation/logging/TestApplicationLogger.java new file mode 100644 index 0000000..d19d43d --- /dev/null +++ b/src/test/java/org/onap/aai/validation/logging/TestApplicationLogger.java @@ -0,0 +1,245 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.logging; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.CoreMatchers.startsWith; +import static org.hamcrest.MatcherAssert.assertThat; + +import java.io.IOException; +import java.nio.file.Paths; +import java.util.Arrays; +import org.apache.commons.lang.time.StopWatch; +import org.junit.BeforeClass; +import org.junit.Test; +import org.mockito.Mockito; +import org.onap.aai.cl.api.LogFields; +import org.onap.aai.cl.api.Logger; +import org.onap.aai.cl.mdc.MdcOverride; +import org.onap.aai.validation.logging.ApplicationMsgs; +import org.onap.aai.validation.logging.LogHelper; +import org.onap.aai.validation.logging.LogHelper.TriConsumer; +import org.springframework.http.HttpHeaders; + +/** + * Simple test to log each of the validation messages in turn. + * + * This version tests only the error logger at INFO level. + * + */ +public class TestApplicationLogger { + + @BeforeClass + public static void setupClass() { + System.setProperty("APP_HOME", "."); + } + + /** + * Check that each message can be logged and that (by implication of successful logging) there is a corresponding + * resource (message format). + * + * @throws IOException + */ + @Test + public void logAllMessages() throws IOException { + Logger logger = LogHelper.INSTANCE; + String logDirectory = getLogDirectory(); + LogReader errorReader = new LogReader(logDirectory, "error"); + LogReader debugReader = new LogReader(logDirectory, "debug"); + String[] args = {"1", "2", "3", "4"}; + for (ApplicationMsgs msg : Arrays.asList(ApplicationMsgs.values())) { + if (msg.name().endsWith("ERROR")) { + logger.error(msg, args); + validateLoggedMessage(msg, errorReader, "ERROR"); + + logger.error(msg, new RuntimeException("fred"), args); + validateLoggedMessage(msg, errorReader, "fred"); + } else { + logger.info(msg, args); + validateLoggedMessage(msg, errorReader, "INFO"); + + logger.warn(msg, args); + validateLoggedMessage(msg, errorReader, "WARN"); + } + + logger.debug(msg, args); + validateLoggedMessage(msg, debugReader, "DEBUG"); + + // The trace level is not enabled + logger.trace(msg, args); + } + } + + /** + * Check that each message can be logged and that (by implication of successful logging) there is a corresponding + * resource (message format). + * + * @throws IOException + */ + @Test + public void logDebugMessages() throws IOException { + LogReader reader = new LogReader(getLogDirectory(), "debug"); + LogHelper.INSTANCE.debug("a message"); + String s = reader.getNewLines(); + assertThat(s, is(notNullValue())); + } + + + /** + * Check logAudit with HTTP headers + * + * @throws IOException + */ + @Test + public void logAuditMessage() throws IOException { + LogHelper logger = LogHelper.INSTANCE; + LogReader reader = new LogReader(getLogDirectory(), "audit"); + + HttpHeaders headers = Mockito.mock(HttpHeaders.class); + Mockito.when(headers.getFirst("X-ECOMP-RequestID")).thenReturn("ecomp-request-id"); + Mockito.when(headers.getFirst("X-FromAppId")).thenReturn("app-id"); + + // Call logAudit without first calling startAudit + logger.logAuditSuccess("first call: bob"); + String s = reader.getNewLines(); + assertThat(s, is(notNullValue())); + assertThat("audit message log level", s, containsString("INFO")); + assertThat("audit message content", s, containsString("bob")); + + // This time call the start method + logger.startAudit(headers, null); + logger.logAuditSuccess("second call: foo"); + s = reader.getNewLines(); + assertThat(s, is(notNullValue())); + assertThat("audit message log level", s, containsString("INFO")); + assertThat("audit message content", s, containsString("foo")); + assertThat("audit message content", s, containsString("ecomp-request-id")); + assertThat("audit message content", s, containsString("app-id")); + } + + /** + * Check logAudit with no HTTP headers + * + * @throws IOException + */ + @Test + public void logAuditMessageWithoutHeaders() throws IOException { + LogHelper logger = LogHelper.INSTANCE; + LogReader reader = new LogReader(getLogDirectory(), "audit"); + logger.startAudit(null, null); + logger.logAuditSuccess("foo"); + String s = reader.getNewLines(); + assertThat(s, is(notNullValue())); + assertThat("audit message log level", s, containsString("INFO")); + assertThat("audit message content", s, containsString("foo")); + } + + /** + * Check logMetrics + * + * @throws IOException + */ + @Test + public void logMetricsMessage() throws IOException { + LogReader reader = new LogReader(getLogDirectory(), "metrics"); + LogHelper logger = LogHelper.INSTANCE; + logger.logMetrics("metrics: fred"); + String s = reader.getNewLines(); + assertThat(s, is(notNullValue())); + assertThat("metrics message log level", s, containsString("INFO")); + assertThat("metrics message content", s, containsString("fred")); + } + + @Test + public void logMetricsMessageWithStopwatch() throws IOException { + LogReader reader = new LogReader(getLogDirectory(), "metrics"); + LogHelper logger = LogHelper.INSTANCE; + StopWatch stopWatch = new StopWatch(); + stopWatch.start(); + logger.logMetrics(stopWatch, "joe", "bloggs"); + String logLine = reader.getNewLines(); + assertThat(logLine, is(notNullValue())); + assertThat("metrics message log level", logLine, containsString("INFO")); + assertThat("metrics message content", logLine, containsString("joe")); + } + + @Test + public void callUnsupportedMethods() throws IOException { + LogHelper logger = LogHelper.INSTANCE; + ApplicationMsgs dummyMsg = ApplicationMsgs.LOAD_PROPERTIES; + callUnsupportedOperationMethod(logger::error, dummyMsg); + callUnsupportedOperationMethod(logger::info, dummyMsg); + callUnsupportedOperationMethod(logger::warn, dummyMsg); + callUnsupportedOperationMethod(logger::debug, dummyMsg); + callUnsupportedOperationMethod(logger::trace, dummyMsg); + try { + logger.error(dummyMsg, new LogFields(), new RuntimeException("test"), ""); + } catch (UnsupportedOperationException e) { + // Expected to reach here + } + try { + logger.info(dummyMsg, new LogFields(), new MdcOverride(), ""); + } catch (UnsupportedOperationException e) { + // Expected to reach here + } + try { + logger.formatMsg(dummyMsg, ""); + } catch (UnsupportedOperationException e) { + // Expected to reach here + } + } + + private String getLogDirectory() { + String logDirectory = LogHelper.getLogDirectory(); + assertThat(Paths.get(logDirectory).toAbsolutePath().toString(), + startsWith(Paths.get(System.getProperty("APP_HOME")).toAbsolutePath().toString())); + return logDirectory; + } + + /** + * Call a logger method which is expected to throw an UnsupportedOperationException + * + * @param logMethod + * @param dummyMsg + */ + private void callUnsupportedOperationMethod(TriConsumer<Enum<?>, LogFields, String[]> logMethod, + ApplicationMsgs dummyMsg) { + try { + logMethod.accept(dummyMsg, new LogFields(), new String[] {""}); + org.junit.Assert.fail("method should have thrown execption"); // NOSONAR as code not reached + } catch (UnsupportedOperationException e) { + // Expected to reach here + } + } + + /** + * Assert that a log message was logged to the expected log file at the expected severity + * + * @param msg + * @param reader + * @param severity + * @throws IOException + */ + private void validateLoggedMessage(ApplicationMsgs msg, LogReader reader, String severity) throws IOException { + String s = reader.getNewLines(); + assertThat(s, is(notNullValue())); + assertThat(msg.toString() + " log level", s, containsString(severity)); + } +} diff --git a/src/test/java/org/onap/aai/validation/modeldriven/TestModelId.java b/src/test/java/org/onap/aai/validation/modeldriven/TestModelId.java new file mode 100644 index 0000000..7cefede --- /dev/null +++ b/src/test/java/org/onap/aai/validation/modeldriven/TestModelId.java @@ -0,0 +1,95 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.modeldriven; + +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.not; +import static org.junit.Assert.assertThat; + +import org.junit.Test; +import org.onap.aai.validation.modeldriven.ModelId; + +public class TestModelId { + + static { + System.setProperty("APP_HOME", "."); + } + + @Test + public void testGettersAndSetters() { + String attr = null; + String id = null; + ModelId modelId = new ModelId(attr, id); + assertThat(modelId.getModelIdAttribute(), is(equalTo(attr))); + assertThat(modelId.getModelId(), is(equalTo(id))); + assertThat(modelId.isEmpty(), is(true)); + + attr = ""; + modelId.setModelIdAttribute(attr); + assertThat(modelId.getModelIdAttribute(), is(equalTo(attr))); + assertThat(modelId.getModelId(), is(equalTo(id))); + assertThat(modelId.isEmpty(), is(true)); + + attr = "new_attr_value"; + modelId.setModelIdAttribute(attr); + assertThat(modelId.getModelIdAttribute(), is(equalTo(attr))); + assertThat(modelId.getModelId(), is(equalTo(id))); + assertThat(modelId.isEmpty(), is(true)); + + id = "new_id"; + modelId.setModelId(id); + assertThat(modelId.getModelIdAttribute(), is(equalTo(attr))); + assertThat(modelId.getModelId(), is(equalTo(id))); + assertThat(modelId.isEmpty(), is(false)); + + id = ""; + modelId.setModelId(id); + assertThat(modelId.getModelIdAttribute(), is(equalTo(attr))); + assertThat(modelId.getModelId(), is(equalTo(id))); + assertThat(modelId.isEmpty(), is(true)); + + attr = null; + modelId.setModelIdAttribute(attr); + assertThat(modelId.getModelIdAttribute(), is(equalTo(attr))); + assertThat(modelId.getModelId(), is(equalTo(id))); + assertThat(modelId.isEmpty(), is(true)); + } + + @Test + public void testIsEmpty() { + assertThat(new ModelId(null, null).isEmpty(), is(true)); + assertThat(new ModelId("", null).isEmpty(), is(true)); + assertThat(new ModelId(null, "").isEmpty(), is(true)); + assertThat(new ModelId("", "").isEmpty(), is(true)); + assertThat(new ModelId("A", null).isEmpty(), is(true)); + assertThat(new ModelId(null, "B").isEmpty(), is(true)); + assertThat(new ModelId("A", "B").isEmpty(), is(false)); + } + + @Test + public void testEqualsMethod() { + ModelId id1 = new ModelId("a", "b"); + ModelId id2 = new ModelId("a", "b"); + assertThat(id1, is(equalTo(id1))); + assertThat(id1, is(equalTo(id2))); + assertThat(id1, is(not(equalTo(null)))); + assertThat(id1.hashCode(), is(equalTo(id2.hashCode()))); + } + +} diff --git a/src/test/java/org/onap/aai/validation/modeldriven/configuration/mapping/TestFilter.java b/src/test/java/org/onap/aai/validation/modeldriven/configuration/mapping/TestFilter.java new file mode 100644 index 0000000..c9d2688 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/modeldriven/configuration/mapping/TestFilter.java @@ -0,0 +1,55 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.modeldriven.configuration.mapping; + +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; +import org.junit.Test; +import org.onap.aai.validation.modeldriven.configuration.mapping.Filter; + +public class TestFilter { + + static { + System.setProperty("APP_HOME", "."); + } + + @Test + public void testAllMethodsInFilterClassToImproveCodeCoverage() { + Filter filter1 = new Filter(); + List<String> valid = new ArrayList<>(); + valid.add("String 1"); + filter1.setPath("path"); + filter1.setValid(valid); + + Filter filter2 = new Filter(); + filter2.setPath("path"); + filter2.setValid(valid); + + assertThat(filter1, is(filter2)); + assertThat(filter1.hashCode(), is(filter2.hashCode())); + assertThat(filter1.getPath(), is(filter2.getPath())); + assertThat(filter1.getValid(), is(filter2.getValid())); + assertThat(filter1.toString(), is(filter2.toString())); + assertTrue(filter1.equals(filter2)); + } + +} diff --git a/src/test/java/org/onap/aai/validation/modeldriven/configuration/mapping/TestModelInstanceMapper.java b/src/test/java/org/onap/aai/validation/modeldriven/configuration/mapping/TestModelInstanceMapper.java new file mode 100644 index 0000000..7c820bb --- /dev/null +++ b/src/test/java/org/onap/aai/validation/modeldriven/configuration/mapping/TestModelInstanceMapper.java @@ -0,0 +1,71 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.modeldriven.configuration.mapping; + +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +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 { + + static { + System.setProperty("APP_HOME", "."); + } + + @Test + public void testAllMethodsToImproveCodeCoverage() { + List<String> valid = new ArrayList<>(); + valid.add("string1"); + Filter filter = new Filter(); + filter.setPath("testPath"); + filter.setValid(valid); + + ValueConfiguration valueConf1 = new ValueConfiguration(); + valueConf1.setFilter(filter); + valueConf1.setId("id"); + valueConf1.setOrigin("testOrigin"); + valueConf1.setRoot("testRoot"); + valueConf1.setValue("testValue"); + + ModelInstanceMapper mapper1 = new ModelInstanceMapper(); + mapper1.setInstance(valueConf1); + mapper1.setMappingType(MappingType.ATTRIBUTE.toString()); + mapper1.setModel(valueConf1); + + ModelInstanceMapper mapper2 = new ModelInstanceMapper(); + mapper2.setInstance(valueConf1); + mapper2.setMappingType(MappingType.ATTRIBUTE.toString()); + mapper2.setModel(valueConf1); + + assertThat(mapper1.hashCode(), is(mapper2.hashCode())); + assertThat(mapper1.getInstance(), is(mapper2.getInstance())); + assertThat(mapper1.getMappingType(), is(mapper2.getMappingType())); + assertThat(mapper1.getModel(), is(mapper2.getModel())); + assertThat(mapper1.toString(), is(mapper2.toString())); + assertTrue(mapper1.equals(mapper2)); + } + +} diff --git a/src/test/java/org/onap/aai/validation/modeldriven/configuration/mapping/TestValueConfiguration.java b/src/test/java/org/onap/aai/validation/modeldriven/configuration/mapping/TestValueConfiguration.java new file mode 100644 index 0000000..80c1ab8 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/modeldriven/configuration/mapping/TestValueConfiguration.java @@ -0,0 +1,70 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.modeldriven.configuration.mapping; + +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +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.ValueConfiguration; + +public class TestValueConfiguration { + + static { + System.setProperty("APP_HOME", "."); + } + + @Test + public void testAllMethodsToImproveCodeCoverage() { + + List<String> valid = new ArrayList<>(); + valid.add("string1"); + Filter filter = new Filter(); + filter.setPath("testPath"); + filter.setValid(valid); + + ValueConfiguration valueConf1 = new ValueConfiguration(); + valueConf1.setFilter(filter); + valueConf1.setId("id"); + valueConf1.setOrigin("testOrigin"); + valueConf1.setRoot("testRoot"); + valueConf1.setValue("testValue"); + + ValueConfiguration valueConf2 = new ValueConfiguration(); + valueConf2.setFilter(filter); + valueConf2.setId("id"); + valueConf2.setOrigin("testOrigin"); + valueConf2.setRoot("testRoot"); + valueConf2.setValue("testValue"); + + assertThat(valueConf1, is(valueConf2)); + assertThat(valueConf1.hashCode(), is(valueConf2.hashCode())); + assertThat(valueConf1.getFilter(), is(valueConf2.getFilter())); + assertThat(valueConf1.getId(), is(valueConf2.getId())); + assertThat(valueConf1.getOrigin(), is(valueConf2.getOrigin())); + assertThat(valueConf1.getRoot(), is(valueConf2.getRoot())); + assertThat(valueConf1.getValue(), is(valueConf2.getValue())); + assertThat(valueConf1.toString(), is(valueConf2.toString())); + assertTrue(valueConf1.equals(valueConf2)); + } + +} diff --git a/src/test/java/org/onap/aai/validation/modeldriven/parser/TestXMLModelParser.java b/src/test/java/org/onap/aai/validation/modeldriven/parser/TestXMLModelParser.java new file mode 100644 index 0000000..3344193 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/modeldriven/parser/TestXMLModelParser.java @@ -0,0 +1,96 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.modeldriven.parser; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import org.dom4j.Element; +import org.dom4j.Node; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.onap.aai.validation.modeldriven.parser.XMLModelParser; + +public class TestXMLModelParser { + + static { + System.setProperty("APP_HOME", "."); + } + + private static final String CONNECTOR_MODEL_ID = "460c6de2-a92b-4e3b-9ba3-538ce782b2fa"; + private static final String MODEL_ID_ATTRIBUTE = "model-name-version-id"; + + private Element modelElement; + + @Rule + public ExpectedException exception = ExpectedException.none(); + + @Before + public void setUp() throws Exception { + File modelFile = new File("src/test/resources/model-validation/model-parser/all-models.xml"); + Element modelsElement = XMLModelParser.parse(modelFile, false); + modelElement = XMLModelParser.getModelElementWithId(modelsElement, MODEL_ID_ATTRIBUTE, CONNECTOR_MODEL_ID); + } + + @Test + public void testParseXMLModelFile() throws Exception { + assertEquals("Invalid model element name.", "model", modelElement.getName()); + } + + @Test + public void testGetAttributes() throws Exception { + String attrsXPath = "metadata/metadatum/metaname"; + List<Node> attrNodes = XMLModelParser.getObjectsFromXPath(modelElement, attrsXPath); + assertEquals("Unexpected number of attributes.", 2, attrNodes.size()); + + List<String> validAttrs = new ArrayList<>(); + validAttrs.add("a"); + validAttrs.add("b"); + + List<String> actualAttrs = new ArrayList<>(); + for (Node node : attrNodes) { + actualAttrs.add(node.getText()); + } + + assertTrue("Unexpected attribute names.", validAttrs.containsAll(actualAttrs)); + } + + @Test + public void testGetRelatedObjects() throws Exception { + String relObjsXPath = "model-elements/model-element"; + 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()); + } + + @Test + public void testModelValidationFailure() throws Exception { + File modelFile = new File("src/test/resources/model-validation/model-parser/all-models.xml"); + + assertNull("Validation failure should result in null being returned.", XMLModelParser.parse(modelFile, true)); + } +} diff --git a/src/test/java/org/onap/aai/validation/modeldriven/validator/TestInstanceReader.java b/src/test/java/org/onap/aai/validation/modeldriven/validator/TestInstanceReader.java new file mode 100644 index 0000000..60588bb --- /dev/null +++ b/src/test/java/org/onap/aai/validation/modeldriven/validator/TestInstanceReader.java @@ -0,0 +1,236 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.modeldriven.validator; + +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; + +import com.google.common.collect.Multimap; +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; +import javax.inject.Inject; +import org.json.JSONArray; +import org.json.JSONObject; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; +import org.onap.aai.validation.exception.ValidationServiceException; +import org.onap.aai.validation.modeldriven.configuration.mapping.ModelInstanceMapper; +import org.onap.aai.validation.modeldriven.validator.InstanceReader; +import org.onap.aai.validation.test.util.TestUtil; +import org.onap.aai.validation.util.JsonUtil; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"}) +@ContextConfiguration(locations = {"classpath:model-validation/instance-reader/test-validation-service-beans.xml"}) +public class TestInstanceReader { + + static { + System.setProperty("APP_HOME", "."); + } + + private static ModelInstanceMapper mapping; + private static ModelInstanceMapper mappingRootUnknown; + private static ModelInstanceMapper mappingRootMissing; + private static String connector; + private static String connectorSibling; + private static String expectedVirtualDataCenter; + private static String expectedVirtualDataCenterModelName; + private static String connectorModelName; + private static String expectedLogicalLink; + private static String expectedGenericVnf; + private static String expectedPserver; + + @Inject + private InstanceReader instanceReader; + + @BeforeClass + public static void setUpBeforeClass() throws Exception { + mapping = TestInstanceReader.getMapping(TestData.MAPPING.getFilename()); + mappingRootUnknown = TestInstanceReader.getMapping(TestData.MAPPING_ROOT_UNKNOWN.getFilename()); + mappingRootMissing = TestInstanceReader.getMapping(TestData.MAPPING_ROOT_MISSING.getFilename()); + connector = TestUtil.getFileAsString(TestData.CONNECTOR.getFilename()); + connectorModelName = TestUtil.getFileAsString(TestData.CONNECTOR_MODEL_NAME.getFilename()); + connectorSibling = TestUtil.getFileAsString(TestData.CONNECTOR_SIBLING.getFilename()); + expectedVirtualDataCenter = TestUtil.getFileAsString(TestData.EXPECTED_VDC.getFilename()); + expectedVirtualDataCenterModelName = TestUtil.getFileAsString(TestData.EXPECTED_VDC_MODEL_NAME.getFilename()); + expectedLogicalLink = TestUtil.getFileAsString(TestData.EXPECTED_LOGICAL_LINK.getFilename()); + expectedGenericVnf = TestUtil.getFileAsString(TestData.EXPECTED_GENERIC_VNF.getFilename()); + expectedPserver = TestUtil.getFileAsString(TestData.EXPECTED_PSERVER.getFilename()); + + } + + enum TestData { + // @formatter:off + MAPPING ("model-validation/instance-reader/model-instance-mapping.json_conf"), + MAPPING_ROOT_UNKNOWN ("model-validation/instance-reader/model-instance-mapping-root-unknown.json_conf"), + MAPPING_ROOT_MISSING ("model-validation/instance-reader/model-instance-mapping-root-missing.json_conf"), + CONNECTOR ("model-validation/instance-reader/connector.json"), + CONNECTOR_MODEL_NAME ("model-validation/instance-reader/connector-model-name.json"), + CONNECTOR_SIBLING ("model-validation/instance-reader/connector-sibling-inventory-items.json"), + EXPECTED_VDC ("model-validation/instance-reader/expected-virtual-data-center.json"), + EXPECTED_VDC_MODEL_NAME ("model-validation/instance-reader/expected-virtual-data-center-model-name.json"), + EXPECTED_LOGICAL_LINK ("model-validation/instance-reader/expected-logical-link.json"), + EXPECTED_GENERIC_VNF ("model-validation/instance-reader/expected-generic-vnf.json"), + EXPECTED_PSERVER ("model-validation/instance-reader/expected-pserver.json"); + + private String filename; + TestData(String filename) {this.filename = filename;} + public String getFilename() {return this.filename;} + // @formatter:on + } + + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Test + public void testGetValuesNoModelName() throws Exception { + // Set expectation + JsonParser jsonParser = new JsonParser(); + JsonElement jsonElement = jsonParser.parse(expectedVirtualDataCenter); + String expectedValue = jsonElement.toString(); + + // Method under test + Multimap<String, String> values = instanceReader.getValues(connector, mapping); + + assertFalse(values.isEmpty()); + assertThat(values.keys().iterator().next(), is(equalTo("virtual-data-center"))); + assertThat(values.get("virtual-data-center").iterator().next(), is(equalTo(expectedValue))); + } + + @Test + public void testGetValuesWithModelName() throws Exception { + // Set expectation + JsonParser jsonParser = new JsonParser(); + JsonElement jsonElement = jsonParser.parse(expectedVirtualDataCenterModelName); + String expectedValue = jsonElement.toString(); + + // Method under test + Multimap<String, String> values = instanceReader.getValues(connectorModelName, mapping); + + assertFalse(values.isEmpty()); + assertThat(values.keys().iterator().next(), is(equalTo("Test VC Model Name"))); + assertThat(values.get("Test VC Model Name").iterator().next(), is(equalTo(expectedValue))); + } + + @Test + public void testNavigateInstance() throws Exception { + // Set expectation + JsonParser jsonParser = new JsonParser(); + JsonElement jsonElement = jsonParser.parse(expectedLogicalLink); + String expectedValue = jsonElement.toString(); + + // Method under test + Multimap<String, String> values = instanceReader.getValues(connector, mapping); + + String virtualDataCenterInstance = values.get("virtual-data-center").iterator().next(); + + // Method under test + values = instanceReader.getValues(virtualDataCenterInstance, mapping); + + assertThat(values.keys().iterator().next(), is(equalTo("Test LL Model Name"))); + assertThat(values.get("Test LL Model Name").iterator().next(), is(equalTo(expectedValue))); + } + + @Test + public void testNavigateInstanceWithSiblingInventoryItems() throws Exception { + // Set expectations + JsonParser jsonParser = new JsonParser(); + JsonElement genericVnfJsonElement = jsonParser.parse(expectedGenericVnf); + String expectedGenericVnf = genericVnfJsonElement.toString(); + + JsonElement pserverJsonElement = jsonParser.parse(expectedPserver); + String expectedPserver = pserverJsonElement.toString(); + + // Method under test + Multimap<String, String> values = instanceReader.getValues(connectorSibling, mapping); + + String virtualDataCenterInstance = values.get("virtual-data-center").iterator().next(); + + // Method under test + values = instanceReader.getValues(virtualDataCenterInstance, mapping); + + String logicalLinkInstance = values.get("Test LL Model Name").iterator().next(); + + // 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(expectedPserver))); + } + + @Test + public void testGetValuesRootUnknown() throws Exception { + Multimap<String, String> values = instanceReader.getValues(connector, mappingRootUnknown); + + assertThat(values.isEmpty(), is(true)); + } + + @Test + public void testGetValuesRootMissing() throws Exception { + thrown.expect(ValidationServiceException.class); + thrown.expectMessage("VS-604"); + + instanceReader.getValues(connector, mappingRootMissing); + } + + @Test + public void testGetInstanceTypeNoModelName() throws Exception { + String instanceType = instanceReader.getInstanceType(connector); + assertThat(instanceType, is("connector")); + } + + @Test + public void testGetModelName() throws Exception { + String instanceType = instanceReader.getModelName(connectorModelName); + assertThat(instanceType, is("Test Connector Model Name")); + } + + @Test + public void testGetInstanceIdNoModelName() throws Exception { + String instanceId = instanceReader.getInstanceId(connector); + assertThat(instanceId, is("c7611ebe-c324-48f1-8085-94aef0c12fd")); + } + + @Test + public void testGetInstanceIdModelName() throws Exception { + String instanceId = instanceReader.getInstanceId(connectorModelName); + assertThat(instanceId, is("c7611ebe-c324-48f1-8085-94aef0c12fd")); + } + + @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); + } +} diff --git a/src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelDrivenValidator.java b/src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelDrivenValidator.java new file mode 100644 index 0000000..cb9de43 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelDrivenValidator.java @@ -0,0 +1,291 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.modeldriven.validator; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder; +import static org.junit.Assert.assertThat; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.inject.Inject; +import org.dom4j.Element; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import org.onap.aai.validation.controller.ValidationController; +import org.onap.aai.validation.modeldriven.ModelCacheManager; +import org.onap.aai.validation.modeldriven.ModelId; +import org.onap.aai.validation.modeldriven.parser.XMLModelParser; +import org.onap.aai.validation.modeldriven.validator.ModelDrivenValidator; +import org.onap.aai.validation.result.ValidationResult; +import org.onap.aai.validation.result.Violation; +import org.onap.aai.validation.test.util.TestUtil; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"}) +@ContextConfiguration(locations = {"classpath:model-validation/instance-validator/test-validation-service-beans.xml"}) +public class TestModelDrivenValidator { + + static { + System.setProperty("APP_HOME", "."); + } + + private static final String RESOURCE_VERSION = "1467975776"; + private static final String MODEL_ID_ATTRIBUTE_MNV = "model-name-version-id"; + private static final String MODEL_ID_ATTRIBUTE_MID = "model-id"; + + @Mock + private ModelCacheManager mockModelCacheManager; + + @InjectMocks + @Inject + private ModelDrivenValidator modelDrivenValidator; + + private String objectInstance; + private String connectorModel; + + enum INSTANCE_VALIDATION_FILE { + // @formatter:off + CONNECTOR_MODEL ("model-validation/instance-validator/connector-widget-id.xml"), + NO_MODEL_ID ("model-validation/instance-validator/connector-instance-no-model-id.json"), + UNKNOWN_MODEL_ID ("model-validation/instance-validator/connector-instance-unknown-model-id.json"), + ERRORS ("model-validation/instance-validator/connector-instance-errors.json"), + MULTIPLE_MISSING_ATTRS ("model-validation/instance-validator/connector-instance-multiple-missing-attrs.json"), + MULTIPLE_UNEXPECTED_ATTRS ("model-validation/instance-validator/connector-instance-multiple-unexpected-attrs.json"), + SUCCESS ("model-validation/instance-validator/connector-instance-success.json"); + // @formatter:on + + private String filename; + + INSTANCE_VALIDATION_FILE(String filename) { + this.filename = filename; + } + + public String getFilename() { + return this.filename; + } + } + + @Before + public void initMocks() { + MockitoAnnotations.initMocks(this); + } + + @Before + public void setUp() throws Exception { + connectorModel = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.CONNECTOR_MODEL.getFilename()); + } + + @Test + public void testValidateInstanceWithoutModelId() throws Exception { + objectInstance = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.NO_MODEL_ID.getFilename()); + + ValidationResult validationResult = modelDrivenValidator.validate(objectInstance).get(0); + assertThatValidationResultIsValid(validationResult, "c7611ebe-c324-48f1-8085-94aef0c12fd", "connector", + "1467975776"); + + Violation violation = validationResult.getViolations().get(0); + Map<String, Object> details = new HashMap<>(); + details.put("No model ID", null); + assertThatViolationIsValid(violation, ValidationController.VALIDATION_ERROR_SEVERITY, details, + "The model [null] could not be found", RESOURCE_VERSION); + } + + @Test + public void testValidateInstanceWithUnknownModelId() throws Exception { + objectInstance = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.UNKNOWN_MODEL_ID.getFilename()); + + Mockito.when(mockModelCacheManager.get(new ModelId(MODEL_ID_ATTRIBUTE_MID, "UNKNOWN-MODEL"))).thenReturn(null); + + ValidationResult validationResult = modelDrivenValidator.validate(objectInstance).get(0); + assertThatValidationResultIsValid(validationResult, "c7611ebe-c324-48f1-8085-94aef0c12fd", "connector", + "1467975776"); + + Violation violation = validationResult.getViolations().get(0); + Map<String, Object> details = new HashMap<>(); + details.put("No model ID", "UNKNOWN-MODEL"); + assertThatViolationIsValid(violation, ValidationController.VALIDATION_ERROR_SEVERITY, details, + "The model [UNKNOWN-MODEL] could not be found", RESOURCE_VERSION); + } + + @Test + public void testValidate() throws Exception { + objectInstance = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.ERRORS.getFilename()); + + Element modelElement = XMLModelParser.parse(connectorModel, true); + + Mockito.when(mockModelCacheManager.get(new ModelId(MODEL_ID_ATTRIBUTE_MID, "connector-widget-id"))) + .thenReturn(modelElement); + Mockito.when(mockModelCacheManager + .get(new ModelId(MODEL_ID_ATTRIBUTE_MNV, "l2-bridge-for-wan-connector-resource-id"))).thenReturn(null); + + ValidationResult validationResult = modelDrivenValidator.validate(objectInstance).get(0); + assertThatValidationResultIsValid(validationResult, "c7611ebe-c324-48f1-8085-94aef0c12fd", "connector", + "1467975776"); + + List<Violation> violations = validationResult.getViolations(); + + assertThat(violations, hasSize(3)); + assertThat(getCategories(violations), + containsInAnyOrder(Arrays.asList("MISSING_ATTR", "UNEXPECTED_ATTR", "UNEXPECTED_REL").toArray())); + + Violation violation = getValidationByCategory(violations, "MISSING_ATTR").get(0); + Map<String, Object> details = new HashMap<>(); + details.put("MISSING ATTR", "product"); + assertThatViolationIsValid(violation, ValidationController.VALIDATION_ERROR_SEVERITY, details, + "Attribute [product] is missing in the object instance", RESOURCE_VERSION); + + violation = getValidationByCategory(violations, "UNEXPECTED_ATTR").get(0); + details = new HashMap<>(); + details.put("UNEXPECTED ATTR", "unexpected"); + assertThatViolationIsValid(violation, ValidationController.VALIDATION_ERROR_SEVERITY, details, + "Attribute [unexpected] should not be present in the object instance", RESOURCE_VERSION); + + violation = getValidationByCategory(violations, "UNEXPECTED_REL").get(0); + details = new HashMap<>(); + Map<String, Object> entityIdmap = new HashMap<>(); + entityIdmap.put("vdc-id", "vdc-01"); + details.put("entityId", entityIdmap); + details.put("modelName", null); + details.put("entityType", "virtual-data-center"); + details.put("UNEXPECTED REL", "logical-link"); + assertThatViolationIsValid(violation, ValidationController.VALIDATION_ERROR_SEVERITY, details, + "Entity [vdc-id=vdc-01] of type [virtual-data-center] must not be related to [logical-link]", + RESOURCE_VERSION); + } + + @Test + public void testValidateMultipleMissingAttrs() throws Exception { + objectInstance = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.MULTIPLE_MISSING_ATTRS.getFilename()); + + Element modelElement = XMLModelParser.parse(connectorModel, true); + + Mockito.when(mockModelCacheManager.get(new ModelId(MODEL_ID_ATTRIBUTE_MID, "connector-widget-id"))) + .thenReturn(modelElement); + Mockito.when(mockModelCacheManager + .get(new ModelId(MODEL_ID_ATTRIBUTE_MNV, "l2-bridge-for-wan-connector-resource-id"))).thenReturn(null); + + List<Violation> violations = modelDrivenValidator.validate(objectInstance).get(0).getViolations(); + + assertThat(violations, hasSize(2)); + assertThat(getCategories(violations), + containsInAnyOrder(Arrays.asList("MISSING_ATTR", "MISSING_ATTR").toArray())); + + List<Violation> missingAttrValidations = getValidationByCategory(violations, "MISSING_ATTR"); + String detailsAsString = getDetails(missingAttrValidations).toString(); + assertThat(detailsAsString, containsString("{MISSING ATTR=product}")); + assertThat(detailsAsString, containsString("{MISSING ATTR=vpn-id}")); + } + + @Test + public void testValidateMultipleUnexpectedAttrs() throws Exception { + objectInstance = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.MULTIPLE_UNEXPECTED_ATTRS.getFilename()); + + Element modelElement = XMLModelParser.parse(connectorModel, true); + + Mockito.when(mockModelCacheManager.get(new ModelId(MODEL_ID_ATTRIBUTE_MID, "connector-widget-id"))) + .thenReturn(modelElement); + Mockito.when(mockModelCacheManager + .get(new ModelId(MODEL_ID_ATTRIBUTE_MNV, "l2-bridge-for-wan-connector-resource-id"))).thenReturn(null); + + List<Violation> violations = modelDrivenValidator.validate(objectInstance).get(0).getViolations(); + + assertThat(violations, hasSize(2)); + assertThat(getCategories(violations), + containsInAnyOrder(Arrays.asList("UNEXPECTED_ATTR", "UNEXPECTED_ATTR").toArray())); + + List<Violation> missingAttrViolations = getValidationByCategory(violations, "UNEXPECTED_ATTR"); + String detailsAsString = getDetails(missingAttrViolations).toString(); + assertThat(detailsAsString, containsString("{UNEXPECTED ATTR=city}")); + assertThat(detailsAsString, containsString("{UNEXPECTED ATTR=state}")); + } + + @Test + public void testValidateSuccess() throws Exception { + objectInstance = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.SUCCESS.getFilename()); + + Element modelElement = XMLModelParser.parse(connectorModel, true); + + Mockito.when(mockModelCacheManager.get(new ModelId(MODEL_ID_ATTRIBUTE_MID, "connector-widget-id"))) + .thenReturn(modelElement); + Mockito.when(mockModelCacheManager + .get(new ModelId(MODEL_ID_ATTRIBUTE_MNV, "l2-bridge-for-wan-connector-resource-id"))).thenReturn(null); + + List<Violation> violations = modelDrivenValidator.validate(objectInstance).get(0).getViolations(); + + assertThat(violations, is(empty())); + } + + private void assertThatValidationResultIsValid(ValidationResult validationResult, String entityInstanceId, + String entityType, String resourceVersion) { + assertThat( + validationResult.getEntityId().getAsJsonObject().entrySet().iterator().next().getValue().getAsString(), + is(equalTo(entityInstanceId))); + assertThat(validationResult.getEntityType(), is(equalTo(entityType))); + assertThat(validationResult.getResourceVersion(), is(equalTo(resourceVersion))); + } + + private void assertThatViolationIsValid(Violation violation, String severity, Map<String, Object> violationDetails, + String errorMessage, String resourceVersion) { + assertThat(violation.getSeverity(), is(equalTo(severity))); + assertThat(violation.getViolationType(), is(equalTo("Model"))); + assertThat(violation.getViolationDetails(), is(equalTo(violationDetails))); + assertThat(violation.getErrorMessage(), is(equalTo(errorMessage))); + } + + private List<String> getCategories(List<Violation> validations) { + List<String> categories = new ArrayList<>(); + for (Violation validation : validations) { + categories.add(validation.getCategory()); + } + return categories; + } + + private List<Map<String, Object>> getDetails(List<Violation> validations) { + List<Map<String, Object>> details = new ArrayList<>(); + for (Violation validation : validations) { + details.add(validation.getViolationDetails()); + } + return details; + } + + private List<Violation> getValidationByCategory(List<Violation> validations, String category) { + List<Violation> validationsByCategory = new ArrayList<>(); + for (Violation validation : validations) { + if (category.equals(validation.getCategory())) { + validationsByCategory.add(validation); + } + } + return validationsByCategory; + } +} diff --git a/src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelReader.java b/src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelReader.java new file mode 100644 index 0000000..d974ca2 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelReader.java @@ -0,0 +1,261 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.modeldriven.validator; + +import static org.hamcrest.Matchers.arrayContainingInAnyOrder; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; + +import com.google.common.collect.Multimap; +import java.io.File; +import java.util.Collection; +import java.util.List; +import java.util.Map.Entry; +import javax.inject.Inject; +import org.dom4j.Element; +import org.dom4j.Node; +import org.json.JSONArray; +import org.json.JSONObject; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.aai.validation.exception.ValidationServiceException; +import org.onap.aai.validation.modeldriven.ModelCacheManager; +import org.onap.aai.validation.modeldriven.configuration.mapping.ModelInstanceMapper; +import org.onap.aai.validation.modeldriven.parser.XMLModelParser; +import org.onap.aai.validation.modeldriven.validator.ModelReader; +import org.onap.aai.validation.test.util.TestUtil; +import org.onap.aai.validation.util.JsonUtil; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = {"classpath:model-validation/model-reader/test-validation-service-beans.xml"}) +public class TestModelReader { + + static { + System.setProperty("APP_HOME", "."); + } + + private Element modelElement; + private ModelInstanceMapper mapping; + + @Inject + private ModelCacheManager cache; + + @Test + public void testGetValues() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-attributes-1.json"); + modelElement = XMLModelParser + .parse(new File("src/test/resources/model-validation/model-reader/connector-widget-id.xml"), false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + assertThat(values.entries().size(), is(2)); + assertThat(values.containsEntry("product", null), is(true)); + assertThat(values.containsEntry("vpn-id", null), is(true)); + } + + /** + * @throws Exception + */ + @Test(expected = ValidationServiceException.class) + public void testGetValuesWithUnknownPath() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-attributes-2.json"); + modelElement = XMLModelParser + .parse(new File("src/test/resources/model-validation/model-reader/connector-widget-id.xml"), false); + + ModelReader.getValues(modelElement, mapping, cache); + } + + @Test + public void testGetValuesSingleModel() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships.json"); + modelElement = XMLModelParser + .parse(new File("src/test/resources/model-validation/model-reader/connector-widget-id.xml"), false); + + List<Node> expectedModels = XMLModelParser.getObjectsFromXPath(modelElement, mapping.getModel().getRoot()); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + Collection<Entry<String, Node>> entries = values.entries(); + assertThat(entries.size(), is(1)); + assertThat(values.containsEntry("virtual-data-center", expectedModels.get(0)), is(true)); + } + + @Test + public void testGetValuesMultipleModels() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships.json"); + modelElement = XMLModelParser + .parse(new File("src/test/resources/model-validation/model-reader/logical-link-widget-id.xml"), false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + assertThat(values.keys().toArray(new String[] {}), arrayContainingInAnyOrder(new String[] {"logical-link",})); + + values = ModelReader.getValues(values.values().iterator().next(), mapping, cache); + + assertThat(values.keys().toArray(new String[] {}), + arrayContainingInAnyOrder(new String[] {"pBgf", "vDbe", "ipe", "vSbg",})); + } + + @Test + public void testGetValuesCurrentModelNoChildrenNoValues() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships.json"); + modelElement = XMLModelParser.parse( + new File("src/test/resources/model-validation/model-reader/connector-widget-id-no-children-1.xml"), + false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + assertThat(values.isEmpty(), is(true)); + } + + @Test + public void testGetValuesCurrentModelNoChildrenWithValues() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships.json"); + modelElement = XMLModelParser.parse( + new File("src/test/resources/model-validation/model-reader/connector-widget-id-no-children-2.xml"), + false); + + Multimap<String, Node> parentValues = ModelReader.getValues(modelElement, mapping, cache); + + Multimap<String, Node> childValues = + ModelReader.getValues(parentValues.entries().iterator().next().getValue(), mapping, cache); + + assertThat(childValues.isEmpty(), is(true)); + } + + @Test + public void testResourceModelType() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships.json"); + modelElement = XMLModelParser.parse( + new File("src/test/resources/model-validation/model-reader/virtual-data-center-widget-id.xml"), false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + assertThat(values.keys().toArray(new String[] {}), + arrayContainingInAnyOrder(new String[] {"l2-bridge-for-wan-connector",})); + } + + @Test + public void testRootWithInvalidPath() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships-root-1.json"); + modelElement = XMLModelParser.parse( + new File("src/test/resources/model-validation/model-reader/virtual-data-center-widget-id.xml"), false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + assertThat(values.entries(), is(empty())); + } + + @Test + public void testRootMissing() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships-root-2.json"); + modelElement = XMLModelParser.parse( + new File("src/test/resources/model-validation/model-reader/virtual-data-center-widget-id.xml"), false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + assertThat(values.entries(), is(empty())); + } + + @Test + public void testFilterWithInvalidType() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships-filter-1.json"); + modelElement = XMLModelParser + .parse(new File("src/test/resources/model-validation/model-reader/connector-widget-id.xml"), false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + assertThat(values.entries(), is(empty())); + } + + @Test + public void testFilterWithEmptyArray() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships-filter-2.json"); + modelElement = XMLModelParser.parse( + new File("src/test/resources/model-validation/model-reader/virtual-data-center-widget-id.xml"), false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + assertThat(values.entries(), is(empty())); + } + + @Test + public void testFilterWithMissingValidProperty() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships-filter-3.json"); + modelElement = XMLModelParser.parse( + new File("src/test/resources/model-validation/model-reader/virtual-data-center-widget-id.xml"), false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + assertThat(values.entries(), is(empty())); + } + + @Test + public void testFilterWithInvalidPath() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships-filter-4.json"); + modelElement = XMLModelParser.parse( + new File("src/test/resources/model-validation/model-reader/virtual-data-center-widget-id.xml"), false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + assertThat(values.entries(), is(empty())); + } + + @Test + public void testFilterWithMissingPath() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships-filter-5.json"); + modelElement = XMLModelParser.parse( + new File("src/test/resources/model-validation/model-reader/virtual-data-center-widget-id.xml"), false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + assertThat(values.entries(), is(empty())); + } + + @Test + public void testFilterMissing() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships-filter-6.json"); + modelElement = XMLModelParser.parse( + new File("src/test/resources/model-validation/model-reader/virtual-data-center-widget-id.xml"), false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + assertThat(values.keys().toArray(new String[] {}), + arrayContainingInAnyOrder(new String[] {"l2-bridge-for-wan-connector"})); + } + + @Test + public void testGetValuesWithMultipleModelFetch() throws Exception { + mapping = getMapping("model-validation/model-reader/model-instance-mapping-relationships-with-id.json"); + modelElement = XMLModelParser + .parse(new File("src/test/resources/model-validation/model-reader/connector-widget-id.xml"), false); + + Multimap<String, Node> values = ModelReader.getValues(modelElement, mapping, cache); + + assertThat(values.entries(), is(empty())); + } + + private 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); + } +} diff --git a/src/test/java/org/onap/aai/validation/publisher/MockEventPublisher.java b/src/test/java/org/onap/aai/validation/publisher/MockEventPublisher.java new file mode 100644 index 0000000..d1cfae0 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/publisher/MockEventPublisher.java @@ -0,0 +1,72 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.publisher; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.util.Collection; +import org.onap.aai.validation.exception.ValidationServiceException; +import org.onap.aai.validation.publisher.MessagePublisher; +import org.onap.aai.validation.result.ValidationResult; +import org.onap.aai.validation.test.util.TestEntity; +import org.onap.aai.validation.test.util.ValidationResultIsEqual; + +/** + * Will be injected by Spring + * + */ +public class MockEventPublisher implements MessagePublisher { + + private ValidationResult expectedValidationResult; + private String testDescription; + private boolean publishedMessage; + + public MockEventPublisher() { + // Deliberately empty - no configuration needed + } + + public void setTestEntity(TestEntity entity) throws URISyntaxException, IOException { + this.expectedValidationResult = entity.getExpectedValidationResult(); + this.publishedMessage = false; + } + + public void setTestDescription(String testDescription) { + this.testDescription = testDescription; + } + + @Override + public void publishMessage(String message) throws ValidationServiceException { + ValidationResult validationResult = ValidationResult.fromJson(message); + assertThat(testDescription, validationResult, is(ValidationResultIsEqual.equalTo(expectedValidationResult))); + publishedMessage = true; + } + + @Override + public void publishMessages(Collection<String> messages) throws ValidationServiceException { + for (String message : messages) { + publishMessage(message); + } + } + + public boolean processedSuccessfully() { + return publishedMessage || expectedValidationResult == null; + } +} diff --git a/src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java b/src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java new file mode 100644 index 0000000..8950e63 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java @@ -0,0 +1,102 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.publisher; + +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import org.onap.aai.event.client.DMaaPEventPublisher; +import org.onap.aai.validation.config.TopicAdminConfig; +import org.onap.aai.validation.config.TopicConfig; +import org.onap.aai.validation.config.TopicConfig.Topic; +import org.onap.aai.validation.factory.DMaaPEventPublisherFactory; +import org.onap.aai.validation.publisher.ValidationEventPublisher; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mockito; +import org.mockito.runners.MockitoJUnitRunner; + +@RunWith(MockitoJUnitRunner.class) +public class TestValidationEventPublisher { + + static { + System.setProperty("APP_HOME", "."); + System.setProperty("consumer.topic.names", "poa-rule-validation"); + System.setProperty("publisher.topic.names", "poa-audit-result"); + } + + private DMaaPEventPublisher mockEventPublisher; + private ValidationEventPublisher validationEventPublisher; + private List<Topic> topicList = new ArrayList<>(); + + @Before + public void setUp() throws Exception { + TopicConfig mockTopicConfig = Mockito.mock(TopicConfig.class); + TopicAdminConfig mockTopicAdminConfig = Mockito.mock(TopicAdminConfig.class); + when(mockTopicAdminConfig.isPublishEnable()).thenReturn(true); + + Topic topic1 = new TopicConfig("poa-rule-validation","poa-audit-result").new Topic(); + topic1.setName("aai-data-integrity"); + topic1.setHost("integrity-dummy-host"); + topic1.setPartition("integrity-dummy-partition"); + topic1.setUsername("integrity-dummy-username"); + topic1.setPassword("integrity-dummy-password"); + topic1.setTransportType("integrity-dummy-transport-type"); + topicList.add(topic1); + + when(mockTopicConfig.getPublisherTopics()).thenReturn(topicList); + validationEventPublisher = new ValidationEventPublisher(mockTopicConfig, mockTopicAdminConfig); + + mockEventPublisher = Mockito.mock(DMaaPEventPublisher.class); + when(mockEventPublisher.closeWithUnsent()).thenReturn(new ArrayList<>()); + + DMaaPEventPublisherFactory mockEventPublisherFactory = Mockito.mock(DMaaPEventPublisherFactory.class); + when(mockEventPublisherFactory.createEventPublisher(any(), any(), any(), any(), any())) + .thenReturn(mockEventPublisher); + + validationEventPublisher.setEventPublisherFactory(mockEventPublisherFactory); + } + + @Test + public void testPublishMessages() throws Exception { + Collection<String> messages = new ArrayList<>(); + messages.add("first test message"); + messages.add("second test message"); + when(mockEventPublisher.sendSync(any(String.class), Mockito.<Collection<String>>any())).thenReturn(2); + + validationEventPublisher.publishMessages(messages); + verify(mockEventPublisher, times(1)).sendSync(topicList.get(0).getPartition(), messages); + } + + @Test + public void testPublishMessage() throws Exception { + Collection<String> messages = new ArrayList<>(); + messages.add("first test message"); + when(mockEventPublisher.sendSync(any(String.class), Mockito.<Collection<String>>any())).thenReturn(1); + + validationEventPublisher.publishMessage(messages.iterator().next()); + verify(mockEventPublisher, times(1)).sendSync(topicList.get(0).getPartition(), messages); + } + +} diff --git a/src/test/java/org/onap/aai/validation/reader/TestEventReader.java b/src/test/java/org/onap/aai/validation/reader/TestEventReader.java new file mode 100644 index 0000000..a41eb76 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/reader/TestEventReader.java @@ -0,0 +1,270 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.reader; + +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; + +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; +import javax.inject.Inject; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.aai.validation.exception.ValidationServiceException; +import org.onap.aai.validation.reader.EventReader; +import org.onap.aai.validation.reader.data.Entity; +import org.onap.aai.validation.reader.data.EntityId; +import org.onap.aai.validation.test.util.TestUtil; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"}) +@ContextConfiguration(locations = {"classpath:event-reader/test-validation-service-beans.xml"}) +public class TestEventReader { + + static { + System.setProperty("APP_HOME", "."); + } + + @Inject + private EventReader eventReader; + + private static String vserverEvent; + private static String genericVnfEvent; + private static String invalidEvent1; + private static String invalidEvent2; + private static String invalidEvent3; + private static String invalidEvent4; + private static String invalidEvent5; + + @BeforeClass + public static void setUpBeforeClass() throws Exception { + vserverEvent = TestUtil.getFileAsString(TestData.VSERVER.getFilename()); + genericVnfEvent = TestUtil.getFileAsString(TestData.GENERIC_VNF.getFilename()); + invalidEvent1 = TestUtil.getFileAsString(TestData.INVALID_1.getFilename()); + invalidEvent2 = TestUtil.getFileAsString(TestData.INVALID_2.getFilename()); + invalidEvent3 = TestUtil.getFileAsString(TestData.INVALID_3.getFilename()); + invalidEvent4 = TestUtil.getFileAsString(TestData.INVALID_4.getFilename()); + invalidEvent5 = TestUtil.getFileAsString(TestData.INVALID_5.getFilename()); + } + + enum TestData { + // @formatter:off + VSERVER ("event-reader/vserver-create-event.json"), + GENERIC_VNF ("event-reader/generic-vnf-create-event.json"), + INVALID_1 ("event-reader/invalid-event-1.json"), + INVALID_2 ("event-reader/invalid-event-2.json"), + INVALID_3 ("event-reader/invalid-event-3.json"), + INVALID_4 ("event-reader/invalid-event-4.json"), + INVALID_5 ("event-reader/invalid-event-5.json"); + + private String filename; + TestData(String filename) {this.filename = filename;} + public String getFilename() {return this.filename;} + // @formatter:on + } + + @Test + public void testGetEventDomain() throws Exception { + Optional<String> eventType = eventReader.getEventDomain(vserverEvent); + + assertThat(eventType.get(), is("devINT1")); + } + + @Test + public void testGetEventAction() throws Exception { + Optional<String> action = eventReader.getEventAction(vserverEvent); + + assertThat(action.get(), is("CREATE")); + } + + @Test + public void testGetEventType() throws Exception { + Optional<String> eventType = eventReader.getEventType(vserverEvent); + + assertThat(eventType.isPresent(), is(true)); + assertThat(eventType.get(), is("AAI-EVENT")); + } + + @Test(expected = ValidationServiceException.class) + public void testGetEventTypeMalformedJson() throws Exception { + eventReader.getEventType("this is malformed"); + } + + @Test + public void testGetEventTypeFromUnrecognisableEvent() throws Exception { + Optional<String> eventType = eventReader.getEventType("this-is-not-an-event-but-is-valid-json"); + + assertThat(eventType.isPresent(), is(false)); + } + + @Test + public void testGetEventTypeThatIsMissing() throws Exception { + Optional<String> eventType = eventReader.getEventType(invalidEvent1); + + assertThat(eventType.isPresent(), is(false)); + } + + @Test + public void testGetEntityType() throws Exception { + Optional<String> entityType = eventReader.getEntityType(vserverEvent); + + assertThat(entityType.get(), is("vserver")); + } + + @Test + public void testGetEntity() throws Exception { + Entity entity = eventReader.getEntity(genericVnfEvent); + + assertThat(entity.getType(), is("generic-vnf")); + + // Dig deeper to check we have the object we want + JsonParser parser = new JsonParser(); + JsonElement jsonElement = parser.parse(entity.getJson()); + String id = jsonElement.getAsJsonObject().get("vnf-id").getAsString(); + + assertThat(id, is("VAPP-1581")); + } + + @Test + public void testEntityLink() throws Exception { + Entity entity = eventReader.getEntity(vserverEvent); + + assertThat(entity.getEntityLink(), is( + "cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666")); + } + + @Test(expected = ValidationServiceException.class) + public void testGetEntityWithMissingEntityType() throws Exception { + eventReader.getEntity(invalidEvent1); + } + + @Test(expected = ValidationServiceException.class) + public void testGetEntityWithUnknownEntityType() throws Exception { + eventReader.getEntity(invalidEvent2); + } + + @Test + public void testGetNestedEntity() throws Exception { + Entity entity = eventReader.getEntity(vserverEvent); + + assertThat(entity.getType(), is("vserver")); + + // Dig deeper to check we have the object we want + JsonParser parser = new JsonParser(); + JsonElement jsonElement = parser.parse(entity.getJson()); + String id = jsonElement.getAsJsonObject().get("vserver-id").getAsString(); + + assertThat(id, is("example-vserver-id-val-34666")); + } + + @Test(expected = ValidationServiceException.class) + public void testTooManyNestedEntitiesThrowsException() throws Exception { + eventReader.getEntity(invalidEvent4); + } + + @Test + public void testGetEntityIds() throws Exception { + Entity entity = eventReader.getEntity(vserverEvent); + + List<EntityId> ids = entity.getIds(); + + assertThat(ids, hasSize(1)); + EntityId entityId = ids.get(0); + + assertThat(entityId.getPrimaryKey(), is("vserver-id")); + assertThat(entityId.getValue(), is("example-vserver-id-val-34666")); + } + + @Test + public void testCompareEntityIds() throws Exception { + EntityId entityId = new EntityId(); + assertThat(entityId, is(not(equalTo(null)))); + + entityId.setPrimaryKey("key"); + assertThat(entityId, is(not(equalTo(null)))); + entityId.setValue("value"); + assertThat(entityId, is(not(equalTo(null)))); + + EntityId other = new EntityId(); + assertThat(entityId, is(not(equalTo(other)))); + + other.setPrimaryKey("key"); + assertThat(entityId, is(not(equalTo(other)))); + + other.setValue("value"); + assertThat(entityId, is(equalTo(other))); + + // Force call to hashCode() + assertThat(entityId.hashCode(), is(equalTo(other.hashCode()))); + } + + @Test + public void testGetEntityIdsForUnknownEntityType() throws Exception { + Entity entity = eventReader.getEntity(invalidEvent3); + + List<EntityId> ids = entity.getIds(); + + assertThat(ids, is(empty())); + } + + @Test + public void testGetResourceVersion() throws Exception { + Entity entity = eventReader.getEntity(vserverEvent); + + Optional<String> resourceVersion = entity.getResourceVersion(); + + assertThat(resourceVersion.isPresent(), is(true)); + assertThat(resourceVersion.get(), is("1464193654")); + } + + @Test + public void testGetResourceVersionMissing() throws Exception { + Entity entity = eventReader.getEntity(invalidEvent5); + + Optional<String> resourceVersion = entity.getResourceVersion(); + assertThat(resourceVersion.isPresent(), is(false)); + } + + @Test + public void testGetProperty() throws Exception { + Entity entity = eventReader.getEntity(vserverEvent); + + String resourceVersion = (String) entity.getAttributeValues(Arrays.asList("prov-status")).get("prov-status"); + + assertThat(resourceVersion, is("PREPROV")); + } + + @Test + 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")); + } +} diff --git a/src/test/java/org/onap/aai/validation/reader/TestJsonReader.java b/src/test/java/org/onap/aai/validation/reader/TestJsonReader.java new file mode 100644 index 0000000..e7a906a --- /dev/null +++ b/src/test/java/org/onap/aai/validation/reader/TestJsonReader.java @@ -0,0 +1,95 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.reader; + +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; + +import java.util.Arrays; +import java.util.List; +import org.junit.Test; +import org.onap.aai.validation.reader.JsonReader; +import org.onap.aai.validation.test.util.TestUtil; + +public class TestJsonReader { + + static { + System.setProperty("APP_HOME", "."); + } + + enum TestData { + // @formatter:off + SAMPLE_JSON ("json-reader/sample.json"); + + private String filename; + TestData(String filename) {this.filename = filename;} + public String getFilename() {return this.filename;} + // @formatter:on + } + + @Test + public void testGetString() throws Exception { + String json = TestUtil.getFileAsString(TestData.SAMPLE_JSON.getFilename()); + JsonReader jsonReader = new JsonReader(); + List<String> result = jsonReader.get(json, "$.event-header.entity-type"); + assertThat(result.get(0), is("vserver")); + } + + @Test + public void testGetInteger() throws Exception { + String json = TestUtil.getFileAsString(TestData.SAMPLE_JSON.getFilename()); + JsonReader jsonReader = new JsonReader(); + List<String> result = jsonReader.get(json, "$.event-header.sample-integer"); + assertThat(result.get(0), is("1")); + } + + @Test + public void testGetBoolean() throws Exception { + String json = TestUtil.getFileAsString(TestData.SAMPLE_JSON.getFilename()); + JsonReader jsonReader = new JsonReader(); + List<String> result = jsonReader.get(json, "$.event-header.sample-boolean"); + assertThat(result.get(0), is("true")); + } + + @Test + public void testGetObjectAsString() throws Exception { + String json = TestUtil.getFileAsString(TestData.SAMPLE_JSON.getFilename()); + JsonReader jsonReader = new JsonReader(); + List<String> result = jsonReader.get(json, "$.event-header.sample-object"); + + assertThat(result.get(0), is("{\"property\":\"value\"}")); + } + + @Test + public void testGetArrayAsString() throws Exception { + String json = TestUtil.getFileAsString(TestData.SAMPLE_JSON.getFilename()); + JsonReader jsonReader = new JsonReader(); + List<String> result = jsonReader.get(json, "$.event-header.sample-array"); + + assertThat(result, is(Arrays.asList("one"))); + } + + @Test + public void testGetWithInvalidPath() throws Exception { + String json = TestUtil.getFileAsString(TestData.SAMPLE_JSON.getFilename()); + JsonReader jsonReader = new JsonReader(); + List<String> result = jsonReader.get(json, "$.unknown"); + assertThat(result, empty()); + } +} diff --git a/src/test/java/org/onap/aai/validation/reader/TestOxmConfigTranslator.java b/src/test/java/org/onap/aai/validation/reader/TestOxmConfigTranslator.java new file mode 100644 index 0000000..73e76db --- /dev/null +++ b/src/test/java/org/onap/aai/validation/reader/TestOxmConfigTranslator.java @@ -0,0 +1,111 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.reader; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.Matchers.isEmptyString; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertThat; + +import java.nio.file.InvalidPathException; +import java.util.List; +import java.util.Map; +import java.util.ServiceConfigurationError; +import org.junit.Test; +import org.onap.aai.setup.SchemaLocationsBean; +import org.onap.aai.setup.Version; +import org.onap.aai.validation.reader.OxmConfigTranslator; +import org.springframework.test.util.ReflectionTestUtils; + +public class TestOxmConfigTranslator { + + static { + System.setProperty("APP_HOME", "."); + } + + @Test + public void testOxmFiles() { + OxmConfigTranslator translator = buildConfigTranslator("src/test/resources/oxm-reader/single/"); + Map<Version, List<String>> latestVersion = translator.getNodeFiles(); + assertThat(latestVersion.size(), is(3)); + assertThat(latestVersion.values().iterator().next().size(), is(1)); + assertThat(latestVersion.values().iterator().next().get(0), not(isEmptyString())); + Map<Version, List<String>> latestVersion1 = translator.getEdgeFiles(); + assertThat(latestVersion1.size(), is(1)); + assertThat(latestVersion1.values().iterator().next().size(), is(1)); + assertThat(latestVersion1.values().iterator().next().get(0), not(isEmptyString())); + } + + @Test + public void testMultipleOxmFilesPerVersion() { + OxmConfigTranslator translator = buildConfigTranslator("src/test/resources/oxm-reader/multiple"); + Map<Version, List<String>> latestVersion = translator.getNodeFiles(); + assertThat(latestVersion.size(), is(2)); + assertThat(latestVersion.values().iterator().next().size(), is(2)); + assertThat(latestVersion.values().iterator().next().get(0), not(isEmptyString())); + Map<Version, List<String>> latestVersion1 = translator.getEdgeFiles(); + assertThat(latestVersion1.size(), is(0)); + } + + @Test + public void testZeroMatchingFiles() { + OxmConfigTranslator translator = buildConfigTranslator("src/test/resources/oxm-reader/"); + Map<Version, List<String>> versionsMap = translator.getNodeFiles(); + assertThat(versionsMap.size(), is(0)); + } + + @Test(expected = ServiceConfigurationError.class) + public void testNullNodesPath() { + buildConfigTranslator(null).getNodeFiles(); + } + + @Test(expected = ServiceConfigurationError.class) + public void testNullEdgesPath() { + buildConfigTranslator(null).getEdgeFiles(); + } + + @Test(expected = ServiceConfigurationError.class) + public void testNonExistentNodesPath() { + buildConfigTranslator("no-such-folder-exists/").getNodeFiles(); + } + + @Test(expected = ServiceConfigurationError.class) + public void testNonExistentEdgesPath() { + SchemaLocationsBean bean = new SchemaLocationsBean(); + ReflectionTestUtils.setField(bean, "nodeDirectory", "src/test/resources/oxm-reader/"); + ReflectionTestUtils.setField(bean, "edgeDirectory", "no-such-folder-exists/"); + new OxmConfigTranslator(bean).getEdgeFiles(); + } + + @Test(expected = InvalidPathException.class) + public void testInvalidPath() { + buildConfigTranslator("\0").getEdgeFiles(); + } + + private OxmConfigTranslator buildConfigTranslator(String path) { + return new OxmConfigTranslator(createSchemaLocationsBean(path)); + } + + private SchemaLocationsBean createSchemaLocationsBean(String path) { + SchemaLocationsBean bean = new SchemaLocationsBean(); + ReflectionTestUtils.setField(bean, "nodeDirectory", path); + ReflectionTestUtils.setField(bean, "edgeDirectory", path); + return bean; + } + +} diff --git a/src/test/java/org/onap/aai/validation/reader/TestOxmReader.java b/src/test/java/org/onap/aai/validation/reader/TestOxmReader.java new file mode 100644 index 0000000..f7f2643 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/reader/TestOxmReader.java @@ -0,0 +1,63 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.reader; + +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; + +import java.util.List; +import javax.inject.Inject; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.aai.validation.reader.OxmReader; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"}) +@ContextConfiguration(locations = {"classpath:oxm-reader/oxm-reader-beans.xml"}) +public class TestOxmReader { + + static { + System.setProperty("APP_HOME", "."); + } + + @Inject + private OxmReader oxmReader; + + @Test + public void testGetPrimaryKeysSingleKey() throws Exception { + List<String> primaryKeys = oxmReader.getPrimaryKeys("connector"); + assertThat(primaryKeys.get(0), is("resource-instance-id")); + } + + @Test + public void testGetPrimaryKeysMultipleKeys() throws Exception { + List<String> primaryKeys = oxmReader.getPrimaryKeys("cloud-region"); + assertThat(primaryKeys, contains("cloud-owner", "cloud-region-id")); + } + + @Test + public void testGetPrimaryKeysUnknownObject() throws Exception { + List<String> primaryKeys = oxmReader.getPrimaryKeys("most-surely-does-not-exist"); + assertThat(primaryKeys, empty()); + } +} diff --git a/src/test/java/org/onap/aai/validation/request/TestRequestHeaders.java b/src/test/java/org/onap/aai/validation/request/TestRequestHeaders.java new file mode 100644 index 0000000..b9ff07c --- /dev/null +++ b/src/test/java/org/onap/aai/validation/request/TestRequestHeaders.java @@ -0,0 +1,143 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.request; + +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.nullValue; +import static org.junit.Assert.assertThat; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map.Entry; +import javax.ws.rs.core.MultivaluedHashMap; +import org.junit.Test; +import org.mockito.Mockito; +import org.onap.aai.validation.services.RequestHeaders; +import org.springframework.http.HttpHeaders; + +/** + * Test the RequestHeaders class. + * + */ +public class TestRequestHeaders { + + static { + System.setProperty("APP_HOME", "."); + } + + @Test + public void testONAPHeaders() { + String transactionId = "transaction-id"; + String serviceInstanceId = "service-instance-id"; + + MultivaluedHashMap<String, String> headersMap = new MultivaluedHashMap<>(); + headersMap.put(RequestHeaders.HEADER_REQUEST_ID, createSingletonList(transactionId)); + headersMap.put(RequestHeaders.HEADER_SERVICE_INSTANCE_ID, createSingletonList(serviceInstanceId)); + headersMap.put("X-FromAppId", createSingletonList("app-id")); + headersMap.put("Host", createSingletonList("hostname")); + + HttpHeaders headers = createMockedHeaders(headersMap); + RequestHeaders requestHeaders = new RequestHeaders(headers); + assertThat(requestHeaders.getRequestId(), is(equalTo(transactionId))); + assertThat(requestHeaders.getInstanceId(), is(equalTo(serviceInstanceId))); + } + + @Test + public void testMultipleHeaderValues() { + String transactionId = "transaction-id"; + String serviceInstanceId = "service-instance-id"; + + MultivaluedHashMap<String, String> headersMap = new MultivaluedHashMap<>(); + headersMap.put(RequestHeaders.HEADER_REQUEST_ID, Arrays.asList(transactionId, "fred")); + headersMap.put(RequestHeaders.HEADER_SERVICE_INSTANCE_ID, Arrays.asList(serviceInstanceId, "bob")); + + HttpHeaders headers = createMockedHeaders(headersMap); + RequestHeaders requestHeaders = new RequestHeaders(headers); + assertThat(requestHeaders.getRequestId(), is(equalTo(transactionId))); + assertThat(requestHeaders.getInstanceId(), is(equalTo(serviceInstanceId))); + } + + @Test + public void testStandardHeaders() { + MultivaluedHashMap<String, String> headersMap = new MultivaluedHashMap<>(); + headersMap.put("X-TransactionId", createSingletonList("transaction-id")); + headersMap.put("X-FromAppId", createSingletonList("app-id")); + headersMap.put("Host", createSingletonList("hostname")); + + HttpHeaders headers = createMockedHeaders(headersMap); + RequestHeaders requestHeaders = new RequestHeaders(headers); + assertThat(requestHeaders.getRequestId(), is(nullValue())); + assertThat(requestHeaders.getInstanceId(), is(nullValue())); + } + + @Test + public void testEmptyHeaders() { + MultivaluedHashMap<String, String> headersMap = new MultivaluedHashMap<>(); + headersMap.put(RequestHeaders.HEADER_REQUEST_ID, Collections.emptyList()); + headersMap.put(RequestHeaders.HEADER_SERVICE_INSTANCE_ID, Collections.emptyList()); + + HttpHeaders headers = createMockedHeaders(headersMap); + RequestHeaders requestHeaders = new RequestHeaders(headers); + assertThat(requestHeaders.getRequestId(), is(nullValue())); + assertThat(requestHeaders.getInstanceId(), is(nullValue())); + } + + @Test + public void testNullHeaders() { + MultivaluedHashMap<String, String> headersMap = new MultivaluedHashMap<>(); + headersMap.put(RequestHeaders.HEADER_REQUEST_ID, Collections.emptyList()); + + HttpHeaders headers = createMockedHeaders(headersMap); + Mockito.when(headers.getFirst(RequestHeaders.HEADER_SERVICE_INSTANCE_ID)).thenReturn(null); + + RequestHeaders requestHeaders = new RequestHeaders(headers); + assertThat(requestHeaders.getRequestId(), is(nullValue())); + assertThat(requestHeaders.getInstanceId(), is(nullValue())); + } + + @Test + public void testToString() { + String transactionId = "transaction-id"; + String serviceInstanceId = "service-instance-id"; + + MultivaluedHashMap<String, String> headersMap = new MultivaluedHashMap<>(); + headersMap.put(RequestHeaders.HEADER_REQUEST_ID, createSingletonList(transactionId)); + headersMap.put(RequestHeaders.HEADER_SERVICE_INSTANCE_ID, createSingletonList(serviceInstanceId)); + + HttpHeaders headers = createMockedHeaders(headersMap); + RequestHeaders requestHeaders = new RequestHeaders(headers); + assertThat(requestHeaders.toString(), + is(equalTo("RequestHeaders [requestId=transaction-id, instanceId=service-instance-id]"))); + } + + private HttpHeaders createMockedHeaders(MultivaluedHashMap<String, String> headersMap) { + HttpHeaders headers = Mockito.mock(HttpHeaders.class); + for (Entry<String, List<String>> entry : headersMap.entrySet()) { + List<String> valuesList = entry.getValue(); + String value = valuesList == null || valuesList.isEmpty() ? null : valuesList.get(0); + Mockito.when(headers.getFirst(entry.getKey())).thenReturn(value); + } + return headers; + } + + private List<String> createSingletonList(String listItem) { + return Collections.<String>singletonList(listItem); + } +} diff --git a/src/test/java/org/onap/aai/validation/result/TestValidationResult.java b/src/test/java/org/onap/aai/validation/result/TestValidationResult.java new file mode 100644 index 0000000..5d02101 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/result/TestValidationResult.java @@ -0,0 +1,444 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.result; + +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import java.time.Instant; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import javax.inject.Inject; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.aai.validation.exception.ValidationServiceException; +import org.onap.aai.validation.reader.EventReader; +import org.onap.aai.validation.reader.data.Entity; +import org.onap.aai.validation.result.ValidationResult; +import org.onap.aai.validation.result.Violation; +import org.onap.aai.validation.result.Violation.Builder; +import org.onap.aai.validation.result.Violation.ViolationType; +import org.onap.aai.validation.test.util.TestUtil; +import org.onap.aai.validation.util.JsonUtil; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"}) +@ContextConfiguration(locations = {"classpath:validation-result/test-validation-service-beans.xml"}) +public class TestValidationResult { + + static { + System.setProperty("APP_HOME", "."); + } + + @Inject + private EventReader eventReader; + + private static String vserverEvent; + private static Entity entity; + + @BeforeClass + public static void setUpBeforeClass() throws Exception { + vserverEvent = TestUtil.getFileAsString(TestData.VSERVER.getFilename()); + } + + @Before + public void setUp() throws Exception { + entity = eventReader.getEntity(vserverEvent); + } + + enum TestData { + // @formatter:off + VSERVER ("validation-result/vserver-create-event.json"); + + private String filename; + TestData(String filename) {this.filename = filename;} + public String getFilename() {return this.filename;} + // @formatter:on + } + + @Test + public void testValidationResultWithViolationDetailsAsString() throws Exception { + // Violation details + Map<String, Object> violationDetails = new HashMap<>(); + violationDetails.put("attr1", "val1"); + violationDetails.put("attr2", "val2"); + + ValidationResult validationResult = getValidationResult(violationDetails); + ValidationResult transformedVr = toAndFromJson(validationResult); + + assertThatValidationResultIsValid(transformedVr); + Violation v = assertThatViolationIsValid(transformedVr, validationResult.getViolations().get(0)); + assertThat(v.getViolationDetails(), is(violationDetails)); + } + + @Test + public void testValidationResultWithViolationDetailsIncludingNull() throws Exception { + // Violation details + Map<String, Object> violationDetails = new HashMap<>(); + violationDetails.put("attr1", "val1"); + violationDetails.put("attr2", null); + + ValidationResult validationResult = getValidationResult(violationDetails); + ValidationResult transformedVr = toAndFromJson(validationResult); + + // Check + assertThatValidationResultIsValid(transformedVr); + Violation v = assertThatViolationIsValid(transformedVr, validationResult.getViolations().get(0)); + assertThat(v.getViolationDetails(), is(violationDetails)); + } + + @Test + public void testValidationResultWithViolationDetailsAsList() throws Exception { + // Violation details + Map<String, Object> violationDetails = new HashMap<>(); + violationDetails.put("attr1", Arrays.asList("val1", "val2")); + violationDetails.put("attr2", Arrays.asList("val3", "val4")); + + ValidationResult validationResult = getValidationResult(violationDetails); + ValidationResult transformedVr = toAndFromJson(validationResult); + + // Check + assertThatValidationResultIsValid(transformedVr); + Violation v = assertThatViolationIsValid(transformedVr, validationResult.getViolations().get(0)); + assertThat(v.getViolationDetails(), is(violationDetails)); + } + + @Test + public void testValidationResultWithViolationDetailsAsInt() throws Exception { + // Violation details + Map<String, Object> violationDetails = new HashMap<>(); + violationDetails.put("attr1", 1); + violationDetails.put("attr2", 2); + + ValidationResult validationResult = getValidationResult(violationDetails); + ValidationResult vr = toAndFromJson(validationResult); + + // Check + assertThatValidationResultIsValid(vr); + Violation v = assertThatViolationIsValid(vr, validationResult.getViolations().get(0)); + assertThat(v.getViolationDetails().get("attr1"), is(1.0)); + assertThat(v.getViolationDetails().get("attr2"), is(2.0)); + } + + @Test + public void testValidationResultWithViolationDetailsAsObject() throws Exception { + // Violation details + JsonArray jsonArray = new JsonArray(); + jsonArray.add("v1"); + JsonObject jsonObject = new JsonObject(); + jsonObject.add("p1", jsonArray); + jsonObject.add("p2", jsonArray); + Map<String, Object> violationDetails = new HashMap<>(); + violationDetails.put("attr1", jsonObject); + + ValidationResult validationResult = getValidationResult(violationDetails); + ValidationResult transformedVr = toAndFromJson(validationResult); + + // Check + assertThatValidationResultIsValid(transformedVr); + Violation v = assertThatViolationIsValid(transformedVr, validationResult.getViolations().get(0)); + String jsonDetails = v.getViolationDetails().get("attr1").toString(); + JsonParser jsonParser = new JsonParser(); + JsonElement jsonElement = jsonParser.parse(jsonDetails); + assertThat(jsonObject, is(jsonElement)); + } + + @Test + public void testCompareObjects() throws Exception { + ValidationResult validationResult = new ValidationResult(entity); + assertThat(validationResult, is(not(equalTo(null)))); + + validationResult.setEntityId(new JsonObject()); + assertThat(validationResult, is(not(equalTo(null)))); + + ValidationResult other = new ValidationResult(entity); + assertThat(validationResult, is(not(equalTo(other)))); + + validationResult.setEntityType("type"); + assertThat(validationResult, is(not(equalTo(other)))); + + 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 + + validationResult.addViolation(violation); + assertThat(validationResult, is(not(equalTo(other)))); + + // Force call to hashCode() + assertThat(validationResult.hashCode(), is(not(equalTo(other.hashCode())))); + + } + + /** + * Tests for comparing two Violation objects. The generated Violation ID must be deterministic. + * + * @throws Exception + */ + @Test + public void testCompareViolationObjects() throws Exception { + // Use the standard vserver event + Builder builder = new Violation.Builder(entity); + + // Force call to toString() for coverage only + assertThat(builder.toString(), is(equalTo(new Violation.Builder(entity).toString()))); + + // Build a blank violation + Violation violation = builder.build(); + + // Identity tests + assertThat(violation, is(not(equalTo(null)))); + assertThat(violation, is(not(equalTo(1)))); + assertThat(violation, is(equalTo(violation))); + + // Ensure that any violations we build are identical + testViolationIdsForEquality(builder, builder, true); + + // Create a copy of the vserver event and vary the resourceVersion + Entity entity2 = eventReader + .getEntity(vserverEvent.replaceFirst("resource-version\": \"1464193654", "resource-version\": \"123")); + + // The violationId produced for identically built violations is the same for each builder (although the vserver + // events differ). + testViolationIdsForEquality(new Violation.Builder(entity), new Violation.Builder(entity2), true); + + // The violationId produced must differ whenever the violation values differ. + testViolationIdsForInequality(new Violation.Builder(entity), new Violation.Builder(entity2)); + + // Make a new variant of the vserver event using a different entity Id + Entity entity3 = eventReader.getEntity( + vserverEvent.replaceFirst("vserver-id\": \"example-vserver-id-val-34666", "vserver-id\": \"123")); + + // The violationId produced for identically built violations is now different for each builder (because the + // entity Ids differ). + testViolationIdsForEquality(new Violation.Builder(entity), new Violation.Builder(entity3), false); + } + + /** + * Generate various violations using the supplied builders and assert the expected equality of the generated + * Violation IDs whenever the values supplied to the builders are the same. + * + * @param b1 a builder + * @param b2 another builder + * @param expectedResult whether or not the two builders should produce identical violations + * @throws ValidationServiceException + */ + private void testViolationIdsForEquality(Builder b1, Builder b2, Boolean expectedResult) + throws ValidationServiceException { + Violation v1 = b1.build(); + Violation v2 = b2.build(); + assertThatViolationsAreEqual(v1, v2, expectedResult); + + // Use the same category + String category = "INVALID OBJ"; + v1 = b1.category(category).build(); + v2 = b2.category(category).build(); + assertThatViolationsAreEqual(v1, v2, expectedResult); + + // Use the same severity + String severity = "CRITICAL"; + v1 = b1.severity(severity).build(); + v2 = b2.severity(severity).build(); + assertThatViolationsAreEqual(v1, v2, expectedResult); + + // Use the same violation type + v1 = b1.violationType(ViolationType.RULE).build(); + v2 = b2.violationType(ViolationType.RULE).build(); + assertThatViolationsAreEqual(v1, v2, expectedResult); + + // Use the same validation rule + String rule = "prov-status"; + v1 = b1.validationRule(rule).build(); + v2 = b2.validationRule(rule).build(); + assertThatViolationsAreEqual(v1, v2, expectedResult); + + // Use the same error message + String errorMessage = "Invalid prov-status value. Must have a value not equal to ACTIVE/active."; + v1 = b1.errorMessage(errorMessage).build(); + v2 = b2.errorMessage(errorMessage).build(); + assertThatViolationsAreEqual(v1, v2, expectedResult); + + // Use the same violation details + Map<String, Object> details = new HashMap<>(); + details.put(rule, "ACTIVE"); + v1 = b1.violationDetails(details).build(); + v2 = b2.violationDetails(details).build(); + assertThatViolationsAreEqual(v1, v2, expectedResult); + } + + /** + * Generate violations using the supplied builders and assert that the generated Violation IDs differ whenever the + * values supplied to the builders differ. + * + * @param builder + * @param builder2 + * @throws ValidationServiceException + */ + private void testViolationIdsForInequality(Builder builder, Builder builder2) throws ValidationServiceException { + Violation violation; + Violation other; + + // Vary the violation type + violation = builder.violationType("").build(); + other = builder2.violationType(ViolationType.RULE).build(); + assertThatViolationIdsDiffer(violation, other); + + violation = builder.violationType(ViolationType.NONE).build(); + other = builder2.violationType(ViolationType.RULE).build(); + assertThatViolationIdsDiffer(violation, other); + + // Vary the validation rule + violation = builder.validationRule(null).build(); + other = builder2.validationRule("rule").build(); + assertThatViolationIdsDiffer(violation, other); + + violation = builder.validationRule("rule1").build(); + other = builder2.validationRule(null).build(); + assertThatViolationIdsDiffer(violation, other); + + violation = builder.validationRule("rule1").build(); + other = builder2.validationRule("rule2").build(); + assertThatViolationIdsDiffer(violation, other); + + // Vary the category + violation = builder.category(null).build(); + other = builder2.category("category").build(); + assertThatViolationIdsDiffer(violation, other); + + violation = builder.category("category").build(); + other = builder2.category(null).build(); + assertThatViolationIdsDiffer(violation, other); + + violation = builder.category("category1").build(); + other = builder2.category("category2").build(); + assertThatViolationIdsDiffer(violation, other); + + // Vary the error message + violation = builder.validationRule("rule").build(); + other = builder2.validationRule("rule").errorMessage("message2").build(); + assertThatViolationIdsDiffer(violation, other); + + violation = builder.validationRule("rule").errorMessage("message1").build(); + other = builder2.validationRule("rule").errorMessage("message2").build(); + assertThatViolationIdsDiffer(violation, other); + + // Vary the severity + violation = builder.errorMessage("msg").build(); + other = builder2.errorMessage("msg").severity("sev2").build(); + assertThatViolationIdsDiffer(violation, other); + + violation = builder.errorMessage("msg").severity("sev1").build(); + other = builder2.errorMessage("msg").severity("sev2").build(); + assertThatViolationIdsDiffer(violation, other); + } + + private ValidationResult getValidationResult(Map<String, Object> violationDetails) + throws ValidationServiceException { + ValidationResult validationResult = new ValidationResult(entity); + + //@formatter:off + Violation violation = new Violation.Builder(entity) + .category("category") + .severity("severity") + .violationType("violationType") + .violationDetails(violationDetails) + .errorMessage("errorMessage") + .build(); + //@formatter:on + + validationResult.addViolation(violation); + + return validationResult; + } + + private ValidationResult toAndFromJson(ValidationResult validationResult) { + return JsonUtil.toAnnotatedClassfromJson(validationResult.toJson(), ValidationResult.class); + } + + private void assertThatValidationResultIsValid(ValidationResult vr) { + assertTrue("Expected valid UUID", isValidEventId(vr.getValidationId())); + assertIsValidTimestamp(vr.getValidationTimestamp()); + JsonObject expectedEntityId = new JsonObject(); + expectedEntityId.addProperty("vserver-id", "example-vserver-id-val-34666"); + assertThat(vr.getEntityId(), is(expectedEntityId)); + assertThat(vr.getEntityType(), is("vserver")); + assertThat(vr.getResourceVersion(), is("1464193654")); + assertThat(vr.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 vr, Violation expectedViolation) { + Violation v = vr.getViolations().get(0); + assertThat(v.getViolationId(), is(expectedViolation.getViolationId())); + assertThat(v.getCategory(), is("category")); + assertThat(v.getSeverity(), is("severity")); + assertThat(v.getViolationType(), is("violationType")); + assertThat(v.getErrorMessage(), is("errorMessage")); + return v; + } + + private void assertThatViolationsAreEqual(Violation v1, Violation v2, Boolean expectedResult) { + assertThat("Violation equality in error:\n" + v1 + " equals " + v2, v1.equals(v2), is(expectedResult)); + assertThat("Violation ID equality in error:\n" + v1.getViolationId() + " equals " + v2.getViolationId(), + v1.getViolationId().equals(v2.getViolationId()), is(expectedResult)); + // Force a call to toString() for code coverage only + assertThat(v1.toString().equals(v2.toString()), is(equalTo(expectedResult))); + } + + private void assertThatViolationIdsDiffer(Violation violation, Violation other) { + assertThat(violation.getViolationId(), is(not(equalTo(other.getViolationId())))); + assertThat(violation, is(not(equalTo(other)))); + } + + private boolean isValidEventId(String eventId) { + try { + UUID.fromString(eventId); + } catch (IllegalArgumentException exception) { + return false; + } + return true; + } + + private void assertIsValidTimestamp(String date) { + DateTimeFormatter f = DateTimeFormatter.ofPattern("yyyyMMdd'T'HHmmssX").withZone(ZoneOffset.UTC); + Instant.from(f.parse(date)); + } +} diff --git a/src/test/java/org/onap/aai/validation/ruledriven/configuration/ConfigFileBuilder.java b/src/test/java/org/onap/aai/validation/ruledriven/configuration/ConfigFileBuilder.java new file mode 100644 index 0000000..1f87ca0 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/ruledriven/configuration/ConfigFileBuilder.java @@ -0,0 +1,104 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.ruledriven.configuration; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.util.List; +import java.util.Properties; +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; + +public class ConfigFileBuilder extends ContentBuilder { + + private static final Logger logger = LogHelper.INSTANCE; + + private static final String TMP_CONFIG_FILE = "config.txt"; + private TemporaryFolder testFolder; + private File tempFile; + + public ConfigFileBuilder(TemporaryFolder testFolder) { + super(); + this.testFolder = testFolder; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("ConfigBuilder [").append(testFolder.getRoot().getAbsolutePath()).append(System.lineSeparator()); + for (ContentBuilder item : items) { + sb.append(item).append(System.lineSeparator()); + } + sb.append(System.lineSeparator()).append("]"); + return sb.toString(); + } + + public EntityBuilder entity() { + EntityBuilder item = new EntityBuilder(); + addContent(item); + return item; + } + + public RuleBuilder rule() { + RuleBuilder item = new RuleBuilder(); + addContent(item); + return item; + } + + public void entity(Properties props) { + EntityBuilder entity = entity(); + entity.appendProperties(props); + } + + public RuleBuilder rule(String name) { + RuleBuilder rule = rule(); + rule.appendValue("name", name); + return rule; + } + + public List<EntitySection> loadConfiguration() throws IOException { + logger.debug("Configuration file: " + build()); + return buildConfiguration(build()); + } + + private List<EntitySection> buildConfiguration(String text) throws IOException { + tempFile = createConfigFile(text); + return RulesConfigurationLoader.loadConfiguration(tempFile).getEntities(); + } + + private File createConfigFile(String configText) throws IOException { + tempFile = testFolder.newFile(TMP_CONFIG_FILE); + BufferedWriter bw = new BufferedWriter(new FileWriter(tempFile)); + bw.write(configText); + bw.close(); + return tempFile; + } + + public void freeResources() { + tempFile.delete(); + } + +} diff --git a/src/test/java/org/onap/aai/validation/ruledriven/configuration/ConfigurationExceptionMatcher.java b/src/test/java/org/onap/aai/validation/ruledriven/configuration/ConfigurationExceptionMatcher.java new file mode 100644 index 0000000..f32c5d3 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/ruledriven/configuration/ConfigurationExceptionMatcher.java @@ -0,0 +1,73 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.ruledriven.configuration; + +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.hamcrest.TypeSafeMatcher; +import org.onap.aai.validation.ruledriven.configuration.GroovyConfigurationException; + +public class ConfigurationExceptionMatcher { + public static Matcher<GroovyConfigurationException> hasInvalidToken(final String expectedToken) { + return new TypeSafeMatcher<GroovyConfigurationException>() { + private String foundToken; + + @Override + public void describeTo(Description description) { + description.appendText("result from getInvalidToken() equals \"").appendText(expectedToken) + .appendText("\""); + } + + @Override + public void describeMismatchSafely(final GroovyConfigurationException exception, + final Description mismatchDescription) { + mismatchDescription.appendText("was ").appendValue(foundToken); + } + + @Override + protected boolean matchesSafely(GroovyConfigurationException exception) { + foundToken = exception.getInvalidToken(); + return foundToken != null && foundToken.equalsIgnoreCase(expectedToken); + } + }; + } + + public static Matcher<GroovyConfigurationException> configTextContains(final String expectedConfigText) { + return new TypeSafeMatcher<GroovyConfigurationException>() { + private String foundConfigText; + + @Override + public void describeTo(Description description) { + description.appendText("result from getConfigText() containing \"").appendText(expectedConfigText) + .appendText("\""); + } + + @Override + public void describeMismatchSafely(final GroovyConfigurationException exception, + final Description mismatchDescription) { + mismatchDescription.appendText("was ").appendValue(foundConfigText); + } + + @Override + protected boolean matchesSafely(GroovyConfigurationException exception) { + foundConfigText = exception.getConfigText(); + return foundConfigText != null && foundConfigText.contains(expectedConfigText); + } + }; + } +} diff --git a/src/test/java/org/onap/aai/validation/ruledriven/configuration/TestConfigFileBuilder.java b/src/test/java/org/onap/aai/validation/ruledriven/configuration/TestConfigFileBuilder.java new file mode 100644 index 0000000..6d56fa8 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/ruledriven/configuration/TestConfigFileBuilder.java @@ -0,0 +1,59 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.ruledriven.configuration; + +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; +import org.onap.aai.validation.ruledriven.configuration.build.EntityBuilder; + +/** + * These tests are required to ensure code coverage by unit testing + * + */ +public class TestConfigFileBuilder { + + static { + System.setProperty("APP_HOME", "."); + } + + @Rule + public TemporaryFolder testFolder = new TemporaryFolder(); + + /** + * Validate that a content builder accepts a numeric value + * + * @throws Exception + */ + @Test + public void testNumberItem() throws Exception { + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + EntityBuilder ab = new EntityBuilder(); + ab.appendValue("dummy", 3); + ab.appendValue("dummy2", 5L); + builder.addContent(ab); + builder.toString(); + } + + @Test + public void testToString() throws Exception { + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + builder.addContent(new EntityBuilder()); + builder.toString(); + } +} diff --git a/src/test/java/org/onap/aai/validation/ruledriven/configuration/TestRulesConfigurationReader.java b/src/test/java/org/onap/aai/validation/ruledriven/configuration/TestRulesConfigurationReader.java new file mode 100644 index 0000000..c0f9f48 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/ruledriven/configuration/TestRulesConfigurationReader.java @@ -0,0 +1,448 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.ruledriven.configuration; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Properties; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.junit.rules.TemporaryFolder; +import org.onap.aai.validation.ruledriven.configuration.EntitySection; +import org.onap.aai.validation.ruledriven.configuration.GroovyConfigurationException; +import org.onap.aai.validation.ruledriven.configuration.RuleSection; +import org.onap.aai.validation.ruledriven.configuration.SettingsSection; +import org.onap.aai.validation.ruledriven.configuration.build.EntityBuilder; +import org.onap.aai.validation.ruledriven.configuration.build.RuleBuilder; +import org.onap.aai.validation.ruledriven.configuration.build.ValidationBuilder; +import org.onap.aai.validation.test.util.RandomString; + +/** + * Tests for the Groovy classes that read and parse the rules configuration + * + */ +public class TestRulesConfigurationReader { + + static { + System.setProperty("APP_HOME", "."); + } + + @Rule + public TemporaryFolder testFolder = new TemporaryFolder(); + + /** + * Exception expected by Junit. This is modified per test. + */ + @Rule + public final ExpectedException exception = ExpectedException.none(); + + private static final String INVALID_TOKEN = "audif"; + + @Test + public void testEmptyConfiguration() throws Exception { + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + Collection<EntitySection> entitys = builder.loadConfiguration(); + assertThat(entitys.size(), is(0)); + } + + /** + * Test for reporting of an unknown token with various syntax formatting + * + * @throws Exception + */ + @Test + public void testInvalidTopLevelItem() throws Exception { + testInvalidToken(INVALID_TOKEN); + testInvalidToken(INVALID_TOKEN + " { }"); + testInvalidToken("{ " + INVALID_TOKEN + " }"); + testInvalidToken(INVALID_TOKEN + " { "); + testInvalidToken(INVALID_TOKEN + " } "); + testInvalidToken("{} " + INVALID_TOKEN); + testInvalidToken("\"" + INVALID_TOKEN); + } + + @Test + public void testInvalidentityItem1() throws Exception { + testInvalidToken("entity { invalid }", "invalid"); + } + + @Test + public void testInvalidentityItem2() throws Exception { + testInvalidToken("entity { invalid item }", "item"); + } + + @Test + public void testInvalidentityItem3() throws Exception { + testInvalidToken("entity { name name\n fred fred}", "name"); + } + + @Test + public void testInvalidQuery() throws Exception { + testInvalidToken("entity { name 'name'\n joe}", "joe"); + } + + @Test + public void testGenericRuleWithZeroAttributes() throws Exception { + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + EntityBuilder entity = builder.entity(); + entity.appendValue("name", "entity"); + ValidationBuilder validation = entity.validation(buildProperties("type")); + validation.useRule("ruleZ"); + builder.rule("ruleZ"); + + exception.expect(GroovyConfigurationException.class); + exception.expectMessage(containsString("attributes")); + builder.loadConfiguration(); + } + + @Test + public void testInvalidUseRule() throws Exception { + testInvalidToken("entity { validation { useRule { foo } } }", "foo"); + } + + @Test + public void testMissingRule() throws Exception { + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + builder.entity().validation().useRule("missingRule"); + exception.expect(GroovyConfigurationException.class); + exception.expectMessage(containsString("missingRule")); + builder.loadConfiguration(); + } + + @Test + public void testDuplicateRule() throws Exception { + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + builder.rule("duplicateRule"); + builder.rule("duplicateRule"); + exception.expect(GroovyConfigurationException.class); + exception.expectMessage(containsString("duplicateRule")); + builder.loadConfiguration(); + } + + @Test + public void testSimpleentity() throws Exception { + String name = RandomString.generate(); + + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + Properties entity = new Properties(); + entity.put("name", name); + builder.entity(entity); + + List<EntitySection> entities = builder.loadConfiguration(); + + assertThat(entities.size(), is(1)); + EntitySection entityConf = entities.get(0); + assertThat(entityConf.getName(), is(equalTo(name))); + } + + /** + * The Settings section is not tested elsewhere + * + * @throws Exception + */ + @Test + public void testGlobalSettings() throws Exception { + SettingsSection settings = new SettingsSection(); + settings.toString(); + } + + @Test + public void testentityWithRuleUsingStrings() throws Exception { + String name = RandomString.generate(); + String description = RandomString.generate(); + String severity = RandomString.generate(); + List<String> attributes = Arrays.asList(RandomString.generate()); + String validate = randomValidationExpression(); + + Properties rule = new Properties(); + rule.put("name", name); + rule.put("description", description); + rule.put("severity", severity); + rule.put("attributes", attributes); + rule.put("validate", validate); + + String type = RandomString.generate(); + + Properties validation = new Properties(); + validation.put("type", type); + validation.put("rule", rule); + + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + Properties entity = new Properties(); + entity.put("validation", validation); + builder.entity(entity); + + List<EntitySection> entities = builder.loadConfiguration(); + + assertThat(entities.size(), is(1)); + EntitySection entityConf = entities.get(0); + Collection<RuleSection> rules = entityConf.getRules(); + assertThat(rules.size(), is(1)); + + RuleSection ruleConfig = rules.iterator().next(); + assertThat(ruleConfig.getName(), is(equalTo(name))); + assertThat(ruleConfig.getDescription(), is(equalTo(description))); + assertThat(ruleConfig.getSeverity(), is(equalTo(severity))); + assertThat(ruleConfig.getAttributes(), is(equalTo(attributes))); + assertThat(ruleConfig.getExpression(), is(equalTo(validate))); + assertThat(ruleConfig.getType(), is(equalTo(type))); + } + + @Test + public void testentityWithRuleUsingBuilder() throws Exception { + String name = RandomString.generate(); + String description = RandomString.generate(); + String severity = RandomString.generate(); + List<String> attributes = Arrays.asList(RandomString.generate()); + String validate = randomValidationExpression(); + String type = RandomString.generate(); + + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + ValidationBuilder validation = builder.entity().validation(); + validation.appendValue("type", type); + + RuleBuilder rule = validation.rule(name); + rule.appendValue("description", description); + rule.appendValue("severity", severity); + rule.appendValue("attributes", attributes); + rule.appendValue("validate", validate); + + List<EntitySection> entitys = builder.loadConfiguration(); + + assertThat(entitys.size(), is(1)); + EntitySection entityConf = entitys.get(0); + Collection<RuleSection> rules = entityConf.getRules(); + assertThat(rules.size(), is(1)); + + RuleSection ruleConfig = rules.iterator().next(); + assertThat(ruleConfig.getName(), is(equalTo(name))); + assertThat(ruleConfig.getDescription(), is(equalTo(description))); + assertThat(ruleConfig.getSeverity(), is(equalTo(severity))); + assertThat(ruleConfig.getAttributes(), is(equalTo(attributes))); + assertThat(ruleConfig.getExpression(), is(equalTo(validate))); + assertThat(ruleConfig.getType(), is(equalTo(type))); + } + + @Test + public void testentityWithEmbeddedRule() throws Exception { + Properties rule = buildProperties("name", "description", "severity", "validate"); + rule.put("attributes", Arrays.asList(RandomString.generate())); + + Properties validation = buildProperties("type"); + validation.put("rule", rule); + + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + Properties entity = new Properties(); + entity.put("validation", validation); + builder.entity(entity); + + List<EntitySection> entitys = builder.loadConfiguration(); + + assertThat(entitys.size(), is(1)); + EntitySection entityConf = entitys.get(0); + Collection<RuleSection> rules = entityConf.getRules(); + assertThat(rules.size(), is(1)); + + RuleSection ruleConfig = rules.iterator().next(); + assertThatConfigMatchesProperties(ruleConfig, rule, validation); + } + + @Test + public void testEmbeddedRuleUsingString() throws Exception { + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + builder.appendLine("entity {"); + builder.appendLine(" type 'newvce'"); + builder.appendLine(" validation {"); + builder.appendLine(" rule {"); + builder.appendLine(" name 'vnfName'"); + builder.appendLine( + " description 'Validate that the vnf-name attribute matches the expected string format'"); + builder.appendLine(" severity 'MAJOR'"); + builder.appendLine(" attributes 'vnf-name'"); + builder.appendLine(" validate 'vnf-name.matchesPattern(xxxxnnnvbc)'"); + builder.appendLine(" }"); + builder.appendLine(" }"); + builder.appendLine("}"); + List<EntitySection> entitys = builder.loadConfiguration(); + + assertThat(entitys.size(), is(1)); + EntitySection entityConf = entitys.get(0); + assertThat(entityConf.getName(), is(equalTo("newvce"))); + + Collection<RuleSection> rules = entityConf.getRules(); + assertThat(rules.size(), is(1)); + RuleSection ruleConfig = rules.iterator().next(); + + assertThat(ruleConfig.getType(), is(equalTo("newvce"))); + assertThat(ruleConfig.getName(), is(equalTo("vnfName"))); + assertThat(ruleConfig.getDescription(), + is(equalTo("Validate that the vnf-name attribute matches the expected string format"))); + assertThat(ruleConfig.getSeverity(), is(equalTo("MAJOR"))); + List<String> expectedList = new ArrayList<String>(); + expectedList.add("vnf-name"); + assertThat(ruleConfig.getAttributes(), is(equalTo(expectedList))); + assertThat(ruleConfig.getExpression(), is(equalTo("vnf-name.matchesPattern(xxxxnnnvbc)"))); + } + + @Test + public void testGenericRuleUsingStrings() throws Exception { + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + builder.appendLine("entity {"); + builder.appendLine(" type 'newvce'"); + builder.appendLine(" validation {"); + builder.appendLine(" useRule {"); + builder.appendLine(" name 'genericRule'"); + builder.appendLine(" attributes 'clli'"); + builder.appendLine(" }"); + builder.appendLine(" }"); + builder.appendLine("}"); + builder.appendLine("rule {"); + builder.appendLine(" name 'genericRule'"); + builder.appendLine(" description 'The field (attribute) must be less than 50 characters in length'"); + builder.appendLine(" severity 'MINOR'"); + builder.appendLine(" validate 'attribute.size() < 50'"); + builder.appendLine("}"); + + List<EntitySection> entitys = builder.loadConfiguration(); + assertThat(entitys.size(), is(1)); + EntitySection entityConf = entitys.get(0); + assertThat(entityConf.getName(), is(equalTo("newvce"))); + + Collection<RuleSection> rules = entityConf.getRules(); + assertThat("Number of rules", rules.size(), is(1)); + RuleSection ruleConfig = rules.iterator().next(); + + assertThat(ruleConfig.getType(), is(equalTo("newvce"))); + assertThat(ruleConfig.getName(), is(equalTo("genericRule"))); + assertThat(ruleConfig.getDescription(), + is(equalTo("The field (attribute) must be less than 50 characters in length"))); + assertThat(ruleConfig.getSeverity(), is(equalTo("MINOR"))); + List<String> expectedList = new ArrayList<String>(); + expectedList.add("clli"); + assertThat(ruleConfig.getAttributes(), is(equalTo(expectedList))); + assertThat(ruleConfig.getExpression(), is(equalTo("attribute.size() < 50"))); + } + + @Test + public void testMultipleGenericRules() throws Exception { + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + EntityBuilder entity = builder.entity(); + ValidationBuilder validation = entity.validation(buildProperties("type")); + validation.useRule("rule1"); + validation.useRule("rule2").appendValue("attributes", "attr"); + builder.rule("rule1").appendValue("attributes", "field").appendValue("validate", "true"); + builder.rule("rule2").appendValue("validate", "true"); + + List<EntitySection> entitys = builder.loadConfiguration(); + + assertThat(entitys.size(), is(1)); + EntitySection entityConf = entitys.get(0); + Collection<RuleSection> rules = entityConf.getRules(); + assertThat(rules.size(), is(2)); + + Iterator<RuleSection> iterator = rules.iterator(); + RuleSection ruleConfig = iterator.next(); + assertThat(ruleConfig.getName(), is(equalTo("rule1"))); + assertThat(ruleConfig.getAttributes(), is(Collections.singletonList("field"))); + + ruleConfig = iterator.next(); + assertThat(ruleConfig.getName(), is(equalTo("rule2"))); + assertThat(ruleConfig.getAttributes(), is(Collections.singletonList("attr"))); + } + + @Test + public void testGenericRuleWithMultipleAttributes() throws Exception { + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + EntityBuilder entity = builder.entity(); + ValidationBuilder validation = entity.validation(buildProperties("type")); + validation.useRule("rule").appendValue("attributes", Arrays.asList("attr1", "attr2")); + builder.rule("rule").appendValue("attributes", Arrays.asList("field1", "field2")).appendValue("validate", + "true"); + + List<EntitySection> entities = builder.loadConfiguration(); + + assertThat(entities.size(), is(1)); + EntitySection entityConf = entities.get(0); + Collection<RuleSection> rules = entityConf.getRules(); + assertThat(rules.size(), is(1)); + + Iterator<RuleSection> iterator = rules.iterator(); + RuleSection ruleConfig = iterator.next(); + assertThat(ruleConfig.getName(), is(equalTo("rule"))); + assertThat(ruleConfig.getAttributes(), is(Arrays.asList("attr1", "attr2"))); + } + + private String randomValidationExpression() { + String validate = RandomString.generate(); + while (validate.matches("^\\d+[a-fA-F]+\\D+.*") || validate.matches("0x\\D+.*")) { + validate = RandomString.generate(); + } + return validate; + } + + private void testInvalidToken(String configText) throws IOException { + testInvalidToken(configText, INVALID_TOKEN); + } + + private void testInvalidToken(String configText, String invalidToken) throws IOException { + ConfigFileBuilder builder = new ConfigFileBuilder(testFolder); + builder.addContent(configText); + assertConfigurationException(invalidToken); + builder.loadConfiguration(); + } + + private void assertConfigurationException(String invalidToken) { + exception.expect(GroovyConfigurationException.class); + exception.expectMessage(containsString(invalidToken)); + exception.expect(ConfigurationExceptionMatcher.hasInvalidToken(invalidToken)); + exception.expect(ConfigurationExceptionMatcher.configTextContains(invalidToken)); + } + + private Properties buildProperties(String... strings) { + Properties props = new Properties(); + for (String str : strings) { + props.put(str, randomValidationExpression()); + } + return props; + } + + private void assertThatConfigMatchesProperties(RuleSection ruleConfig, Properties rule, Properties validation) { + assertMatch(ruleConfig.getName(), rule, "name"); + assertMatch(ruleConfig.getDescription(), rule, "description"); + assertMatch(ruleConfig.getSeverity(), rule, "severity"); + assertThat(ruleConfig.getAttributes(), is(equalTo(rule.get("attributes")))); + assertMatch(ruleConfig.getExpression(), rule, "validate"); + assertMatch(ruleConfig.getType(), validation, "type"); + assertMatch(ruleConfig.getObjectId(), validation, "objectId"); + } + + private void assertMatch(String value, Properties props, String key) { + assertThat(value, is(equalTo(props.getProperty(key)))); + } +} diff --git a/src/test/java/org/onap/aai/validation/ruledriven/mock/TestDefaultRules.java b/src/test/java/org/onap/aai/validation/ruledriven/mock/TestDefaultRules.java new file mode 100644 index 0000000..c3b36ed --- /dev/null +++ b/src/test/java/org/onap/aai/validation/ruledriven/mock/TestDefaultRules.java @@ -0,0 +1,148 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.ruledriven.mock; + +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; +import static org.mockito.Matchers.anyListOf; +import static org.mockito.Matchers.anyString; +import static org.mockito.Mockito.when; + +import com.google.gson.JsonObject; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.stubbing.Answer; +import org.onap.aai.validation.Validator; +import org.onap.aai.validation.exception.ValidationServiceException; +import org.onap.aai.validation.reader.EventReader; +import org.onap.aai.validation.reader.data.AttributeValues; +import org.onap.aai.validation.reader.data.Entity; +import org.onap.aai.validation.reader.data.EntityId; +import org.onap.aai.validation.result.ValidationResult; +import org.onap.aai.validation.result.Violation; +import org.onap.aai.validation.ruledriven.RuleDrivenValidator; + +/** + * Test that the rules present under bundleconfig/etc/rules/ can be loaded and evaluated (using a mocked event). + * + */ +@RunWith(MockitoJUnitRunner.class) +public class TestDefaultRules { + + static { + System.setProperty("APP_HOME", "."); + } + + enum TestCase { + NULL, + VSERVER; + } + + // Data returned by the mocked EventReader + enum TestData { + // @formatter:off + ENTITTY_DATA ("vserver dummy json data"), + ENTITTY_TYPE ("vserver"), + RESOURCE_VERSION_VALUE("1476735182"), + VSERVER_ID_KEY ("vserver-id"), + VSERVER_ID_VALUE ("13b629a4-87ae-492d-943f-acb8f3d9c3d9"); + // @formatter:on + + private String value; + + TestData(String value) { + this.value = value; + } + } + + @Mock + private EventReader eventReader; + + @Mock + private Entity entity; + + private Validator ruleDrivenValidator; + + @Before + public void createMockEventReader() throws ValidationServiceException { + when(eventReader.getEventType(TestCase.VSERVER.name())).thenReturn(Optional.of("aai-event")); + when(eventReader.getEventType(TestCase.NULL.name())).thenReturn(null); + + when(eventReader.getEntityType(anyString())).thenReturn(Optional.of(TestData.ENTITTY_TYPE.value)); + when(eventReader.getEntity(anyString())).thenReturn(entity); + + // Mocked entity returned by the event reader + when(entity.getType()).thenReturn(TestData.ENTITTY_TYPE.value); + when(entity.getResourceVersion()).thenReturn(Optional.of(TestData.RESOURCE_VERSION_VALUE.value)); + + EntityId entityId = new EntityId(TestData.VSERVER_ID_KEY.value, TestData.VSERVER_ID_VALUE.value); + when(entity.getIds()).thenReturn(new ArrayList<>(Arrays.asList(entityId))); + + // Return dummy values for any requested attributes + when(entity.getAttributeValues(anyListOf(String.class))).thenAnswer(new Answer<AttributeValues>() { + @SuppressWarnings("unchecked") + @Override + public AttributeValues answer(InvocationOnMock invocation) { + AttributeValues attributeValues = new AttributeValues(); + for (String attribute : (List<String>) invocation.getArguments()[0]) { + if (attribute.contains("[*]")) { + attributeValues.put(attribute, Collections.emptyList()); + } else { + attributeValues.put(attribute, ""); + } + } + return attributeValues; + } + }); + } + + @Before + public void createRuleDrivenValidator() throws ValidationServiceException { + Path configurationPath = Paths.get("bundleconfig/etc/rules"); + ruleDrivenValidator = new RuleDrivenValidator(configurationPath, null, eventReader, null); + } + + @Test + public void testExecuteRulesForVserver() throws Exception { + List<ValidationResult> results = ruleDrivenValidator.validate(TestCase.VSERVER.name()); + assertThat(results.size(), is(1)); + + ValidationResult validationResult = results.get(0); + assertThat(validationResult.getEntityType(), is(equalTo(TestData.ENTITTY_TYPE.value))); + JsonObject expectedEntityId = new JsonObject(); + expectedEntityId.addProperty(TestData.VSERVER_ID_KEY.value, TestData.VSERVER_ID_VALUE.value); + assertThat(validationResult.getEntityId(), is(equalTo(expectedEntityId))); + assertThat(validationResult.getViolations().size(), is(2)); + + Violation violation = validationResult.getViolations().get(0); + assertThat(violation.getCategory(), is(equalTo("MISSING_REL"))); + } + +} diff --git a/src/test/java/org/onap/aai/validation/ruledriven/rule/RuleHelper.java b/src/test/java/org/onap/aai/validation/ruledriven/rule/RuleHelper.java new file mode 100644 index 0000000..456d011 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/ruledriven/rule/RuleHelper.java @@ -0,0 +1,36 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.ruledriven.rule; + +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +import org.onap.aai.validation.reader.data.AttributeValues; +import org.onap.aai.validation.ruledriven.rule.Rule; + +public class RuleHelper { + + static void assertRuleResult(Rule rule, AttributeValues values, Boolean expectedResult) { + assertThat(rule + " failed for values [" + values + "]", rule.execute(values), is(equalTo(expectedResult))); + } + + static void assertRuleResult(Rule rule, Object value, Boolean expectedResult) { + assertThat(rule + " failed for value [" + value + "]", rule.execute(value), is(equalTo(expectedResult))); + } +} diff --git a/src/test/java/org/onap/aai/validation/ruledriven/rule/RuleTester.java b/src/test/java/org/onap/aai/validation/ruledriven/rule/RuleTester.java new file mode 100644 index 0000000..8593f93 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/ruledriven/rule/RuleTester.java @@ -0,0 +1,47 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.ruledriven.rule; + +import org.onap.aai.validation.reader.data.AttributeValues; +import org.onap.aai.validation.ruledriven.rule.Rule; + +/** + * Helper class for testing rules + * + */ +public class RuleTester { + + private Rule rule; + private AttributeValues attributeValues; + + /** + * @param trinityRule + * @param attributeValues + */ + public RuleTester(Rule trinityRule, AttributeValues attributeValues) { + this.rule = trinityRule; + this.attributeValues = attributeValues; + } + + /** + * @param expectedResult + */ + public void test(boolean expectedResult) { + RuleHelper.assertRuleResult(rule, attributeValues, expectedResult); + } +} diff --git a/src/test/java/org/onap/aai/validation/ruledriven/rule/TestConfigurationLoader.java b/src/test/java/org/onap/aai/validation/ruledriven/rule/TestConfigurationLoader.java new file mode 100644 index 0000000..f226252 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/ruledriven/rule/TestConfigurationLoader.java @@ -0,0 +1,190 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.ruledriven.rule; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.LinkedHashSet; +import java.util.Set; +import javax.inject.Inject; +import org.junit.Test; +import org.onap.aai.validation.reader.OxmReader; +import org.onap.aai.validation.reader.data.AttributeValues; +import org.onap.aai.validation.ruledriven.RuleDrivenValidator; +import org.onap.aai.validation.ruledriven.rule.Rule; + +public class TestConfigurationLoader { + + static { + System.setProperty("APP_HOME", "."); + } + + private enum AAIRelation { + RELATED_TO("related-to"), + PROPERTY_KEY("property-key"), + PROPERTY_VALUE("property-value"); + + private final String text; + + /** + * @param text + */ + private AAIRelation(final String text) { + this.text = text; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Enum#toString() + */ + @Override + public String toString() { + return text; + } + } + + @Inject + private OxmReader oxmReader; + + /** + * If vserver is related to an image with image-name = 'TRINITY' then generic-vnf.vnf-name must match xxxxnnnnv + */ + @Test + public void testTrinityRule() throws Exception { + Path configurationPath = Paths.get("bundleconfig/etc/rules"); + + RuleDrivenValidator validator = new RuleDrivenValidator(configurationPath, oxmReader, null, null); + validator.initialise(); + + // Find the trinity rule + Rule trinityRule = null; + for (Rule rule : validator.getRulesForEntity("vserver", "aai-event")) { + if (rule.getName().contains("TRINITY") && rule.getName().contains("generic-vnf")) { + trinityRule = rule; + } + } + + // Create a set of relationship objects to be passed to the rule + Set<JsonObject> relationships = new LinkedHashSet<>(); + AttributeValues attributeValues = new AttributeValues(); + attributeValues.put("relationship-list.relationship[*]", relationships); + + // Test the rule against the relationships + RuleTester ruleTester = new RuleTester(trinityRule, attributeValues); + ruleTester.test(true); + + JsonObject genericVnfData = createRelationshipData(relationships, "generic-vnf"); + ruleTester.test(true); + + // Add a new object for the image relationship + JsonObject imageData = createRelationshipData(relationships, "image"); + ruleTester.test(true); + + createRelationshipData(relationships, "pserver"); + ruleTester.test(true); + + // Add a new JSON object for the image name + JsonObject imageNameProperty = createRelatedToProperty(imageData); + ruleTester.test(true); + + setPropertyKey(imageNameProperty, "image.image-name"); + ruleTester.test(true); + + setPropertyValue(imageNameProperty, "not TRINITY"); + ruleTester.test(true); + + setPropertyValue(imageNameProperty, "TRINITY"); + ruleTester.test(false); + + JsonObject vnfNameProperty = createRelatedToProperty(genericVnfData); + ruleTester.test(false); + + setPropertyKey(vnfNameProperty, "generic-vnf.vnf-name"); + ruleTester.test(false); + + setPropertyValue(vnfNameProperty, "invalid"); + ruleTester.test(false); + + setPropertyValue(vnfNameProperty, ""); + ruleTester.test(false); + + setPropertyValue(vnfNameProperty, "bmsx0001v"); + ruleTester.test(true); + + // Add another new object for a different image relationship + JsonObject image2Data = createRelationshipData(relationships, "image"); + ruleTester.test(true); + + JsonObject image2NameProperty = createRelatedToProperty(image2Data); + ruleTester.test(true); + + setPropertyKey(image2NameProperty, "image.image-name"); + ruleTester.test(true); + + setPropertyValue(image2NameProperty, "not TRINITY"); + ruleTester.test(true); + + setPropertyValue(vnfNameProperty, "invalid"); + ruleTester.test(false); + + setPropertyValue(imageNameProperty, "not TRINITY"); + ruleTester.test(true); + + setPropertyValue(image2NameProperty, "TRINITY"); + ruleTester.test(false); + + setPropertyValue(image2NameProperty, "also not TRINITY"); + ruleTester.test(true); + } + + /** + * @param relationshipData + * @return + */ + private JsonObject createRelatedToProperty(JsonObject relationshipData) { + JsonObject imageNameProperty = new JsonObject(); + JsonElement jsonArray = new JsonArray(); + jsonArray.getAsJsonArray().add(imageNameProperty); + relationshipData.add("related-to-property", jsonArray); + return imageNameProperty; + } + + /** + * @param relationships + * @param relatedObject + * @return + */ + private JsonObject createRelationshipData(Set<JsonObject> relationships, String relatedObject) { + JsonObject relationData = new JsonObject(); + relationData.addProperty(AAIRelation.RELATED_TO.toString(), relatedObject); + relationships.add(relationData); + return relationData; + } + + private void setPropertyKey(JsonObject objectMap, String propertyKeyName) { + objectMap.addProperty(AAIRelation.PROPERTY_KEY.toString(), propertyKeyName); + } + + private void setPropertyValue(JsonObject objectMap, String propertyValue) { + objectMap.addProperty(AAIRelation.PROPERTY_VALUE.toString(), propertyValue); + } +} diff --git a/src/test/java/org/onap/aai/validation/ruledriven/rule/TestRuleExecution.java b/src/test/java/org/onap/aai/validation/ruledriven/rule/TestRuleExecution.java new file mode 100644 index 0000000..15e958d --- /dev/null +++ b/src/test/java/org/onap/aai/validation/ruledriven/rule/TestRuleExecution.java @@ -0,0 +1,494 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.ruledriven.rule; + +import static org.hamcrest.CoreMatchers.containsString; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.onap.aai.validation.reader.data.AttributeValues; +import org.onap.aai.validation.ruledriven.configuration.GroovyConfigurationException; +import org.onap.aai.validation.ruledriven.configuration.RuleSection; +import org.onap.aai.validation.ruledriven.rule.GroovyRule; + +/** + * Tests for creating an AuditRule object and then executing the rule expression against fixed attribute values + * + * @see GroovyRule + * + */ +public class TestRuleExecution { + + static { + System.setProperty("APP_HOME", "."); + } + + @Rule + public final ExpectedException exception = ExpectedException.none(); + + /** + * Simple example of a rule using a boolean expression, acting on a single attribute + * + * @throws Exception + */ + @Test + public void testRuleCreation() throws Exception { + // This object represents a rule + GroovyRule rule = buildRule("i", "i == 44"); + + // Success + assertRuleResult(rule, 44, true); + + // Failure + assertRuleResult(rule, 5, false); + } + + @Test + public void testRuleWithMultipleAttributes() throws Exception { + GroovyRule rule = buildRule(Arrays.asList("i", "j"), "i == 22 && j == 44"); + + // Success + assertRuleResult(rule, Arrays.asList(22, 44), true); + + // Failure + assertRuleResult(rule, Arrays.asList(5, 5), false); + assertRuleResult(rule, Arrays.asList(22, 5), false); + assertRuleResult(rule, Arrays.asList(5, 44), false); + } + + /** + * vserver is related to vpe and vserver-name contains me6 + */ + @Test + public void testConditionalRegExp() throws Exception { + // !related-to.contains("vpe") || vserver-name =~ "me6" + String expression = "!related-to.contains(\"vpe\") || vserver-name =~ \"me6\""; + List<String> attributes = Arrays.asList("related-to", "vserver-name"); + GroovyRule rule = buildRule(attributes, expression); + + // Create some tests, varying the values for each attribute + Collection<Collection<String>> relatedToTests = new ArrayList<>(); + Collection<Collection<String>> vserverNameTests = new ArrayList<>(); + + // These are the related-to values to test + relatedToTests.add(Collections.<String>emptyList()); + relatedToTests.add(Arrays.asList("vpe")); + relatedToTests.add(Arrays.asList("vpe", "vces")); + relatedToTests.add(Arrays.asList("vces")); + relatedToTests.add(Arrays.asList("other", "vces")); + + // These are the vserver-name values to test + Collection<String> testNames = new ArrayList<>(); + testNames.add("fred"); + testNames.add("me"); + testNames.add("me7"); + testNames.add("me6"); + testNames.add("123me6"); + testNames.add("me6789"); + testNames.add("123me6789"); + + // Additional test for no vserver-name values present + vserverNameTests.add(Collections.<String>emptyList()); + + for (String name : testNames) { + // Build single element lists containing the test vserver names + vserverNameTests.add(Arrays.asList(name)); + + // Also build multi-element lists containing the test vserver names + vserverNameTests.add(Arrays.asList(name, "6dummy")); + } + + // Now run the tests, computing the expected Boolean result each time + for (Collection<String> relatedToList : relatedToTests) { + // If no vpe is related, then the result will always be true + boolean expectedResult = !relatedToList.contains("vpe"); + + Map<String, Object> map = new HashMap<>(); + map.put("related-to", relatedToList); + + for (Collection<String> vserverNames : vserverNameTests) { + // Assign the strings to the attribute vserver-name + map.put("vserver-name", vserverNames); + + if (expectedResult == false) { + for (String name : vserverNames) { + if (name.contains("me6")) { + expectedResult = true; + break; + } + } + } + + testWithAttributeValue(rule, map, expectedResult); + } + } + } + + /** + * generic-vnf.vnf-type should be "BW NFM" and not "bnfm" + */ + @Test + public void testStringComparison() throws Exception { + String attribute = "generic-vnf.vnf-type"; + String expression = "vnf-type == 'BW NFM'"; + GroovyRule rule = buildRule(attribute, expression); + assertRuleResult(rule, "BW NFM", true); + assertRuleResult(rule, "bnfm", false); + assertRuleResult(rule, null, false); + assertRuleResult(rule, "", false); + assertRuleResult(rule, "fred", false); + assertRuleResult(rule, "bob", false); + assertRuleResult(rule, 5, false); + assertRuleResult(rule, 1000L, false); + } + + @Test + public void testNotEquals() throws Exception { + GroovyRule rule = buildRule("x", "x != 'foo'"); + assertRuleResult(rule, "", true); + assertRuleResult(rule, "bar", true); + assertRuleResult(rule, "foo", false); + assertRuleResult(rule, "foo\n", true); + assertRuleResult(rule, 5, true); + assertRuleResult(rule, 1000L, true); + assertRuleResult(rule, null, true); + } + + @Test + public void testGreaterThan() throws Exception { + Map<Object, Boolean> tests = new HashMap<>(); + tests.put(-1, false); + tests.put(0, false); + tests.put(1, false); + tests.put(4, false); + tests.put(5, true); + tests.put(55, true); + tests.put(null, false); + testRuleExpression("i", "i > 4", tests); + } + + @Test + public void testValidStringLength() throws Exception { + String attribute = "clli"; + String expression = "clli.size() == 8 || clli.size() == 11"; + Map<Object, Boolean> tests = new HashMap<>(); + tests.put("", false); + tests.put("X", false); + tests.put("1", false); + tests.put("1234", false); + tests.put("123456", false); + tests.put("1234567", false); + tests.put("12345678", true); + tests.put("123456789", false); + tests.put("1234567890", false); + tests.put("12345678901", true); + tests.put("1234567890ABC", false); + tests.put("1234567890123456789012345678901234567890", false); + testRuleExpression(attribute, expression, tests); + } + + /** + * location_clli is 8 or 11 characters and must be characters only + */ + @Test + public void testStringLengthAndChars() throws Exception { + String attribute = "location_clli"; + String expression = "location_clli != null && location_clli.matches('[a-zA-Z]{8,11}')"; + Map<Object, Boolean> tests = new HashMap<>(); + tests.put(null, false); + tests.put("", false); + tests.put("X", false); + tests.put("1234567", false); + tests.put("12345678", false); // 8 digits + tests.put("ABCDEFGH", true); // 8 chars + tests.put("1234567890A", false); // 11 mixed + tests.put("abcdefghijk", true); // 11 chars + tests.put("AbCdEfGhIjK", true); // 11 chars + tests.put("AbCdEfGhIj?", false); // special char + testRuleExpression(attribute, expression, tests); + } + + /** + * incorrect naming, e.g. expecting ae0.x (where x is unit/subinterface number), but receiving ae0.353.3303 + */ + @Test + public void testRegularExpression() throws Exception { + String attribute = "unit"; + String expression = "unit.matches('^ae0\\\\.(\\\\d)+')"; + Map<Object, Boolean> tests = new HashMap<>(); + tests.put("", false); + tests.put("X", false); + tests.put("ae0", false); + tests.put("ae0.", false); + tests.put("ae01", false); + tests.put("ae012", false); + tests.put("ae0.1", true); + tests.put("ae0.354", true); + tests.put("ae0.354.", false); + tests.put("ae0.353.3303", false); + tests.put("ae0.353.3303.1", false); + testRuleExpression(attribute, expression, tests); + } + + @Test + public void testNullStringLength() throws Exception { + String attribute = "clli"; + String expression = "clli.size() == 8 || clli.size() == 11"; + exception.expect(IllegalArgumentException.class); + exception.expectMessage(containsString("Argument")); + exception.expectMessage(containsString("null")); + GroovyRule rule = buildRule(attribute, expression); + rule.execute((Object[]) null); + } + + @Test + public void testStringLengthWithNull() throws Exception { + String attribute = "a"; + String expression = "a == null || a.size() > 4"; + Map<Object, Boolean> tests = new HashMap<>(); + tests.put("", false); + tests.put("X", false); + tests.put("1", false); + tests.put("1234", false); + tests.put("123456", true); + tests.put("1234567", true); + tests.put("12345678", true); + tests.put("123456789", true); + tests.put("1234567890", true); + tests.put("12345678901", true); + tests.put("1234567890ABC", true); + tests.put("1234567890123456789012345678901234567890", true); + testRuleExpression(attribute, expression, tests); + } + + /** + * Prov-status cannot be ACTIVE or NULL (empty) + */ + @Test + public void testStringTextWithNull() throws Exception { + String attribute = "prov-status"; + String expression = "prov-status != null && prov-status != 'ACTIVE'"; + Map<Object, Boolean> tests = new HashMap<>(); + tests.put(null, false); + tests.put("ACTIVE", false); + tests.put("", true); + tests.put("X", true); + tests.put("1", true); + tests.put("1234", true); + tests.put("123456", true); + tests.put("1234567", true); + tests.put("12345678", true); + tests.put("123456789", true); + tests.put("1234567890", true); + tests.put("12345678901", true); + tests.put("1234567890ABC", true); + tests.put("1234567890123456789012345678901234567890", true); + testRuleExpression(attribute, expression, tests); + } + + /** + * Prov-status cannot be ACTIVE/active or NULL/null or empty or missing + */ + @Test + public void testCaseInsensitveStringMatch() throws Exception { + String attribute = "prov-status"; + String expression = + "prov-status != null && prov-status.size() > 0 && !prov-status.equalsIgnoreCase('NULL') && !prov-status.equalsIgnoreCase('ACTIVE')"; + Map<Object, Boolean> tests = new HashMap<>(); + tests.put(null, false); + tests.put("", false); + tests.put("active", false); + tests.put("ACTIVE", false); + tests.put("null", false); + tests.put("NULL", false); + tests.put("NVTPROV", true); + tests.put("1", true); + tests.put("1234", true); + testRuleExpression(attribute, expression, tests); + } + + @Test + public void testUsingAttributeValuesObject() throws Exception { + List<String> attributes = Arrays.asList("attr1", "attr2"); + String expression = "attr1.size() == 8 || attr2.size() == 11"; + GroovyRule rule = buildRule(attributes, expression); + AttributeValues attributeValues = new AttributeValues("attr1", "other"); + attributeValues.put("attr2", "other"); + rule.execute(attributeValues); + } + + @Test + public void testMissingMethod() throws Exception { + String attribute = "clli"; + String expression = "clli.size() == 8 || clli.size() == 11"; + exception.expect(IllegalArgumentException.class); + exception.expectMessage(containsString("Integer")); + exception.expectMessage(containsString("size()")); + GroovyRule rule = buildRule(attribute, expression); + rule.execute(1); + } + + @Test + public void testMultipleAttributes() throws Exception { + List<String> attributes = Arrays.asList("clli", "other"); + String expression = "clli.size() == 8 || other.size() == 11"; + exception.expect(IllegalArgumentException.class); + exception.expectMessage(containsString("Integer")); + exception.expectMessage(containsString("size()")); + GroovyRule rule = buildRule(attributes, expression); + rule.execute(new Integer(1), new Integer(2)); + } + + /** + * Compare two attributes (using a sub-string match) + */ + @Test + public void testAttributeComparison() throws Exception { + String attribute1 = "heat-stack-id"; + String attribute2 = "vnf-name"; + + // Alternative forms of the expression + Collection<String> expressionsToTest = new ArrayList<>(); + expressionsToTest.add("heat-stack-id?.size() > 10 && heat-stack-id[0..10] == vnf-name"); + expressionsToTest.add("heat-stack-id?.size() > 10 && heat-stack-id.substring(0,11) == vnf-name"); + expressionsToTest.add("heat-stack-id?.size() > 10 && heat-stack-id.take(11) == vnf-name"); + + // Create some tests, varying the values for each attribute + Collection<String> heatStackIds = new ArrayList<>(); + Collection<String> vnfNames = new ArrayList<>(); + + heatStackIds.add("123me67890abcdef"); + heatStackIds.add("123me67890a"); + heatStackIds.add("fred"); + heatStackIds.add(""); + heatStackIds.add(null); + + vnfNames.add("123me67890abcdef"); + vnfNames.add("123me67890a"); + vnfNames.add("123me6789"); + vnfNames.add("fred"); + vnfNames.add("bob"); + vnfNames.add(""); + vnfNames.add(null); + + // Build a rule per expression + for (String expression : expressionsToTest) { + GroovyRule rule = buildRule(Arrays.asList(attribute1, attribute2), expression); + + // Now run the tests, computing the expected Boolean result each time + for (String heatStackId : heatStackIds) { + Map<String, Object> map = new HashMap<>(); + map.put(attribute1, heatStackId); + for (String vnfName : vnfNames) { + map.put(attribute2, vnfName); + boolean expectedExpressionResult = // Java equivalent of the expression + heatStackId != null && heatStackId.length() > 10 + && heatStackId.substring(0, 11).equals(vnfName); + testWithAttributeValue(rule, map, expectedExpressionResult); + } + } + } + } + + /** + * @param rule + * @param tests + */ + public void assertTestResults(GroovyRule rule, Map<Object, Boolean> tests) { + for (Entry<?, ?> e : tests.entrySet()) { + Object attributeValue = e.getKey(); + Boolean expectedResult = (Boolean) e.getValue(); + RuleHelper.assertRuleResult(rule, attributeValue, expectedResult); + } + } + + private void testWithAttributeValue(GroovyRule rule, Map<String, Object> map, boolean expectedResult) { + AttributeValues attributeValues = new AttributeValues(map); + RuleHelper.assertRuleResult(rule, attributeValues, expectedResult); + } + + private void testRuleExpression(String attributes, String expression, Map<Object, Boolean> tests) + throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException { + GroovyRule rule = buildRule("testRule", attributes, expression); + assertTestResults(rule, tests); + } + + /** + * Build a simple rule using a RuleConfiguration object + * + * @param name the rule name + * @param attribute a named variable, referenced in the expression + * @param expression the expression to evaluate (returns a Boolean value) + * @return + * @throws IOException + * @throws InstantiationException + * @throws IllegalAccessException + * @throws GroovyConfigurationException + */ + private GroovyRule buildRule(String name, String attribute, String expression) + throws IOException, InstantiationException, IllegalAccessException, GroovyConfigurationException { + RuleSection ruleConfig = new RuleSection(); + ruleConfig.setName(name); + ruleConfig.setAttributes(Collections.singletonList(attribute)); + ruleConfig.setExpression(expression); + return new GroovyRule(ruleConfig); + } + + private GroovyRule buildRule(String name, List<String> attributes, String expression) + throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException { + RuleSection ruleConfig = new RuleSection(); + ruleConfig.setName(name); + ruleConfig.setAttributes(attributes); + ruleConfig.setExpression(expression); + return new GroovyRule(ruleConfig); + } + + /** + * Build a simple rule (with a default name) using a RuleConfiguration object + * + * @see TestRuleExecution#buildRule(String, String, String) + * + * @param attribute a named variable, referenced in the expression + * @param expression the expression to evaluate (returns a Boolean value) + * @throws GroovyConfigurationException + */ + private GroovyRule buildRule(String attribute, String expression) + throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException { + return buildRule("testRule", attribute, expression); + } + + private GroovyRule buildRule(List<String> attributes, String expression) + throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException { + return buildRule("testRule", attributes, expression); + } + + private void assertRuleResult(GroovyRule rule, Object value, boolean expectedResult) { + RuleHelper.assertRuleResult(rule, value, expectedResult); + } + +} diff --git a/src/test/java/org/onap/aai/validation/ruledriven/rule/TestRuleValidation.java b/src/test/java/org/onap/aai/validation/ruledriven/rule/TestRuleValidation.java new file mode 100644 index 0000000..0650743 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/ruledriven/rule/TestRuleValidation.java @@ -0,0 +1,229 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.ruledriven.rule; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.onap.aai.validation.ruledriven.configuration.GroovyConfigurationException; +import org.onap.aai.validation.ruledriven.configuration.RuleSection; +import org.onap.aai.validation.ruledriven.rule.GroovyRule; + +/** + * Tests for creating an AuditRule object and then executing the rule expression against fixed attribute values + * + * @see GroovyRule + * + */ +public class TestRuleValidation { + + static { + System.setProperty("APP_HOME", "."); + } + + @Rule + public final ExpectedException exception = ExpectedException.none(); + + /** + * Test multiple sample expressions each with various different attribute names. Each of the attribute names used in + * this test is valid for use within a rule. + * + * @throws GroovyConfigurationException + * @throws IOException + * @throws IllegalAccessException + * @throws InstantiationException + * + * @throws Exception + */ + @Test + public void testValidAttributeNames() + throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException { + testValidExpressions("clli"); // Sample name + testValidExpressions("c"); + testValidExpressions("i"); // Short attribute name, part of the size() text + testValidExpressions("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); + testValidExpressions("size"); // Does not interfere with .size() method call + testValidExpressions("s12"); // Digits allowed in the attribute name + testValidExpressions("s12s"); + testValidExpressions("12s"); + testValidExpressions("12-s"); // Hyphens supported + testValidExpressions("12_s"); // Underscores supported + testValidExpressions("if"); // Keyword + testValidExpressions("return"); + testValidExpressions("A.B.C"); // Dots indicate a JSON Path + } + + /** + * Test that the attribute name is sanitised. Each of the following attribute names is invalid for use in the rules + * configuration. + * + * @throws Exception + */ + @Test + public void testInvalidAttributeNames() throws Exception { + testInvalidAttributeName(""); // Zero-length + testInvalidAttributeName("null"); // Reserved keyword + testInvalidAttributeName("8"); // This would cause replacement of the value 8 in the expression + testInvalidAttributeName("size()"); // This would replace the call to size() + testInvalidAttributeName("s?"); // Special character not supported by the implementation + testInvalidAttributeName("\""); + testInvalidAttributeName("s\\"); + testInvalidAttributeName("s/"); + testInvalidAttributeName("s\""); + testInvalidAttributeName("s'"); + testInvalidAttributeName("=="); + } + + /** + * A rule cannot support an attribute that is zero-length. This test ensures that this is detected even when the + * expression itself is valid. + * + * @throws Exception + */ + @Test + public void testZeroLengthAttribute() throws Exception { + String attribute = ""; + String expression = "clli.size() == 8 || clli.size() == 11"; + GroovyRule rule = buildRule("testRule", attribute, expression); + assertThat(rule.toString(), rule.isValid(), is(equalTo(false))); + } + + @Test + public void testInvalidRuleSyntax() throws Exception { + String attribute = "fred"; + String expression = "fred. = 8 || fred.size() == 11"; + exception.expect(GroovyConfigurationException.class); + exception.expectMessage(containsString("unexpected")); + buildRule("testRule", attribute, expression); + } + + @Test + public void testInvalidAttribute() throws Exception { + String attribute = "fred"; + String expression = "size.size() == 8 || size.size() == 11"; + GroovyRule rule = buildRule("testRule", attribute, expression); + + assertThat(rule.toString(), rule.isValid(), is(equalTo(false))); + } + + /** + * Utility to build and test different expressions using the supplied attribute name + * + * @param attribute attribute (field) identifier + * @throws InstantiationException + * @throws IllegalAccessException + * @throws IOException + * @throws GroovyConfigurationException + */ + private void testValidExpressions(String attribute) + throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException { + testValidLengthRule(attribute); + } + + /** + * Utility to build and test an expression asserting that the size() of the attribute is 8 or 11 + * + * @param attribute attribute (field) identifier + * @throws InstantiationException + * @throws IllegalAccessException + * @throws IOException + * @throws GroovyConfigurationException + */ + private void testValidLengthRule(String attribute) + throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException { + String fieldName = attribute.substring(attribute.lastIndexOf(".") + 1); + String expression = fieldName + ".size() == 8 || " + fieldName + ".size() == 11"; + GroovyRule rule = buildRule("testRule", attribute, expression); + + // Test that the rule is valid + assertThat(rule.toString(), rule.isValid(), is(equalTo(true))); + + // Now test that the rule actually executes successfully + Map<Object, Boolean> tests = new HashMap<>(); + tests.put("", false); + tests.put("X", false); + tests.put("1234567", false); + tests.put("12345678", true); // 8 digits + tests.put("ABCDEFGH", true); // 8 chars + tests.put("12E4567890A", true); // 11 mixed digits/chars + tests.put("abcdefghijk", true); // 11 chars + tests.put("AbCdEfGhIjK", true); // 11 chars mixed case + tests.put("AbCdEfGhIj?", true); // special char + testRuleExpression(attribute, expression, tests); + } + + private void testRuleExpression(String attributes, String expression, Map<Object, Boolean> tests) + throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException { + GroovyRule rule = buildRule("testRule", attributes, expression); + assertThat("The rule should be valid", rule.isValid(), is(equalTo(true))); + for (Entry<?, ?> e : tests.entrySet()) { + Object attributeValue = e.getKey(); + Boolean expectedResult = (Boolean) e.getValue(); + RuleHelper.assertRuleResult(rule, attributeValue, expectedResult); + } + } + + /** + * Build a simple rule using a RuleConfiguration object + * + * @param name the rule name + * @param attribute a named variable, referenced in the expression + * @param expression the expression to evaluate (returns a Boolean value) + * @return + * @throws IOException + * @throws InstantiationException + * @throws IllegalAccessException + * @throws GroovyConfigurationException + */ + private GroovyRule buildRule(String name, String attribute, String expression) + throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException { + RuleSection ruleConfig = new RuleSection(); + ruleConfig.setName(name); + ruleConfig.setAttributes(Collections.singletonList(attribute)); + ruleConfig.setExpression(expression); + return new GroovyRule(ruleConfig); + } + + /** + * Utility to build a rule and test that the attribute is valid + * + * @param attribute attribute (field) identifier + * @throws InstantiationException + * @throws IllegalAccessException + * @throws IOException + * @throws GroovyConfigurationException + */ + private void testInvalidAttributeName(String attribute) + throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException { + String expression = attribute + ".size() == 8 || " + attribute + ".size() == 11"; + GroovyRule rule = buildRule("testRule", attribute, expression); + + // Test that the rule is invalid + assertThat(rule.toString(), rule.isValid(), is(equalTo(false))); + } +} diff --git a/src/test/java/org/onap/aai/validation/ruledriven/validator/TestRuleDrivenValidator.java b/src/test/java/org/onap/aai/validation/ruledriven/validator/TestRuleDrivenValidator.java new file mode 100644 index 0000000..cf1e874 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/ruledriven/validator/TestRuleDrivenValidator.java @@ -0,0 +1,125 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.ruledriven.validator; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.MatcherAssert.assertThat; + +import com.google.gson.JsonSyntaxException; +import java.io.IOException; +import java.net.URISyntaxException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.BasicFileAttributes; +import java.util.ArrayList; +import java.util.List; +import java.util.function.BiPredicate; +import java.util.stream.Stream; +import javax.inject.Inject; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.aai.validation.exception.ValidationServiceException; +import org.onap.aai.validation.result.ValidationResult; +import org.onap.aai.validation.ruledriven.RuleDrivenValidator; +import org.onap.aai.validation.test.util.TestEntity; +import org.onap.aai.validation.test.util.ValidationResultIsEqual; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"}) +@ContextConfiguration( + locations = {"classpath:" + TestRuleDrivenValidator.UNIT_TEST_FOLDER + "/test-rule-driven-validator-beans.xml"}) +public class TestRuleDrivenValidator { + + static { + System.setProperty("APP_HOME", "."); + } + + public static final String UNIT_TEST_FOLDER = "rule-driven-validator"; + private static final String TEST_EVENTS_PATH = "/test_events"; + + @Inject + private RuleDrivenValidator validator; + + /** + * @param testEntitiesPath + * @param testEventsPath + * @param resultsPath + * @return all test entities + * @throws URISyntaxException + */ + public static List<TestEntity> getEntities(String testEntitiesPath, String testEventsPath, String resultsPath) + throws URISyntaxException { + Path testEvents = Paths.get(ClassLoader.getSystemResource(testEntitiesPath + testEventsPath).toURI()); + + BiPredicate<Path, BasicFileAttributes> jsonMatcher = + (path, basicFileAttributes) -> path.toFile().getName().matches(".*\\.json"); + + List<TestEntity> entitiesList = new ArrayList<>(); + try (Stream<Path> paths = Files.find(testEvents, 2, jsonMatcher)) { + paths.forEach((path) -> entitiesList.add(new TestEntity(testEvents, path, testEventsPath, resultsPath))); + } catch (IOException e) { + throw new RuntimeException(e); + } + + return entitiesList; + } + + /** + * @throws ValidationServiceException + * @throws JsonSyntaxException + * @throws URISyntaxException + * @throws IOException + */ + @Test + public void testValidateUnitTestInstances() + throws ValidationServiceException, JsonSyntaxException, URISyntaxException, IOException { + validateEntities(UNIT_TEST_FOLDER, TEST_EVENTS_PATH, "/results/expected"); + } + + /** + * @param inputEventsFolder + * @param testEventsPath + * @param resultsPath + * @throws URISyntaxException + * @throws ValidationServiceException + * @throws IOException + */ + private void validateEntities(String inputEventsFolder, String testEventsPath, String resultsPath) + throws URISyntaxException, ValidationServiceException, IOException { + for (TestEntity entity : getEntities(inputEventsFolder, testEventsPath, resultsPath)) { + List<ValidationResult> results = validator.validate(entity.getJson()); + assertThat(results.size(), is(1)); + ValidationResult expectedResult = entity.getExpectedValidationResult(); + if (expectedResult == null) { + Path testEvents = Paths.get(ClassLoader.getSystemResource(inputEventsFolder + resultsPath).toURI()); + StringBuilder sb = new StringBuilder(); + Files.walk(testEvents).forEach((path) -> sb.append(path).append("\n")); + assertThat("Expected results missing (" + entity.expectedResultsFile + ")\n" + sb.toString(), + expectedResult, is(notNullValue())); + } + assertThat(entity.inputFile.getAbsolutePath(), results.get(0), + is(ValidationResultIsEqual.equalTo(expectedResult))); + } + } + +} diff --git a/src/test/java/org/onap/aai/validation/services/TestInfoService.java b/src/test/java/org/onap/aai/validation/services/TestInfoService.java new file mode 100644 index 0000000..0bfa8ba --- /dev/null +++ b/src/test/java/org/onap/aai/validation/services/TestInfoService.java @@ -0,0 +1,140 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.services; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.CoreMatchers.startsWith; +import static org.junit.Assert.assertThat; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.nio.file.Path; +import java.nio.file.Paths; +import javax.inject.Inject; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.aai.validation.controller.ValidationController; +import org.onap.aai.validation.exception.ValidationServiceException; +import org.onap.aai.validation.publisher.MockEventPublisher; +import org.onap.aai.validation.services.InfoService; +import org.onap.aai.validation.test.util.TestEntity; +import org.onap.aai.validation.test.util.TestUtil; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"}) +@ContextConfiguration(locations = {"classpath:/info-service/test-validation-service-beans.xml"}) +public class TestInfoService { + + static { + System.setProperty("APP_HOME", "."); + } + + enum TestData { + // @formatter:off + VSERVER ("rule-driven-validator/test_events/vserver-create-event.json"); + + private String filename; + TestData(String filename) {this.filename = filename;} + public String getFilename() {return this.filename;} + // @formatter:on + } + + private InfoService infoService; + + @Inject + private ValidationController validationController; + + @Inject + MockEventPublisher messagePublisher; + + @Before + public void setUp() throws ValidationServiceException { + infoService = new InfoService(); + infoService.setValidationController(validationController); + } + + /** + * @throws ValidationServiceException + */ + @Test + public void testInitialisedInfoService() throws ValidationServiceException { + assertThat(infoService.getValidationController(), is(validationController)); + String info = infoService.getInfo(); + assertResultsStringFormatted(info); + } + + /** + * @throws ValidationServiceException + */ + @Test + public void testThrowableRecorded() throws ValidationServiceException { + validationController.recordThrowable(new Exception()); + String info = infoService.getInfo(); + assertResultsStringFormatted(info); + assertThat(info, containsString("Exception reported")); + } + + /** + * @throws ValidationServiceException + */ + @Test + public void testInvalidEventRecorded() throws ValidationServiceException { + validationController.execute("", "http"); + String info = infoService.getInfo(); + assertResultsStringFormatted(info); + assertThat(info, containsString("errored=1")); + } + + /** + * @throws ValidationServiceException + * @throws IOException + * @throws URISyntaxException + */ + @Test + public void testVserverEventRecorded() throws ValidationServiceException, URISyntaxException, IOException { + Path vserverTestFile = Paths.get(ClassLoader.getSystemResource(TestData.VSERVER.getFilename()).toURI()); + Path root = vserverTestFile.getParent(); + assertThat(root, is(not(nullValue()))); + TestEntity entity = new TestEntity(root, vserverTestFile, "test_events", "results/expected"); + messagePublisher.setTestEntity(entity); + messagePublisher.setTestDescription(entity.inputFile.getAbsolutePath()); + validationController.execute(TestUtil.getFileAsString(TestData.VSERVER.getFilename()), "http"); + String info = infoService.getInfo(); + assertResultsStringFormatted(info); + assertThat(info, containsString("total=1")); + } + + /** + * Assert that the info service status string contains the expected standard results and formatting. + * + * @param info + */ + private void assertResultsStringFormatted(String info) { + assertThat(info, startsWith("Status: Up\n")); + assertThat(info, containsString("Started at")); + assertThat(info, containsString("total=0")); + } + +} diff --git a/src/test/java/org/onap/aai/validation/services/TestValidateServiceImpl.java b/src/test/java/org/onap/aai/validation/services/TestValidateServiceImpl.java new file mode 100644 index 0000000..e23f7a2 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/services/TestValidateServiceImpl.java @@ -0,0 +1,115 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.services; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.notNullValue; +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 java.util.Map.Entry; +import javax.security.auth.x500.X500Principal; +import javax.ws.rs.core.MultivaluedHashMap; +import org.junit.Before; +import org.junit.Test; +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.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.mock.web.MockHttpServletRequest; + +public class TestValidateServiceImpl { + + static { + System.setProperty("APP_HOME", "."); + } + + private ValidationController mockValidationController; + private AAIMicroServiceAuth mockAaiMicroServiceAuth; + + @Before + public void setUp() { + mockValidationController = Mockito.mock(ValidationController.class); + mockAaiMicroServiceAuth = Mockito.mock(AAIMicroServiceAuth.class); + } + + @Test + public void validateConstructor() { + ValidateServiceImpl validateServiceImpl = + new ValidateServiceImpl(mockValidationController, mockAaiMicroServiceAuth); + assertNotNull(validateServiceImpl); + assertThat(validateServiceImpl.toString(), is(notNullValue())); + } + + @Test + public void testValidateEventWithoutHeaderFailure() { + ValidateServiceImpl validateServiceImpl = + new ValidateServiceImpl(mockValidationController, mockAaiMicroServiceAuth); + ResponseEntity<String> response = validateServiceImpl.validate("testEvent"); + assertThat(response.getStatusCode(), is(HttpStatus.INTERNAL_SERVER_ERROR)); + } + + /** + * 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 + */ + @Test + public void testRequestWithHeaders() throws URISyntaxException { + // Create mocked request headers map + MultivaluedHashMap<String, String> headersMap = new MultivaluedHashMap<>(); + headersMap.put("X-TransactionId", createSingletonList("transaction-id")); + headersMap.put("X-FromAppId", createSingletonList("app-id")); + headersMap.put("Host", createSingletonList("hostname")); + + HttpHeaders headers = Mockito.mock(HttpHeaders.class); + for (Entry<String, List<String>> entry : headersMap.entrySet()) { + Mockito.when(headers.get(entry.getKey())).thenReturn(entry.getValue()); + } + + MockHttpServletRequest servletRequest = new MockHttpServletRequest(); + servletRequest.setSecure(true); + servletRequest.setScheme("https"); + servletRequest.setServerPort(9501); + servletRequest.setServerName("localhost"); + servletRequest.setRequestURI("/services/validation-service/v1/app/validate"); + + X509Certificate mockCertificate = Mockito.mock(X509Certificate.class); + Mockito.when(mockCertificate.getSubjectX500Principal()) + .thenReturn(new X500Principal("CN=test, OU=qa, O=Test Ltd, L=London, ST=London, C=GB")); + + servletRequest.setAttribute("javax.servlet.request.X509Certificate", new X509Certificate[] {mockCertificate}); + servletRequest.setAttribute("javax.servlet.request.cipher_suite", ""); + + ValidateServiceImpl service = new ValidateServiceImpl(mockValidationController, mockAaiMicroServiceAuth); + service.validate(headers, servletRequest, "testEvent"); + } + + private List<String> createSingletonList(String listItem) { + return Collections.<String>singletonList(listItem); + } +} diff --git a/src/test/java/org/onap/aai/validation/test/util/RandomString.java b/src/test/java/org/onap/aai/validation/test/util/RandomString.java new file mode 100644 index 0000000..ba2d85e --- /dev/null +++ b/src/test/java/org/onap/aai/validation/test/util/RandomString.java @@ -0,0 +1,40 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.test.util; + +import java.util.Random; + +public class RandomString { + + private static final String VALID_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + private static final int MAX_STRING_LENGTH = 50; + private static Random rng = new Random(); + + public static String generate() { + return generateString(rng, VALID_CHARS, rng.nextInt(MAX_STRING_LENGTH) + 1); + } + + public static String generateString(Random rng, String characters, int length) { + char[] text = new char[length]; + for (int i = 0; i < length; i++) { + text[i] = characters.charAt(rng.nextInt(characters.length())); + } + return new String(text); + } + +} diff --git a/src/test/java/org/onap/aai/validation/test/util/TestEntity.java b/src/test/java/org/onap/aai/validation/test/util/TestEntity.java new file mode 100644 index 0000000..e42873a --- /dev/null +++ b/src/test/java/org/onap/aai/validation/test/util/TestEntity.java @@ -0,0 +1,88 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.test.util; + +import com.google.gson.JsonSyntaxException; +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.file.NoSuchFileException; +import java.nio.file.Path; +import org.onap.aai.validation.result.ValidationResult; + +public class TestEntity { + + public File inputFile; + public String expectedResultsFile; + + public TestEntity(Path root, Path inputFilePath, String inputEventsPath, String outputEventsPath) { + String rootUri = root.toUri().toString(); + String resultsRoot = rootUri.replaceAll(inputEventsPath + "/$", outputEventsPath + "/"); + String inputFileUri = inputFilePath.toUri().toString(); + this.inputFile = inputFilePath.toFile(); + this.expectedResultsFile = inputFileUri.replace(rootUri, resultsRoot).replaceAll("\\.json$", ".exp.json"); + } + + public String getJson() throws URISyntaxException, IOException { + return TestUtil.getFileAsString(inputFile.getPath()); + } + + /** + * @return the contents of the file that stores the expected JSON, or an empty string if there is no expected JSON + * @throws URISyntaxException + * @throws IOException + */ + public String getExpectedJson() throws URISyntaxException, IOException { + try { + return TestUtil.getFileAsString(new URI(expectedResultsFile).getPath()); + } catch (NoSuchFileException e) { + return ""; + } + } + + public ValidationResult getExpectedValidationResult() throws JsonSyntaxException, URISyntaxException, IOException { + return ValidationResult.fromJson(getExpectedJson()); + } + + @Override + public String toString() { + return "TestEntity [inputFile=" + inputFile + ", expectedResultsFile=" + expectedResultsFile + "]"; + } + + public boolean expectsError() throws URISyntaxException, IOException { + try { + getErrorFileContents(); + } catch (NoSuchFileException e) { + return false; + } + return true; + } + + public String getExpectedErrorMessage() throws URISyntaxException, IOException { + return getErrorFileContents().trim(); + } + + private String getErrorFileContents() throws URISyntaxException, IOException { + return TestUtil.getFileAsString(new URI(getErrorFileURI()).getPath()); + } + + private String getErrorFileURI() { + return expectedResultsFile.replaceAll("\\.exp\\.json$", ".error"); + } +} diff --git a/src/test/java/org/onap/aai/validation/test/util/TestUtil.java b/src/test/java/org/onap/aai/validation/test/util/TestUtil.java new file mode 100644 index 0000000..39d1246 --- /dev/null +++ b/src/test/java/org/onap/aai/validation/test/util/TestUtil.java @@ -0,0 +1,52 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.test.util; + +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; + +/** + * Test helper methods. + */ +public class TestUtil { + + /** + * Gets files, such as test data from the classpath. + * + * @param filename the name of the file + * @return a String with the file contents. + * @throws URISyntaxException + * @throws IOException + */ + public static String getFileAsString(String filename) throws URISyntaxException, IOException { + // Try loading the named file directly + URI uri = new File(filename).toURI(); + URL systemResource = ClassLoader.getSystemResource(filename); + if (systemResource != null) { + uri = systemResource.toURI(); + } + byte[] encoded = Files.readAllBytes(Paths.get(uri)); + return new String(encoded, StandardCharsets.UTF_8); + } +} diff --git a/src/test/java/org/onap/aai/validation/test/util/ValidationResultIsEqual.java b/src/test/java/org/onap/aai/validation/test/util/ValidationResultIsEqual.java new file mode 100644 index 0000000..aa6471f --- /dev/null +++ b/src/test/java/org/onap/aai/validation/test/util/ValidationResultIsEqual.java @@ -0,0 +1,58 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.test.util; + +import org.hamcrest.BaseMatcher; +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.onap.aai.validation.result.ValidationResult; + +/** + * Matcher for comparing actual and expected ValidationResults + * + */ +public class ValidationResultIsEqual extends BaseMatcher<ValidationResult> { + private final ValidationResult expected; + + public static Matcher<? super ValidationResult> equalTo(ValidationResult validationResult) { + return new ValidationResultIsEqual(validationResult); + } + + private ValidationResultIsEqual(ValidationResult expected) { + this.expected = expected; + } + + @Override + public boolean matches(Object o) { + if (expected == null) { + return false; + } + ValidationResult actual = (ValidationResult) o; + return actual.getEntityId().equals(expected.getEntityId()) && // + actual.getEntityType().equals(expected.getEntityType()) && // + (actual.getEntityLink() == null ? "" : actual.getEntityLink()).equals(expected.getEntityLink()) && // + actual.getResourceVersion().equals(expected.getResourceVersion()) && // + actual.getViolations().equals(expected.getViolations()); + } + + @Override + public void describeTo(Description description) { + description.appendText(expected == null ? "<not defined>" : expected.toString()); + } + +} diff --git a/src/test/java/org/onap/aai/validation/util/TestStringUtils.java b/src/test/java/org/onap/aai/validation/util/TestStringUtils.java new file mode 100644 index 0000000..038e10d --- /dev/null +++ b/src/test/java/org/onap/aai/validation/util/TestStringUtils.java @@ -0,0 +1,170 @@ +/* + * ============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===================================================== + */ +package org.onap.aai.validation.util; + +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.nullValue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; + +import java.util.Arrays; +import java.util.List; +import org.junit.Test; +import org.onap.aai.validation.exception.ValidationServiceException; +import org.onap.aai.validation.util.StringUtils; + +public class TestStringUtils { + + static { + System.setProperty("APP_HOME", "."); + } + + @Test + public void testStripSinglePrefix() throws Exception { + String prefixDelimiter = "."; + String prefix = "prefix"; + String suffix = "suffix"; + String testString = prefix + prefixDelimiter + suffix; + + String result = StringUtils.stripPrefix(testString, prefixDelimiter); + + assertEquals("Prefix incorrectly stripped.", suffix, result); + } + + @Test + public void testStripMultiplePrefix() throws Exception { + String prefixDelimiter = "***"; + String prefix = "prefix"; + String suffix = "suffix"; + String testString = prefix + prefixDelimiter + prefix + prefixDelimiter + suffix; + + String result = StringUtils.stripPrefix(testString, prefixDelimiter); + + assertEquals("Prefix incorrectly stripped.", suffix, result); + } + + @Test + public void testStripSubstr() { + List<String> stringList = Arrays.asList("/text()one", "tw/text()o", "three/text()"); + List<String> stripSubstr = StringUtils.stripSuffix(stringList, "/text()"); + assertThat(stripSubstr, containsInAnyOrder("/text()one", "tw/text()o", "three")); + } + + @Test + public void testStripStringRegex() throws Exception { + String prefixDelimiter = "/aai/v8/"; + String prefix = "prefix"; + String suffix = "suffix"; + String testString = prefix + prefixDelimiter + suffix; + String regex = "\\/aai\\/v[0-9]*\\/"; + + String stripString = StringUtils.stripPrefixRegex(testString, regex); + + assertThat(stripString, is(suffix)); + } + + @Test + public void testStripStringRegexNotFound() throws Exception { + String prefixDelimiter = "delimiter"; + String prefix = "prefix"; + String suffix = "suffix"; + String testString = prefix + prefixDelimiter + suffix; + String regex = "\\/aai\\/v[0-9]*\\/"; + + String stripString = StringUtils.stripPrefixRegex(testString, regex); + + assertThat(stripString, is(testString)); + } + + @Test + public void testStripStringRegexMultiplePrefix() throws Exception { + String prefixDelimiter = "/aai/v8/"; + String prefix = "prefix"; + String suffix = "text" + prefixDelimiter + "text"; + String testString = prefix + prefixDelimiter + suffix; + String regex = "\\/aai\\/v[0-9]*\\/"; + + String stripString = StringUtils.stripPrefixRegex(testString, regex); + + assertThat(stripString, is(suffix)); + } + + @Test + public void testStripStringRegexNullString() throws Exception { + String testString = null; + String regex = "\\/aai\\/v[0-9]*\\/"; + + String stripString = StringUtils.stripPrefixRegex(testString, regex); + + assertThat(stripString, nullValue()); + } + + @Test + public void testStripStringRegexEmptyString() throws Exception { + String testString = ""; + String regex = "\\/aai\\/v[0-9]*\\/"; + + String stripString = StringUtils.stripPrefixRegex(testString, regex); + + assertThat(stripString, is(testString)); + } + + @Test + public void testStripStringRegexNullRegex() throws Exception { + String testString = "test"; + String regex = null; + + String stripString = StringUtils.stripPrefixRegex(testString, regex); + + assertThat(stripString, is(testString)); + } + + @Test + public void testStripStringRegexEmptyRegex() throws Exception { + String testString = "test"; + String regex = ""; + + String stripString = StringUtils.stripPrefixRegex(testString, regex); + + assertThat(stripString, is(testString)); + } + + @Test(expected = ValidationServiceException.class) + public void testStripStringRegexInvalidRegex() throws Exception { + String prefixDelimiter = "/aai/v8/"; + String prefix = "prefix"; + String suffix = "suffix"; + String testString = prefix + prefixDelimiter + suffix; + String regex = "***"; + + StringUtils.stripPrefixRegex(testString, regex); + } + + @Test + public void testStripStringRegexLimitedPrefix() throws Exception { + String prefixDelimiter = "/aai/v8/"; + String suffix = "suffix"; + String testString = prefixDelimiter + suffix; + String regex = "\\/aai\\/v[0-9]*\\/"; + + String stripString = StringUtils.stripPrefixRegex(testString, regex); + + assertThat(stripString, is(suffix)); + } +} diff --git a/src/test/resources/aai-environment.properties b/src/test/resources/aai-environment.properties new file mode 100644 index 0000000..463a2b0 --- /dev/null +++ b/src/test/resources/aai-environment.properties @@ -0,0 +1,31 @@ +# ============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===================================================== + +# This file is used by various tests (src/test and src/integration-test) as it loaded from the classpath +host=localhost +port=8443 +httpProtocol=file +trustStorePath=src/main/resources/authentication/tomcat_keystore +trustStorePassword.x=70c87528c88dcd9f9c2558d30e817868 +keyStorePath=src/main/resources/authentication/aai-client-cert.p12 +keyStorePassword.x=70c87528c88dcd9f9c2558d30e817868 +keyManagerFactoryAlgorithm=SunX509 +keyStoreType=PKCS12 +securityProtocol=TLS +connectionTimeout=5000 +readTimeout=1000 + +baseModelURI=src/test/resources/model-validation/instance-validator/all-models.xml
\ No newline at end of file diff --git a/src/test/resources/auth/auth_policy.json b/src/test/resources/auth/auth_policy.json new file mode 100644 index 0000000..2bf63d1 --- /dev/null +++ b/src/test/resources/auth/auth_policy.json @@ -0,0 +1,55 @@ +{"roles": [ + { + "name": "admin", + "functions": [ + { + "name": "actions", + "methods": [ + {"name": "GET"}, + {"name": "DELETE"}, + {"name": "PUT"} + ] + }, + { + "name": "validate", + "methods": [{"name": "POST"}] + } + ], + "users": [ + {"username": "CN=common-name, OU=org-unit, O=org, L=location, ST=state, C=US"}, + {"username": "CN=test, OU=qa, O=Test Ltd, L=London, ST=London, C=GB"} + ] + }, + { + "name": "ops", + "functions": [{ + "name": "actions", + "methods": [{"name": "POST"}] + }], + "users": [ + {"username": "CN=common-name, OU=org-unit, O=org, L=location, ST=state, C=US"}, + {"username": "CN=test, OU=qa, O=Test Ltd, L=London, ST=London, C=GB"} + ] + }, + { + "name": "basicauth", + "functions": [{ + "name": "util", + "methods": [{"name": "GET"}] + }], + "users": [{ + "user": "aai", + "pass": "OBF:1u2a1t2v1vgb1s3g1s3m1vgj1t3b1u30" + }] + }, + { + "name": "nofuncauth", + "functions": [{ + "name": "nofuncutil" + }], + "users": [{ + "user": "aai", + "pass": "OBF:1u2a1t2v1vgb1s3g1s3m1vgj1t3b1u30" + }] + } +]} diff --git a/src/test/resources/event-reader/generic-vnf-create-event.json b/src/test/resources/event-reader/generic-vnf-create-event.json new file mode 100644 index 0000000..94235b7 --- /dev/null +++ b/src/test/resources/event-reader/generic-vnf-create-event.json @@ -0,0 +1,75 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525111931-22f454f0-93ff-4571-bed0-573ca6c85353", + "timestamp": "20160525-11:19:31:421", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v7", + "action": "CREATE", + "entity-type": "generic-vnf", + "top-entity-type": "generic-vnf", + "entity-link": "https://dummy-host.onap.org:8443/aai/v7/network/generic-vnfs/generic-vnf/VAPP-1581", + "topic-name": "topicName", + "event-id": "7994f700-766b-47ed-a322-194346edd92e" + }, + "entity": { + "vnf-id": "VAPP-1581", + "vnf-name": "example-vnf-name-val-3501", + "vnf-name2": "example-vnf-name2-val-3501", + "vnf-type": "example-vnf-type-val-3501", + "regional-resource-zone": "example-regional-resource-zone-val-3501", + "prov-status": "example-prov-status-val-3501", + "operational-state": "example-operational-state-val-3501", + "license-key": "example-license-key-val-3501", + "equipment-role": "example-equipment-role-val-3501", + "orchestration-status": "example-orchestration-status-val-3501", + "heat-stack-id": "example-heat-stack-id-val-3501", + "mso-catalog-key": "example-mso-catalog-key-val-3501", + "management-option": "example-management-option-val-3501", + "ipv4-oam-address": "example-ipv4-oam-address-val-3501", + "ipv4-loopback0-address": "example-ipv4-loopback0-address-val-3501", + "nm-lan-v6-address": "example-nm-lan-v6-address-val-3501", + "management-v6-address": "example-management-v6-address-val-3501", + "vcpu": 1817, + "vcpu-units": "example-vcpu-units-val-3501", + "vmemory": 6020, + "vmemory-units": "example-vmemory-units-val-3501", + "vdisk": 5281, + "vdisk-units": "example-vdisk-units-val-3501", + "in-maint": false, + "is-closed-loop-disabled": true, + "resource-version": "1464189571", + "relationship-list": { + "relationship": { + "related-to": "logical-link", + "related-link": "https://loopback.onap.org:8443/aai/v7/network/logical-links/logical-link/link-01/", + "relationship-data": { + "relationship-key": "logical-link.link-name", + "relationship-value": "link-01" + } + } + }, + "l-interfaces": { + + }, + "lag-interfaces": { + "lag-interface": { + "interface-name": "example-interface-name-val-3131", + "resource-version": "1464189571", + "relationship-list": { + + }, + "l-interfaces": { + + } + } + }, + "vf-modules": { + + } + } +}
\ No newline at end of file diff --git a/src/test/resources/event-reader/invalid-event-1.json b/src/test/resources/event-reader/invalid-event-1.json new file mode 100644 index 0000000..523c9d8 --- /dev/null +++ b/src/test/resources/event-reader/invalid-event-1.json @@ -0,0 +1,165 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type-MISSING": "AAI-EVENT", + "version": "v7", + "action": "CREATE", + "entity-type-MISSING": "vserver", + "top-entity-type": "cloud-region", + "entity-link": "https://dummy-host.onap.org:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666", + "topic-name": "topicName", + "event-id": "7994f700-766b-47ed-a322-194346edd92e" + }, + "entity": { + "cloud-owner": "region1", + "cloud-region-id": "AAIregion1", + "tenants": { + "tenant": [ + { + "tenant-id": "example-tenant-id-val-88551", + "tenant-name": "example-tenant-name-val-88551", + "vservers": { + "vserver": [ + { + "vserver-id": "example-vserver-id-val-34666", + "vserver-name": "example-vserver-name-val-34666", + "vserver-name2": "example-vserver-name2-val-34666", + "prov-status": "PREPROV", + "vserver-selflink": "example-vserver-selflink-val-34666", + "in-maint": true, + "is-closed-loop-disabled": true, + "resource-version": "1464193654", + "volumes": { + "volume": [ + { + "volume-id": "example-volume-id-val-79195", + "volume-selflink": "example-volume-selflink-val-79195", + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + }, + "relationship-list": { + + }, + "l-interfaces": { + "l-interface": [ + { + "interface-name": "example-interface-name-val-25679", + "interface-role": "example-interface-role-val-25679", + "v6-wan-link-ip": "example-v6-wan-link-ip-val-25679", + "selflink": "example-selflink-val-25679", + "interface-id": "example-interface-id-val-25679", + "macaddr": "example-macaddr-val-25679", + "network-name": "example-network-name-val-25679", + "resource-version": "1464193654", + "vlans": { + "vlan": [ + { + "vlan-interface": "example-vlan-interface-val-28675", + "vlan-id-inner": 22278797, + "vlan-id-outer": 22278797, + "resource-version": "1464193654", + "speed-value": "example-speed-value-val-28675", + "speed-units": "example-speed-units-val-28675", + "vlan-description": "example-vlan-description-val-28675", + "relationship-list": { + + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-39271", + "l3-interface-ipv4-prefix-length": 78868308, + "vlan-id-inner": 78868308, + "vlan-id-outer": 78868308, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-4005", + "l3-interface-ipv6-prefix-length": 78340763, + "vlan-id-inner": 78340763, + "vlan-id-outer": 78340763, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + } + ] + }, + "sriov-vfs": { + "sriov-vf": [ + { + "pci-id": "example-pci-id-val-85354", + "vf-vlan-filter": "example-vf-vlan-filter-val-85354", + "vf-mac-filter": "example-vf-mac-filter-val-85354", + "vf-vlan-strip": true, + "vf-vlan-anti-spoof-check": true, + "vf-mac-anti-spoof-check": true, + "vf-mirrors": "example-vf-mirrors-val-85354", + "vf-broadcast-allow": true, + "vf-unknown-multicast-allow": true, + "vf-unknown-unicast-allow": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + }, + "relationship-list": { + + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-21446", + "l3-interface-ipv4-prefix-length": 71127022, + "vlan-id-inner": 71127022, + "vlan-id-outer": 71127022, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-88071", + "l3-interface-ipv6-prefix-length": 55080281, + "vlan-id-inner": 55080281, + "vlan-id-outer": 55080281, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + } + ] + } + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/src/test/resources/event-reader/invalid-event-2.json b/src/test/resources/event-reader/invalid-event-2.json new file mode 100644 index 0000000..5d9def7 --- /dev/null +++ b/src/test/resources/event-reader/invalid-event-2.json @@ -0,0 +1,165 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v7", + "action": "CREATE", + "entity-type": "UNKNOWN-ENTITY-TYPE", + "top-entity-type": "cloud-region", + "entity-link": "https://dummy-host.onap.org:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666", + "topic-name": "topicName", + "event-id": "7994f700-766b-47ed-a322-194346edd92e" + }, + "entity": { + "cloud-owner": "region1", + "cloud-region-id": "AAIregion1", + "tenants": { + "tenant": [ + { + "tenant-id": "example-tenant-id-val-88551", + "tenant-name": "example-tenant-name-val-88551", + "vservers": { + "vserver": [ + { + "vserver-id": "example-vserver-id-val-34666", + "vserver-name": "example-vserver-name-val-34666", + "vserver-name2": "example-vserver-name2-val-34666", + "prov-status": "PREPROV", + "vserver-selflink": "example-vserver-selflink-val-34666", + "in-maint": true, + "is-closed-loop-disabled": true, + "resource-version": "1464193654", + "volumes": { + "volume": [ + { + "volume-id": "example-volume-id-val-79195", + "volume-selflink": "example-volume-selflink-val-79195", + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + }, + "relationship-list": { + + }, + "l-interfaces": { + "l-interface": [ + { + "interface-name": "example-interface-name-val-25679", + "interface-role": "example-interface-role-val-25679", + "v6-wan-link-ip": "example-v6-wan-link-ip-val-25679", + "selflink": "example-selflink-val-25679", + "interface-id": "example-interface-id-val-25679", + "macaddr": "example-macaddr-val-25679", + "network-name": "example-network-name-val-25679", + "resource-version": "1464193654", + "vlans": { + "vlan": [ + { + "vlan-interface": "example-vlan-interface-val-28675", + "vlan-id-inner": 22278797, + "vlan-id-outer": 22278797, + "resource-version": "1464193654", + "speed-value": "example-speed-value-val-28675", + "speed-units": "example-speed-units-val-28675", + "vlan-description": "example-vlan-description-val-28675", + "relationship-list": { + + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-39271", + "l3-interface-ipv4-prefix-length": 78868308, + "vlan-id-inner": 78868308, + "vlan-id-outer": 78868308, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-4005", + "l3-interface-ipv6-prefix-length": 78340763, + "vlan-id-inner": 78340763, + "vlan-id-outer": 78340763, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + } + ] + }, + "sriov-vfs": { + "sriov-vf": [ + { + "pci-id": "example-pci-id-val-85354", + "vf-vlan-filter": "example-vf-vlan-filter-val-85354", + "vf-mac-filter": "example-vf-mac-filter-val-85354", + "vf-vlan-strip": true, + "vf-vlan-anti-spoof-check": true, + "vf-mac-anti-spoof-check": true, + "vf-mirrors": "example-vf-mirrors-val-85354", + "vf-broadcast-allow": true, + "vf-unknown-multicast-allow": true, + "vf-unknown-unicast-allow": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + }, + "relationship-list": { + + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-21446", + "l3-interface-ipv4-prefix-length": 71127022, + "vlan-id-inner": 71127022, + "vlan-id-outer": 71127022, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-88071", + "l3-interface-ipv6-prefix-length": 55080281, + "vlan-id-inner": 55080281, + "vlan-id-outer": 55080281, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + } + ] + } + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/src/test/resources/event-reader/invalid-event-3.json b/src/test/resources/event-reader/invalid-event-3.json new file mode 100644 index 0000000..20160a8 --- /dev/null +++ b/src/test/resources/event-reader/invalid-event-3.json @@ -0,0 +1,75 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525111931-22f454f0-93ff-4571-bed0-573ca6c85353", + "timestamp": "20160525-11:19:31:421", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v7", + "action": "CREATE", + "entity-type": "UNKNOWN-ENTITY-TYPE", + "top-entity-type": "UNKNOWN-ENTITY-TYPE", + "entity-link": "https://dummy-host.onap.org:8443/aai/v7/network/generic-vnfs/generic-vnf/VAPP-1581", + "topic-name": "topicName", + "event-id": "7994f700-766b-47ed-a322-194346edd92e" + }, + "entity": { + "vnf-id": "VAPP-1581", + "vnf-name": "example-vnf-name-val-3501", + "vnf-name2": "example-vnf-name2-val-3501", + "vnf-type": "example-vnf-type-val-3501", + "regional-resource-zone": "example-regional-resource-zone-val-3501", + "prov-status": "example-prov-status-val-3501", + "operational-state": "example-operational-state-val-3501", + "license-key": "example-license-key-val-3501", + "equipment-role": "example-equipment-role-val-3501", + "orchestration-status": "example-orchestration-status-val-3501", + "heat-stack-id": "example-heat-stack-id-val-3501", + "mso-catalog-key": "example-mso-catalog-key-val-3501", + "management-option": "example-management-option-val-3501", + "ipv4-oam-address": "example-ipv4-oam-address-val-3501", + "ipv4-loopback0-address": "example-ipv4-loopback0-address-val-3501", + "nm-lan-v6-address": "example-nm-lan-v6-address-val-3501", + "management-v6-address": "example-management-v6-address-val-3501", + "vcpu": 1817, + "vcpu-units": "example-vcpu-units-val-3501", + "vmemory": 6020, + "vmemory-units": "example-vmemory-units-val-3501", + "vdisk": 5281, + "vdisk-units": "example-vdisk-units-val-3501", + "in-maint": false, + "is-closed-loop-disabled": true, + "resource-version": "1464189571", + "relationship-list": { + "relationship": { + "related-to": "logical-link", + "related-link": "https://loopback.onap.org:8443/aai/v7/network/logical-links/logical-link/link-01/", + "relationship-data": { + "relationship-key": "logical-link.link-name", + "relationship-value": "link-01" + } + } + }, + "l-interfaces": { + + }, + "lag-interfaces": { + "lag-interface": { + "interface-name": "example-interface-name-val-3131", + "resource-version": "1464189571", + "relationship-list": { + + }, + "l-interfaces": { + + } + } + }, + "vf-modules": { + + } + } +}
\ No newline at end of file diff --git a/src/test/resources/event-reader/invalid-event-4.json b/src/test/resources/event-reader/invalid-event-4.json new file mode 100644 index 0000000..eb1a489 --- /dev/null +++ b/src/test/resources/event-reader/invalid-event-4.json @@ -0,0 +1,150 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v7", + "action": "CREATE", + "entity-type": "vserver", + "top-entity-type": "cloud-region", + "entity-link": "https://dummy-host.onap.org:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666", + "topic-name": "topicName", + "event-id": "7994f700-766b-47ed-a322-194346edd92e" + }, + "entity": { + "cloud-owner": "region1", + "cloud-region-id": "AAIregion1", + "tenants": { + "tenant": [ + { + "tenant-id": "example-tenant-id-val-88551", + "tenant-name": "example-tenant-name-val-88551", + "vservers": { + "vserver": [ + { + "vserver-id": "!!!!! TOO_MANY_ENTITIES !!!!!" + }, + { + "vserver-id": "example-vserver-id-val-34666", + "vserver-name": "example-vserver-name-val-34666", + "vserver-name2": "example-vserver-name2-val-34666", + "prov-status": "PREPROV", + "vserver-selflink": "example-vserver-selflink-val-34666", + "in-maint": true, + "is-closed-loop-disabled": true, + "resource-version": "1464193654", + "volumes": { + "volume": [ + { + "volume-id": "example-volume-id-val-79195", + "volume-selflink": "example-volume-selflink-val-79195", + "resource-version": "1464193654", + "relationship-list": {} + } + ] + }, + "relationship-list": {}, + "l-interfaces": { + "l-interface": [ + { + "interface-name": "example-interface-name-val-25679", + "interface-role": "example-interface-role-val-25679", + "v6-wan-link-ip": "example-v6-wan-link-ip-val-25679", + "selflink": "example-selflink-val-25679", + "interface-id": "example-interface-id-val-25679", + "macaddr": "example-macaddr-val-25679", + "network-name": "example-network-name-val-25679", + "resource-version": "1464193654", + "vlans": { + "vlan": [ + { + "vlan-interface": "example-vlan-interface-val-28675", + "vlan-id-inner": 22278797, + "vlan-id-outer": 22278797, + "resource-version": "1464193654", + "speed-value": "example-speed-value-val-28675", + "speed-units": "example-speed-units-val-28675", + "vlan-description": "example-vlan-description-val-28675", + "relationship-list": {}, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-39271", + "l3-interface-ipv4-prefix-length": 78868308, + "vlan-id-inner": 78868308, + "vlan-id-outer": 78868308, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": {} + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-4005", + "l3-interface-ipv6-prefix-length": 78340763, + "vlan-id-inner": 78340763, + "vlan-id-outer": 78340763, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": {} + } + ] + } + ] + }, + "sriov-vfs": { + "sriov-vf": [ + { + "pci-id": "example-pci-id-val-85354", + "vf-vlan-filter": "example-vf-vlan-filter-val-85354", + "vf-mac-filter": "example-vf-mac-filter-val-85354", + "vf-vlan-strip": true, + "vf-vlan-anti-spoof-check": true, + "vf-mac-anti-spoof-check": true, + "vf-mirrors": "example-vf-mirrors-val-85354", + "vf-broadcast-allow": true, + "vf-unknown-multicast-allow": true, + "vf-unknown-unicast-allow": true, + "resource-version": "1464193654", + "relationship-list": {} + } + ] + }, + "relationship-list": {}, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-21446", + "l3-interface-ipv4-prefix-length": 71127022, + "vlan-id-inner": 71127022, + "vlan-id-outer": 71127022, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": {} + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-88071", + "l3-interface-ipv6-prefix-length": 55080281, + "vlan-id-inner": 55080281, + "vlan-id-outer": 55080281, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": {} + } + ] + } + ] + } + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/src/test/resources/event-reader/invalid-event-5.json b/src/test/resources/event-reader/invalid-event-5.json new file mode 100644 index 0000000..c05ab30 --- /dev/null +++ b/src/test/resources/event-reader/invalid-event-5.json @@ -0,0 +1,165 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v7", + "action": "CREATE", + "entity-type": "vserver", + "top-entity-type": "cloud-region", + "entity-link": "https://dummy-host.onap.org:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666", + "topic-name": "topicName", + "event-id": "7994f700-766b-47ed-a322-194346edd92e" + }, + "entity": { + "cloud-owner": "region1", + "cloud-region-id": "AAIregion1", + "tenants": { + "tenant": [ + { + "tenant-id": "example-tenant-id-val-88551", + "tenant-name": "example-tenant-name-val-88551", + "vservers": { + "vserver": [ + { + "vserver-id": "example-vserver-id-val-34666", + "vserver-name": "example-vserver-name-val-34666", + "vserver-name2": "example-vserver-name2-val-34666", + "prov-status": "PREPROV", + "vserver-selflink": "example-vserver-selflink-val-34666", + "in-maint": true, + "is-closed-loop-disabled": true, + "resource-version-MISSING": "1464193654", + "volumes": { + "volume": [ + { + "volume-id": "example-volume-id-val-79195", + "volume-selflink": "example-volume-selflink-val-79195", + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + }, + "relationship-list": { + + }, + "l-interfaces": { + "l-interface": [ + { + "interface-name": "example-interface-name-val-25679", + "interface-role": "example-interface-role-val-25679", + "v6-wan-link-ip": "example-v6-wan-link-ip-val-25679", + "selflink": "example-selflink-val-25679", + "interface-id": "example-interface-id-val-25679", + "macaddr": "example-macaddr-val-25679", + "network-name": "example-network-name-val-25679", + "resource-version": "1464193654", + "vlans": { + "vlan": [ + { + "vlan-interface": "example-vlan-interface-val-28675", + "vlan-id-inner": 22278797, + "vlan-id-outer": 22278797, + "resource-version": "1464193654", + "speed-value": "example-speed-value-val-28675", + "speed-units": "example-speed-units-val-28675", + "vlan-description": "example-vlan-description-val-28675", + "relationship-list": { + + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-39271", + "l3-interface-ipv4-prefix-length": 78868308, + "vlan-id-inner": 78868308, + "vlan-id-outer": 78868308, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-4005", + "l3-interface-ipv6-prefix-length": 78340763, + "vlan-id-inner": 78340763, + "vlan-id-outer": 78340763, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + } + ] + }, + "sriov-vfs": { + "sriov-vf": [ + { + "pci-id": "example-pci-id-val-85354", + "vf-vlan-filter": "example-vf-vlan-filter-val-85354", + "vf-mac-filter": "example-vf-mac-filter-val-85354", + "vf-vlan-strip": true, + "vf-vlan-anti-spoof-check": true, + "vf-mac-anti-spoof-check": true, + "vf-mirrors": "example-vf-mirrors-val-85354", + "vf-broadcast-allow": true, + "vf-unknown-multicast-allow": true, + "vf-unknown-unicast-allow": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + }, + "relationship-list": { + + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-21446", + "l3-interface-ipv4-prefix-length": 71127022, + "vlan-id-inner": 71127022, + "vlan-id-outer": 71127022, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-88071", + "l3-interface-ipv6-prefix-length": 55080281, + "vlan-id-inner": 55080281, + "vlan-id-outer": 55080281, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + } + ] + } + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/src/test/resources/event-reader/test-validation-service-beans.xml b/src/test/resources/event-reader/test-validation-service-beans.xml new file mode 100644 index 0000000..0d60484 --- /dev/null +++ b/src/test/resources/event-reader/test-validation-service-beans.xml @@ -0,0 +1,38 @@ +<?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: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.xsd"> + + <import resource="../oxm-reader/oxm-reader-beans.xml" /> + + <context:property-placeholder location="classpath:event-reader.properties" /> + + <bean id="eventReaderConfig" class="org.onap.aai.validation.config.EventReaderConfig" /> + + <bean id="jsonReader" class="org.onap.aai.validation.reader.JsonReader" /> + + <bean id="eventReader" class="org.onap.aai.validation.reader.EventReader"> + <constructor-arg ref="eventReaderConfig" /> + <constructor-arg ref="jsonReader" /> + <constructor-arg ref="oxmReader" /> + </bean> +</beans> diff --git a/src/test/resources/event-reader/vserver-create-event.json b/src/test/resources/event-reader/vserver-create-event.json new file mode 100644 index 0000000..46f22c4 --- /dev/null +++ b/src/test/resources/event-reader/vserver-create-event.json @@ -0,0 +1,165 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v7", + "action": "CREATE", + "entity-type": "vserver", + "top-entity-type": "cloud-region", + "entity-link": "https://dummy-host.onap.org:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666", + "topic-name": "topicName", + "event-id": "7994f700-766b-47ed-a322-194346edd92e" + }, + "entity": { + "cloud-owner": "region1", + "cloud-region-id": "AAIregion1", + "tenants": { + "tenant": [ + { + "tenant-id": "example-tenant-id-val-88551", + "tenant-name": "example-tenant-name-val-88551", + "vservers": { + "vserver": [ + { + "vserver-id": "example-vserver-id-val-34666", + "vserver-name": "example-vserver-name-val-34666", + "vserver-name2": "example-vserver-name2-val-34666", + "prov-status": "PREPROV", + "vserver-selflink": "example-vserver-selflink-val-34666", + "in-maint": true, + "is-closed-loop-disabled": true, + "resource-version": "1464193654", + "volumes": { + "volume": [ + { + "volume-id": "example-volume-id-val-79195", + "volume-selflink": "example-volume-selflink-val-79195", + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + }, + "relationship-list": { + + }, + "l-interfaces": { + "l-interface": [ + { + "interface-name": "example-interface-name-val-25679", + "interface-role": "example-interface-role-val-25679", + "v6-wan-link-ip": "example-v6-wan-link-ip-val-25679", + "selflink": "example-selflink-val-25679", + "interface-id": "example-interface-id-val-25679", + "macaddr": "example-macaddr-val-25679", + "network-name": "example-network-name-val-25679", + "resource-version": "1464193654", + "vlans": { + "vlan": [ + { + "vlan-interface": "example-vlan-interface-val-28675", + "vlan-id-inner": 22278797, + "vlan-id-outer": 22278797, + "resource-version": "1464193654", + "speed-value": "example-speed-value-val-28675", + "speed-units": "example-speed-units-val-28675", + "vlan-description": "example-vlan-description-val-28675", + "relationship-list": { + + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-39271", + "l3-interface-ipv4-prefix-length": 78868308, + "vlan-id-inner": 78868308, + "vlan-id-outer": 78868308, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-4005", + "l3-interface-ipv6-prefix-length": 78340763, + "vlan-id-inner": 78340763, + "vlan-id-outer": 78340763, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + } + ] + }, + "sriov-vfs": { + "sriov-vf": [ + { + "pci-id": "example-pci-id-val-85354", + "vf-vlan-filter": "example-vf-vlan-filter-val-85354", + "vf-mac-filter": "example-vf-mac-filter-val-85354", + "vf-vlan-strip": true, + "vf-vlan-anti-spoof-check": true, + "vf-mac-anti-spoof-check": true, + "vf-mirrors": "example-vf-mirrors-val-85354", + "vf-broadcast-allow": true, + "vf-unknown-multicast-allow": true, + "vf-unknown-unicast-allow": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + }, + "relationship-list": { + + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-21446", + "l3-interface-ipv4-prefix-length": 71127022, + "vlan-id-inner": 71127022, + "vlan-id-outer": 71127022, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-88071", + "l3-interface-ipv6-prefix-length": 55080281, + "vlan-id-inner": 55080281, + "vlan-id-outer": 55080281, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + } + ] + } + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/src/test/resources/info-service/test-validation-service-beans.xml b/src/test/resources/info-service/test-validation-service-beans.xml new file mode 100644 index 0000000..d1c6ace --- /dev/null +++ b/src/test/resources/info-service/test-validation-service-beans.xml @@ -0,0 +1,120 @@ +<?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: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.xsd"> + + <import resource="../oxm-reader/oxm-reader-beans.xml" /> + + <!-- PROPERTY FILES --> + <context:property-placeholder location="classpath:event-reader.properties" + ignore-unresolvable="true" /> + <context:property-placeholder location="classpath:validation-service.properties" + ignore-unresolvable="true" /> + <context:property-placeholder location="classpath:aai-environment.properties" + ignore-unresolvable="true" /> + + <!-- CONFIG BEANS --> + <bean id="eventReaderConfig" class="org.onap.aai.validation.config.EventReaderConfig" /> + <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" /> + </bean> + <bean id="modelConfig" class="org.onap.aai.validation.config.ModelConfig"> + <property name="modelCacheExpirySeconds" value="${model.cache.expirySeconds}" /> + </bean> + + <bean id="restConfig" class="org.onap.aai.validation.config.RestConfig"> + <property name="host" value="${host}" /> + <property name="port" value="${port}" /> + <property name="protocol" value="${httpProtocol}" /> + <property name="baseModelURI" value="${baseModelURI}" /> + <property name="trustStorePath" value="${trustStorePath}" /> + <property name="trustStorePassword" value="${trustStorePassword.x}" /> + <property name="keyStorePath" value="${keyStorePath}" /> + <property name="keyStorePassword" value="${keyStorePassword.x}" /> + <property name="keyManagerFactoryAlgorithm" value="${keyManagerFactoryAlgorithm}" /> + <property name="keyStoreType" value="${keyStoreType}" /> + <property name="securityProtocol" value="${securityProtocol}" /> + <property name="connectionTimeout" value="${connectionTimeout}" /> + <property name="readTimeout" value="${readTimeout}" /> + </bean> + + <!-- READER BEANS --> + <bean id="jsonReader" class="org.onap.aai.validation.reader.JsonReader" /> + + <bean id="eventReader" class="org.onap.aai.validation.reader.EventReader"> + <constructor-arg ref="eventReaderConfig" /> + <constructor-arg ref="jsonReader" /> + <constructor-arg ref="oxmReader" /> + </bean> + + <bean id="messagePublisher" class="org.onap.aai.validation.publisher.MockEventPublisher"> + </bean> + + <bean id="validationController" class="org.onap.aai.validation.controller.ValidationController"> + <constructor-arg ref="validationControllerConfig" /> + <constructor-arg ref="eventReader" /> + <constructor-arg ref="ruleDrivenValidator" /> + <constructor-arg ref="modelDrivenValidator" /> + <constructor-arg ref="messagePublisher" /> + </bean> + + <!-- RULE VALIDATION BEANS --> + <bean id="rulesConfigurationPath" class="java.nio.file.Paths" factory-method="get"> + <constructor-arg value="src/test/resources/rule-driven-validator/rules/" /> + <constructor-arg> + <array /> + </constructor-arg> + </bean> + + <bean id="ruleDrivenValidator" class="org.onap.aai.validation.ruledriven.RuleDrivenValidator"> + <constructor-arg ref="rulesConfigurationPath" /> + <constructor-arg ref="oxmReader" /> + <constructor-arg ref="eventReader" /> + <constructor-arg name="ruleIndexingConfig"> + <null /> + </constructor-arg> + </bean> + + <!-- MODEL VALIDATION BEANS --> + <bean id="modelCacheManager" class="org.onap.aai.validation.modeldriven.ModelCacheManager"> + <constructor-arg ref="modelConfig" /> + <constructor-arg ref="restConfig" /> + </bean> + + <bean id="modelInstanceMappingReader" class="org.onap.aai.validation.modeldriven.configuration.mapping.ModelInstanceMappingReader"> + <constructor-arg ref="mappingFile" /> + </bean> + + <bean id="instanceReader" class="org.onap.aai.validation.modeldriven.validator.InstanceReader"> + <constructor-arg ref="jsonReader" /> + <constructor-arg ref="oxmReader" /> + </bean> + + <bean id="modelDrivenValidator" class="org.onap.aai.validation.modeldriven.validator.ModelDrivenValidator"> + <constructor-arg ref="modelCacheManager" /> + <constructor-arg ref="modelInstanceMappingReader" /> + <constructor-arg ref="instanceReader" /> + <constructor-arg ref="eventReader" /> + </bean> +</beans> diff --git a/src/test/resources/json-reader/sample.json b/src/test/resources/json-reader/sample.json new file mode 100644 index 0000000..26bb497 --- /dev/null +++ b/src/test/resources/json-reader/sample.json @@ -0,0 +1,13 @@ +{ + "event-header": { + "entity-type": "vserver", + "sample-integer": 1, + "sample-boolean": true, + "sample-object": { + "property": "value" + }, + "sample-array": [ + "one" + ] + } +}
\ No newline at end of file diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml new file mode 100644 index 0000000..47c6154 --- /dev/null +++ b/src/test/resources/logback.xml @@ -0,0 +1,180 @@ +<?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===================================================== +--> + +<configuration scan="true" scanPeriod="30 seconds" debug="true"> + <property name="componentName" value="AAI-VS" /> + <property name="logDirectory" value="${APP_HOME}/logs/${componentName}" /> + + <!-- default EELF log file names --> + <property name="generalLogName" value="error" /> + <property name="metricsLogName" value="metrics" /> + <property name="auditLogName" value="audit" /> + <property name="debugLogName" value="debug" /> + + <property name="errorLogPattern" + value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{RequestId}|%thread|%mdc{ServiceName}|%mdc{PartnerName}|%mdc{TargetEntity}|%mdc{TargetServiceName}|%.-5level|%logger|%mdc{ClassName}|%msg%n" /> + + <property name="auditLogPattern" + value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{BeginTimestamp}|%mdc{EndTimestamp}|%mdc{RequestId}|%mdc{ServiceInstanceId}|%thread|%mdc{ServerFQDN}|%mdc{ServiceName}|%mdc{PartnerName}|%mdc{StatusCode}|%mdc{ResponseCode}|%mdc{ResponseDescription}|%logger|%.-5level|||%mdc{ElapsedTime}|%mdc{RemoteHost}|%mdc{ClientAddress}|%mdc{ClassName}|||%msg%n" /> + + <property name="metricsLogPattern" + value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{BeginTimestamp}|%mdc{EndTimestamp}|%mdc{RequestId}|%mdc{ServiceInstanceId}|%thread|%mdc{ServerFQDN}|%mdc{ServiceName}|%mdc{PartnerName}|%mdc{TargetEntity}|%mdc{TargetServiceName}|%mdc{StatusCode}|%mdc{ResponseCode}|%mdc{ResponseDescription}|%logger|%.-5level|||%mdc{ElapsedTime}|%mdc{RemoteHost}|%mdc{ClientAddress}|%mdc{ClassName}|||%msg%n" /> + + <!-- ============================================================================ --> + <!-- EELF Appenders --> + <!-- ============================================================================ --> + + <appender name="EELF" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${generalLogName}.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip + </fileNamePattern> + <maxHistory>60</maxHistory> + </rollingPolicy> + <encoder> + <pattern>${errorLogPattern}</pattern> + </encoder> + </appender> + <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender"> + <!-- deny all events with a level below INFO, that is TRACE and DEBUG --> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>INFO</level> + </filter> + <queueSize>256</queueSize> + <appender-ref ref="EELF" /> + </appender> + + <!-- EELF Audit Appender. This appender is used to record audit engine related logging events. The audit logger and appender + are specializations of the EELF application root logger and appender. This can be used to segregate Policy engine events + from other components, or it can be eliminated to record these events as part of the application root log. --> + + <appender name="EELFAudit" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${auditLogName}.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip + </fileNamePattern> + <maxHistory>60</maxHistory> + </rollingPolicy> + <encoder> + <pattern>${auditLogPattern}</pattern> + </encoder> + </appender> + <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFAudit" /> + </appender> + + <appender name="EELFMetrics" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${metricsLogName}.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip + </fileNamePattern> + <maxHistory>60</maxHistory> + </rollingPolicy> + <encoder> + <pattern>${metricsLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFMetrics" /> + </appender> + + <appender name="EELFDebug" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file> + ${logDirectory}/${debugLogName}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip + </fileNamePattern> + <maxHistory>60</maxHistory> + </rollingPolicy> + <encoder> + <pattern>${errorLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender"> + <!-- allow only events with a level below INFO, that is TRACE and DEBUG --> + <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> + <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator"> + <expression> + e.level.toInt() < INFO.toInt() + </expression> + </evaluator> + <OnMismatch>DENY</OnMismatch> + <OnMatch>NEUTRAL</OnMatch> + </filter> + <queueSize>256</queueSize> + <appender-ref ref="EELFDebug" /> + <includeCallerData>false</includeCallerData> + </appender> + + <!-- ============================================================================ --> + <!-- Default / root appenders --> + <!-- ============================================================================ --> + + <root level="DEBUG"> + <appender-ref ref="asyncEELF" /> + <appender-ref ref="asyncEELFDebug" /> + </root> + + <!-- ============================================================================ --> + <!-- EELF loggers --> + <!-- ============================================================================ --> + + <logger name="com.att.eelf" level="INFO" additivity="false"> + <appender-ref ref="asyncEELF" /> + </logger> + + <logger name="com.att.eelf.debug" level="DEBUG" additivity="false"> + <appender-ref ref="asyncEELFDebug" /> + </logger> + + <logger name="com.att.eelf.audit" level="INFO" additivity="false"> + <appender-ref ref="asyncEELFAudit" /> + </logger> + + <logger name="com.att.eelf.metrics" level="INFO" additivity="false"> + <appender-ref ref="asyncEELFMetrics" /> + </logger> + + <!-- ============================================================================ --> + <!-- Non-EELF loggers --> + <!-- ============================================================================ --> + + <!-- ATT packages including DMAAP message routing --> + <logger name="com.att" level="DEBUG" /> + + <!-- Spring related loggers --> + <logger name="org.springframework" level="WARN" /> + <logger name="org.springframework.beans" level="WARN" /> + <logger name="org.springframework.web" level="WARN" /> + + <!-- Other Loggers that may help troubleshoot --> + <logger name="org.apache" level="WARN" /> + <logger name="org.apache.commons" level="WARN" /> + <logger name="com.jayway.jsonpath.internal.path.CompiledPath" level="WARN" /> + + <!-- logback internals logging --> + <logger name="ch.qos.logback.classic" level="WARN" /> + <logger name="ch.qos.logback.core" level="WARN" /> + +</configuration> diff --git a/src/test/resources/model-instance-mapping.json_conf b/src/test/resources/model-instance-mapping.json_conf new file mode 100644 index 0000000..12d39ea --- /dev/null +++ b/src/test/resources/model-instance-mapping.json_conf @@ -0,0 +1,28 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "id": "relationship-list/relationship/relationship-data/relationship-value[../relationship-key/text()='model.model-name-version-id']", + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']", + "filter": { + "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']", + "valid": ["widget"] + } + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + }, + { + "mappingType": "ATTRIBUTE", + "model": { + "value": "metadata/metadatum/metaname" + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "value": "$..extra-properties.metadatum[*].metaname" + } + } +] diff --git a/src/test/resources/model-validation/instance-reader/connector-attributes.json b/src/test/resources/model-validation/instance-reader/connector-attributes.json new file mode 100644 index 0000000..3a4536f --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/connector-attributes.json @@ -0,0 +1,399 @@ +{ + "inventory-response-item": [ + { + "model-name": "WAN Connector v0.1", + "connector": { + "resource-instance-id": "100559", + "resource-version": "1465571381", + "persona-model-id": "dc700a83-c507-47d9-b775-1fdfcdd5f9eb", + "persona-model-version": "0.1" + }, + "extra-properties": { + "metadatum": [ + { + "metaname": "vpn-id", + "metaval": "vpn-id value 1", + "resource-version": "1466418452" + }, + { + "metaname": "unexpected", + "metaval": "unexpected value 1", + "resource-version": "1466418452" + } + ] + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "virtual-data-center": { + "vdc-id": "15001220", + "vdc-name": "SAN_DIEGO_CA01", + "resource-version": "1465571382" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "vLAN on a Physical Wire", + "logical-link": { + "link-name": "sn6ca391ve2-xe-10/2/3.117|sn4ca01pbg", + "link-type": "l2bridge", + "resource-version": "1465571381", + "persona-model-id": "32bee148-2cae-4f3d-a42e-22c9e4f078a2", + "persona-model-version": "1" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "pBgf", + "pserver": { + "hostname": "sn4ca01pbg", + "in-maint": false, + "resource-version": "1470978156" + }, + "extra-properties": {}, + "inventory-response-items": {} + } + ] + } + }, + { + "model-name": "VL ELAN", + "logical-link": { + "link-name": "sn6ca391ve2-ae6.1322|dbzx0003v", + "link-type": "l2bridge", + "resource-version": "1465571381", + "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85", + "persona-model-version": "1" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "vDbe", + "generic-vnf": { + "vnf-id": "VAPP-2883", + "vnf-name": "dbzx0004v", + "vnf-type": "vSRX vDBE-V VNF", + "service-id": "12a96a9d-4b4c-4349-a950-fe1159602621", + "prov-status": "ACTIVE", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1470978155" + }, + "extra-properties": {}, + "inventory-response-items": {} + } + ] + } + }, + { + "model-name": "VL ELAN", + "logical-link": { + "link-name": "sn6ca392ve2-ae6.1322|dbzx0003v", + "link-type": "l2bridge", + "resource-version": "1465571382", + "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85", + "persona-model-version": "1" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "vDbe", + "generic-vnf": { + "vnf-id": "VAPP-2883", + "vnf-name": "dbzx0004v", + "vnf-type": "vSRX vDBE-V VNF", + "service-id": "12a96a9d-4b4c-4349-a950-fe1159602621", + "prov-status": "ACTIVE", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1470978155" + }, + "extra-properties": {}, + "inventory-response-items": {} + } + ] + } + }, + { + "model-name": "VL ELAN", + "logical-link": { + "link-name": "sn6ca392ve2-ae6.1927|asbg0003v", + "link-type": "l2bridge", + "resource-version": "1465571382", + "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85", + "persona-model-version": "1" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "vDbe", + "generic-vnf": { + "vnf-id": "VAPP-9320", + "vnf-name": "asbg0003v", + "vnf-type": "ASBGv No TLS", + "service-id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d", + "prov-status": "PROV", + "ipv4-oam-address": "135.193.152.168", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1470978156" + }, + "extra-properties": {}, + "inventory-response-items": {} + } + ] + } + }, + { + "model-name": "vLAN on a Physical Wire", + "logical-link": { + "link-name": "sn6ca392ve2-xe-10/2/3.117|sn4ca01pbg", + "link-type": "l2bridge", + "resource-version": "1465571382", + "persona-model-id": "32bee148-2cae-4f3d-a42e-22c9e4f078a2", + "persona-model-version": "1" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "pBgf", + "pserver": { + "hostname": "sn4ca01pbg", + "in-maint": false, + "resource-version": "1470978156" + }, + "extra-properties": {}, + "inventory-response-items": {} + } + ] + } + }, + { + "model-name": "VL ELAN", + "logical-link": { + "link-name": "sn6ca391ve2-ae6.1927|asbg0003v", + "link-type": "l2bridge", + "resource-version": "1465571381", + "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85", + "persona-model-version": "1" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "vDbe", + "generic-vnf": { + "vnf-id": "VAPP-9320", + "vnf-name": "asbg0003v", + "vnf-type": "ASBGv No TLS", + "service-id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d", + "prov-status": "PROV", + "ipv4-oam-address": "135.193.152.168", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1470978156" + }, + "extra-properties": {}, + "inventory-response-items": {} + } + ] + } + } + ] + } + }, + { + "virtual-data-center": { + "vdc-id": "15001219", + "vdc-name": "ALPHARETTA_GA01", + "resource-version": "1465571380" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "VL ELAN", + "logical-link": { + "link-name": "alrga392ve2-ae6.1322|dbzx0004v", + "link-type": "l2bridge", + "resource-version": "1465571380", + "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85", + "persona-model-version": "1" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "vDbe", + "generic-vnf": { + "vnf-id": "VAPP-1883", + "vnf-name": "dbzx0003v", + "vnf-type": "vSRX vDBE-V VNF", + "service-id": "12a96a9d-4b4c-4349-a950-fe1159602621", + "prov-status": "ACTIVE", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1470978153" + }, + "extra-properties": {}, + "inventory-response-items": {} + } + ] + } + }, + { + "model-name": "VL ELAN", + "logical-link": { + "link-name": "alrga391ve2-ae6.1322|dbzx0004v", + "link-type": "l2bridge", + "resource-version": "1465571379", + "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85", + "persona-model-version": "1" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "vDbe", + "generic-vnf": { + "vnf-id": "VAPP-1883", + "vnf-name": "dbzx0003v", + "vnf-type": "vSRX vDBE-V VNF", + "service-id": "12a96a9d-4b4c-4349-a950-fe1159602621", + "prov-status": "ACTIVE", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1470978153" + }, + "extra-properties": {}, + "inventory-response-items": {} + } + ] + } + }, + { + "model-name": "VL ELAN", + "logical-link": { + "link-name": "alrga392ve2-ae6.1927|asbg0004v", + "link-type": "l2bridge", + "resource-version": "1465571380", + "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85", + "persona-model-version": "1" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "vDbe", + "generic-vnf": { + "vnf-id": "VAPP-5305", + "vnf-name": "asbg0004v", + "vnf-type": "ASBGv No TLS", + "service-id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d", + "prov-status": "PROV", + "ipv4-oam-address": "135.190.182.168", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1470978152" + }, + "extra-properties": {}, + "inventory-response-items": {} + } + ] + } + }, + { + "model-name": "vLAN on a Physical Wire", + "logical-link": { + "link-name": "alrga391ve2-xe-10/2/3.117|ar4ga01pbg", + "link-type": "l2bridge", + "resource-version": "1465571379", + "persona-model-id": "32bee148-2cae-4f3d-a42e-22c9e4f078a2", + "persona-model-version": "1" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "pBgf", + "pserver": { + "hostname": "ar4ga01pbg", + "in-maint": false, + "resource-version": "1470978153" + }, + "extra-properties": {}, + "inventory-response-items": {} + } + ] + } + }, + { + "model-name": "VL ELAN", + "logical-link": { + "link-name": "alrga391ve2-ae6.1927|asbg0004v", + "link-type": "l2bridge", + "resource-version": "1465571380", + "persona-model-id": "932518e5-4260-4cc4-8038-df604a367f85", + "persona-model-version": "1" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "vDbe", + "generic-vnf": { + "vnf-id": "VAPP-5305", + "vnf-name": "asbg0004v", + "vnf-type": "ASBGv No TLS", + "service-id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d", + "prov-status": "PROV", + "ipv4-oam-address": "135.190.182.168", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1470978152" + }, + "extra-properties": {}, + "inventory-response-items": {} + } + ] + } + }, + { + "model-name": "vLAN on a Physical Wire", + "logical-link": { + "link-name": "alrga392ve2-xe-10/2/3.117|ar4ga01pbg", + "link-type": "l2bridge", + "resource-version": "1465571380", + "persona-model-id": "32bee148-2cae-4f3d-a42e-22c9e4f078a2", + "persona-model-version": "1" + }, + "extra-properties": {}, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "pBgf", + "pserver": { + "hostname": "ar4ga01pbg", + "in-maint": false, + "resource-version": "1470978153" + }, + "extra-properties": {}, + "inventory-response-items": {} + } + ] + } + } + ] + } + } + ] + } + } + ] +}
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-reader/connector-model-name.json b/src/test/resources/model-validation/instance-reader/connector-model-name.json new file mode 100644 index 0000000..60e6401 --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/connector-model-name.json @@ -0,0 +1,84 @@ +{ + "model-name": "Test Connector Model Name", + "connector": { + "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd", + "resource-version": "1467975776", + "persona-model-id": "connector-widget-id", + "persona-model-version": "v1.0", + "widget-model-id": "example-widget-model-id-val-69486", + "widget-model-version": "v1.0" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "Test VC Model Name", + "virtual-data-center": { + "vdc-id": "vdc-01", + "vdc-name": "example-vdc-name-val-10107", + "resource-version": "1467975781" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "Test LL Model Name", + "logical-link": { + "link-name": "example-link-name-val-23759", + "link-type": "example-link-type-val-23759", + "speed-value": "example-speed-value-val-23759", + "speed-units": "example-speed-units-val-23759", + "ip-version": "example-ip-version-val-23759", + "routing-protocol": "example-routing-protocol-val-23759", + "resource-version": "1467975786", + "persona-model-id": "example-persona-model-id-val-23759", + "persona-model-version": "example-persona-model-version-val-23759", + "widget-model-id": "example-widget-model-id-val-23759", + "widget-model-version": "example-widget-model-version-val-23759" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "pserver": { + "hostname": "example-hostname-val-79914", + "ptnii-equip-name": "example-ptnii-equip-name-val-79914", + "number-of-cpus": 79914, + "disk-in-gigabytes": 79914, + "ram-in-megabytes": 79914, + "equip-type": "example-equip-type-val-79914", + "equip-vendor": "example-equip-vendor-val-79914", + "equip-model": "example-equip-model-val-79914", + "fqdn": "example-fqdn-val-79914", + "pserver-selflink": "example-pserver-selflink-val-79914", + "ipv4-oam-address": "example-ipv4-oam-address-val-79914", + "serial-number": "example-serial-number-val-79914", + "pserver-id": "example-pserver-id-val-79914", + "internet-topology": "example-internet-topology-val-79914", + "in-maint": true, + "resource-version": "1467994603", + "pserver-name2": "example-pserver-name2-val-79914", + "purpose": "example-purpose-val-79914" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } + } + ] + } + } + ] + } +} diff --git a/src/test/resources/model-validation/instance-reader/connector-sibling-inventory-items.json b/src/test/resources/model-validation/instance-reader/connector-sibling-inventory-items.json new file mode 100644 index 0000000..b032966 --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/connector-sibling-inventory-items.json @@ -0,0 +1,118 @@ +{ + "connector": { + "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd", + "resource-version": "1467975776", + "persona-model-id": "connector-widget-id", + "persona-model-version": "v1.0", + "widget-model-id": "example-widget-model-id-val-69486", + "widget-model-version": "v1.0" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "virtual-data-center": { + "vdc-id": "vdc-01", + "vdc-name": "example-vdc-name-val-10107", + "resource-version": "1467975781" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "Test LL Model Name", + "logical-link": { + "link-name": "example-link-name-val-23759", + "link-type": "example-link-type-val-23759", + "speed-value": "example-speed-value-val-23759", + "speed-units": "example-speed-units-val-23759", + "ip-version": "example-ip-version-val-23759", + "routing-protocol": "example-routing-protocol-val-23759", + "resource-version": "1467975786", + "persona-model-id": "example-persona-model-id-val-23759", + "persona-model-version": "example-persona-model-version-val-23759", + "widget-model-id": "example-widget-model-id-val-23759", + "widget-model-version": "example-widget-model-version-val-23759" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "generic-vnf": { + "vnf-id": "generic-vnf-01", + "vnf-name": "example-vnf-name-val-3501", + "vnf-name2": "example-vnf-name2-val-3501", + "vnf-type": "example-vnf-type-val-3501", + "regional-resource-zone": "example-regional-resource-zone-val-3501", + "prov-status": "example-prov-status-val-3501", + "operational-state": "example-operational-state-val-3501", + "license-key": "example-license-key-val-3501", + "equipment-role": "example-equipment-role-val-3501", + "orchestration-status": "example-orchestration-status-val-3501", + "heat-stack-id": "example-heat-stack-id-val-3501", + "mso-catalog-key": "example-mso-catalog-key-val-3501", + "management-option": "example-management-option-val-3501", + "ipv4-oam-address": "example-ipv4-oam-address-val-3501", + "ipv4-loopback0-address": "example-ipv4-loopback0-address-val-3501", + "nm-lan-v6-address": "example-nm-lan-v6-address-val-3501", + "management-v6-address": "example-management-v6-address-val-3501", + "vcpu": 1817, + "vcpu-units": "example-vcpu-units-val-3501", + "vmemory": 6020, + "vmemory-units": "example-vmemory-units-val-3501", + "vdisk": 5281, + "vdisk-units": "example-vdisk-units-val-3501", + "in-maint": false, + "is-closed-loop-disabled": true, + "resource-version": "1468321711" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + }, + { + "pserver": { + "hostname": "example-hostname-val-79914", + "ptnii-equip-name": "example-ptnii-equip-name-val-79914", + "number-of-cpus": 79914, + "disk-in-gigabytes": 79914, + "ram-in-megabytes": 79914, + "equip-type": "example-equip-type-val-79914", + "equip-vendor": "example-equip-vendor-val-79914", + "equip-model": "example-equip-model-val-79914", + "fqdn": "example-fqdn-val-79914", + "pserver-selflink": "example-pserver-selflink-val-79914", + "ipv4-oam-address": "example-ipv4-oam-address-val-79914", + "serial-number": "example-serial-number-val-79914", + "pserver-id": "example-pserver-id-val-79914", + "internet-topology": "example-internet-topology-val-79914", + "in-maint": true, + "resource-version": "1467994603", + "pserver-name2": "example-pserver-name2-val-79914", + "purpose": "example-purpose-val-79914" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } + } + ] + } + } + ] + } +} diff --git a/src/test/resources/model-validation/instance-reader/connector.json b/src/test/resources/model-validation/instance-reader/connector.json new file mode 100644 index 0000000..1870dc8 --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/connector.json @@ -0,0 +1,82 @@ +{ + "connector": { + "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd", + "resource-version": "1467975776", + "persona-model-id": "connector-widget-id", + "persona-model-version": "v1.0", + "widget-model-id": "example-widget-model-id-val-69486", + "widget-model-version": "v1.0" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "virtual-data-center": { + "vdc-id": "vdc-01", + "vdc-name": "example-vdc-name-val-10107", + "resource-version": "1467975781" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "Test LL Model Name", + "logical-link": { + "link-name": "example-link-name-val-23759", + "link-type": "example-link-type-val-23759", + "speed-value": "example-speed-value-val-23759", + "speed-units": "example-speed-units-val-23759", + "ip-version": "example-ip-version-val-23759", + "routing-protocol": "example-routing-protocol-val-23759", + "resource-version": "1467975786", + "persona-model-id": "example-persona-model-id-val-23759", + "persona-model-version": "example-persona-model-version-val-23759", + "widget-model-id": "example-widget-model-id-val-23759", + "widget-model-version": "example-widget-model-version-val-23759" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "pserver": { + "hostname": "example-hostname-val-79914", + "ptnii-equip-name": "example-ptnii-equip-name-val-79914", + "number-of-cpus": 79914, + "disk-in-gigabytes": 79914, + "ram-in-megabytes": 79914, + "equip-type": "example-equip-type-val-79914", + "equip-vendor": "example-equip-vendor-val-79914", + "equip-model": "example-equip-model-val-79914", + "fqdn": "example-fqdn-val-79914", + "pserver-selflink": "example-pserver-selflink-val-79914", + "ipv4-oam-address": "example-ipv4-oam-address-val-79914", + "serial-number": "example-serial-number-val-79914", + "pserver-id": "example-pserver-id-val-79914", + "internet-topology": "example-internet-topology-val-79914", + "in-maint": true, + "resource-version": "1467994603", + "pserver-name2": "example-pserver-name2-val-79914", + "purpose": "example-purpose-val-79914" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } + } + ] + } + } + ] + } +} diff --git a/src/test/resources/model-validation/instance-reader/expected-generic-vnf.json b/src/test/resources/model-validation/instance-reader/expected-generic-vnf.json new file mode 100644 index 0000000..ab5bb10 --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/expected-generic-vnf.json @@ -0,0 +1,36 @@ +{ + "generic-vnf": { + "vnf-id": "generic-vnf-01", + "vnf-name": "example-vnf-name-val-3501", + "vnf-name2": "example-vnf-name2-val-3501", + "vnf-type": "example-vnf-type-val-3501", + "regional-resource-zone": "example-regional-resource-zone-val-3501", + "prov-status": "example-prov-status-val-3501", + "operational-state": "example-operational-state-val-3501", + "license-key": "example-license-key-val-3501", + "equipment-role": "example-equipment-role-val-3501", + "orchestration-status": "example-orchestration-status-val-3501", + "heat-stack-id": "example-heat-stack-id-val-3501", + "mso-catalog-key": "example-mso-catalog-key-val-3501", + "management-option": "example-management-option-val-3501", + "ipv4-oam-address": "example-ipv4-oam-address-val-3501", + "ipv4-loopback0-address": "example-ipv4-loopback0-address-val-3501", + "nm-lan-v6-address": "example-nm-lan-v6-address-val-3501", + "management-v6-address": "example-management-v6-address-val-3501", + "vcpu": 1817, + "vcpu-units": "example-vcpu-units-val-3501", + "vmemory": 6020, + "vmemory-units": "example-vmemory-units-val-3501", + "vdisk": 5281, + "vdisk-units": "example-vdisk-units-val-3501", + "in-maint": false, + "is-closed-loop-disabled": true, + "resource-version": "1468321711" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } +} diff --git a/src/test/resources/model-validation/instance-reader/expected-logical-link.json b/src/test/resources/model-validation/instance-reader/expected-logical-link.json new file mode 100644 index 0000000..90bb7de --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/expected-logical-link.json @@ -0,0 +1,51 @@ +{ + "model-name": "Test LL Model Name", + "logical-link": { + "link-name": "example-link-name-val-23759", + "link-type": "example-link-type-val-23759", + "speed-value": "example-speed-value-val-23759", + "speed-units": "example-speed-units-val-23759", + "ip-version": "example-ip-version-val-23759", + "routing-protocol": "example-routing-protocol-val-23759", + "resource-version": "1467975786", + "persona-model-id": "example-persona-model-id-val-23759", + "persona-model-version": "example-persona-model-version-val-23759", + "widget-model-id": "example-widget-model-id-val-23759", + "widget-model-version": "example-widget-model-version-val-23759" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "pserver": { + "hostname": "example-hostname-val-79914", + "ptnii-equip-name": "example-ptnii-equip-name-val-79914", + "number-of-cpus": 79914, + "disk-in-gigabytes": 79914, + "ram-in-megabytes": 79914, + "equip-type": "example-equip-type-val-79914", + "equip-vendor": "example-equip-vendor-val-79914", + "equip-model": "example-equip-model-val-79914", + "fqdn": "example-fqdn-val-79914", + "pserver-selflink": "example-pserver-selflink-val-79914", + "ipv4-oam-address": "example-ipv4-oam-address-val-79914", + "serial-number": "example-serial-number-val-79914", + "pserver-id": "example-pserver-id-val-79914", + "internet-topology": "example-internet-topology-val-79914", + "in-maint": true, + "resource-version": "1467994603", + "pserver-name2": "example-pserver-name2-val-79914", + "purpose": "example-purpose-val-79914" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } +}
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-reader/expected-pserver.json b/src/test/resources/model-validation/instance-reader/expected-pserver.json new file mode 100644 index 0000000..8d4b8c5 --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/expected-pserver.json @@ -0,0 +1,28 @@ +{ + "pserver": { + "hostname": "example-hostname-val-79914", + "ptnii-equip-name": "example-ptnii-equip-name-val-79914", + "number-of-cpus": 79914, + "disk-in-gigabytes": 79914, + "ram-in-megabytes": 79914, + "equip-type": "example-equip-type-val-79914", + "equip-vendor": "example-equip-vendor-val-79914", + "equip-model": "example-equip-model-val-79914", + "fqdn": "example-fqdn-val-79914", + "pserver-selflink": "example-pserver-selflink-val-79914", + "ipv4-oam-address": "example-ipv4-oam-address-val-79914", + "serial-number": "example-serial-number-val-79914", + "pserver-id": "example-pserver-id-val-79914", + "internet-topology": "example-internet-topology-val-79914", + "in-maint": true, + "resource-version": "1467994603", + "pserver-name2": "example-pserver-name2-val-79914", + "purpose": "example-purpose-val-79914" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } +}
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-reader/expected-virtual-data-center-model-name.json b/src/test/resources/model-validation/instance-reader/expected-virtual-data-center-model-name.json new file mode 100644 index 0000000..e72a52f --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/expected-virtual-data-center-model-name.json @@ -0,0 +1,66 @@ +{ + "model-name": "Test VC Model Name", + "virtual-data-center": { + "vdc-id": "vdc-01", + "vdc-name": "example-vdc-name-val-10107", + "resource-version": "1467975781" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "Test LL Model Name", + "logical-link": { + "link-name": "example-link-name-val-23759", + "link-type": "example-link-type-val-23759", + "speed-value": "example-speed-value-val-23759", + "speed-units": "example-speed-units-val-23759", + "ip-version": "example-ip-version-val-23759", + "routing-protocol": "example-routing-protocol-val-23759", + "resource-version": "1467975786", + "persona-model-id": "example-persona-model-id-val-23759", + "persona-model-version": "example-persona-model-version-val-23759", + "widget-model-id": "example-widget-model-id-val-23759", + "widget-model-version": "example-widget-model-version-val-23759" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "pserver": { + "hostname": "example-hostname-val-79914", + "ptnii-equip-name": "example-ptnii-equip-name-val-79914", + "number-of-cpus": 79914, + "disk-in-gigabytes": 79914, + "ram-in-megabytes": 79914, + "equip-type": "example-equip-type-val-79914", + "equip-vendor": "example-equip-vendor-val-79914", + "equip-model": "example-equip-model-val-79914", + "fqdn": "example-fqdn-val-79914", + "pserver-selflink": "example-pserver-selflink-val-79914", + "ipv4-oam-address": "example-ipv4-oam-address-val-79914", + "serial-number": "example-serial-number-val-79914", + "pserver-id": "example-pserver-id-val-79914", + "internet-topology": "example-internet-topology-val-79914", + "in-maint": true, + "resource-version": "1467994603", + "pserver-name2": "example-pserver-name2-val-79914", + "purpose": "example-purpose-val-79914" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } + } + ] + } +}
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-reader/expected-virtual-data-center.json b/src/test/resources/model-validation/instance-reader/expected-virtual-data-center.json new file mode 100644 index 0000000..7445823 --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/expected-virtual-data-center.json @@ -0,0 +1,65 @@ +{ + "virtual-data-center": { + "vdc-id": "vdc-01", + "vdc-name": "example-vdc-name-val-10107", + "resource-version": "1467975781" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "model-name": "Test LL Model Name", + "logical-link": { + "link-name": "example-link-name-val-23759", + "link-type": "example-link-type-val-23759", + "speed-value": "example-speed-value-val-23759", + "speed-units": "example-speed-units-val-23759", + "ip-version": "example-ip-version-val-23759", + "routing-protocol": "example-routing-protocol-val-23759", + "resource-version": "1467975786", + "persona-model-id": "example-persona-model-id-val-23759", + "persona-model-version": "example-persona-model-version-val-23759", + "widget-model-id": "example-widget-model-id-val-23759", + "widget-model-version": "example-widget-model-version-val-23759" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "pserver": { + "hostname": "example-hostname-val-79914", + "ptnii-equip-name": "example-ptnii-equip-name-val-79914", + "number-of-cpus": 79914, + "disk-in-gigabytes": 79914, + "ram-in-megabytes": 79914, + "equip-type": "example-equip-type-val-79914", + "equip-vendor": "example-equip-vendor-val-79914", + "equip-model": "example-equip-model-val-79914", + "fqdn": "example-fqdn-val-79914", + "pserver-selflink": "example-pserver-selflink-val-79914", + "ipv4-oam-address": "example-ipv4-oam-address-val-79914", + "serial-number": "example-serial-number-val-79914", + "pserver-id": "example-pserver-id-val-79914", + "internet-topology": "example-internet-topology-val-79914", + "in-maint": true, + "resource-version": "1467994603", + "pserver-name2": "example-pserver-name2-val-79914", + "purpose": "example-purpose-val-79914" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } + } + ] + } +}
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-reader/model-instance-mapping-attributes.json_conf b/src/test/resources/model-validation/instance-reader/model-instance-mapping-attributes.json_conf new file mode 100644 index 0000000..1abe24f --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/model-instance-mapping-attributes.json_conf @@ -0,0 +1,12 @@ +[ + { + "mappingType": "ATTRIBUTE", + "model": { + "value": "metadata/metadatum/metaname" + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "value": "$..extra-properties.metadatum[*].metaname" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-reader/model-instance-mapping-root-missing.json_conf b/src/test/resources/model-validation/instance-reader/model-instance-mapping-root-missing.json_conf new file mode 100644 index 0000000..c8d5591 --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/model-instance-mapping-root-missing.json_conf @@ -0,0 +1,16 @@ +[ + { + "mappingType" : "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "filter": { + "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']", + "valid": ["widget"] + }, + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']" + }, + "instance": { + "origin": "$.inventory-response-item[0]" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-reader/model-instance-mapping-root-unknown.json_conf b/src/test/resources/model-validation/instance-reader/model-instance-mapping-root-unknown.json_conf new file mode 100644 index 0000000..990d0c7 --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/model-instance-mapping-root-unknown.json_conf @@ -0,0 +1,17 @@ +[ + { + "mappingType" : "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "filter": { + "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']", + "valid": ["widget"] + }, + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']" + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "NOT_KNOWN" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-reader/model-instance-mapping.json_conf b/src/test/resources/model-validation/instance-reader/model-instance-mapping.json_conf new file mode 100644 index 0000000..917c575 --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/model-instance-mapping.json_conf @@ -0,0 +1,17 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "filter": { + "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']", + "valid": ["widget"] + }, + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']" + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-reader/test-validation-service-beans.xml b/src/test/resources/model-validation/instance-reader/test-validation-service-beans.xml new file mode 100644 index 0000000..baf07b2 --- /dev/null +++ b/src/test/resources/model-validation/instance-reader/test-validation-service-beans.xml @@ -0,0 +1,35 @@ +<?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===================================================== +--> +<!-- Used by TestInstanceReader.java --> +<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.xsd"> + + <import resource="../../oxm-reader/oxm-reader-beans.xml" /> + + <bean id="jsonReader" class="org.onap.aai.validation.reader.JsonReader" /> + + <bean id="instanceReader" class="org.onap.aai.validation.modeldriven.validator.InstanceReader"> + <constructor-arg ref="jsonReader" /> + <constructor-arg ref="oxmReader" /> + </bean> + +</beans>
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-validator/aai-environment.properties b/src/test/resources/model-validation/instance-validator/aai-environment.properties new file mode 100644 index 0000000..c595e7f --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/aai-environment.properties @@ -0,0 +1,31 @@ +# ============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===================================================== + +httpProtocol=file +baseModelURI=src/test/resources/model-validation/instance-validator/all-models.xml + +# the following fields are autowired but will never be used +host= +port= +trustStorePath= +trustStorePassword.x= +keyStorePath= +keyStorePassword.x= +keyManagerFactoryAlgorithm= +keyStoreType= +securityProtocol= +connectionTimeout= +readTimeout= diff --git a/src/test/resources/model-validation/instance-validator/all-models.xml b/src/test/resources/model-validation/instance-validator/all-models.xml new file mode 100644 index 0000000..9acbd2b --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/all-models.xml @@ -0,0 +1,1370 @@ +<?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===================================================== +--> +<models xmlns="http://org.onap.aai.inventory/v7"> + <model> + <model-invariant-id>22382f81-70cb-470d-8ab2-3e1b9fad10df</model-invariant-id> + <model-type>widget</model-type> + <model-name>generic-vnf</model-name> + <model-id>6dcdbbc8-23b6-42c3-ac9f-2c0a3fe8cfba</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698747</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/43095b8a-8e9c-4a76-8490-6120140f6804/model-elements/model-element/41e6d6e5-aa69-4d33-b9f2-975bf418d1e3/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>43095b8a-8e9c-4a76-8490-6120140f6804</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>41e6d6e5-aa69-4d33-b9f2-975bf418d1e3</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/0d23052d-8ffe-433e-a25d-da5da027bb7c/model-elements/model-element/17e48d38-e055-4158-ae6b-a170e8a647cd/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>0d23052d-8ffe-433e-a25d-da5da027bb7c</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>17e48d38-e055-4158-ae6b-a170e8a647cd</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/named-query-elements/named-query-element/dc38d8ae-0993-4426-af79-a7aff4a4b4f3/named-query-elements/named-query-element/a97e8ab3-addd-40ee-9d29-3de505a56374/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc38d8ae-0993-4426-af79-a7aff4a4b4f3</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>a97e8ab3-addd-40ee-9d29-3de505a56374</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/named-query-elements/named-query-element/920399b7-21c1-4e81-8fb9-a3b2283a72ba/named-query-elements/named-query-element/759ef1e4-3eca-4d55-8a9c-a8be31179f47/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>920399b7-21c1-4e81-8fb9-a3b2283a72ba</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>759ef1e4-3eca-4d55-8a9c-a8be31179f47</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>connector-widget-id</model-invariant-id> + <model-type>widget</model-type> + <model-name>connector</model-name> + <model-id>connector-model-id</model-id> + <model-version>v2.0</model-version> + <resource-version>1466689944</resource-version> + </model> + <model> + <model-invariant-id>43095b8a-8e9c-4a76-8490-6120140f6804</model-invariant-id> + <model-type>resource</model-type> + <model-name>vSbg</model-name> + <model-id>b23fb31b-4c21-45f7-9d92-96ed70e63df1</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>41e6d6e5-aa69-4d33-b9f2-975bf418d1e3</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698619</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/22382f81-70cb-470d-8ab2-3e1b9fad10df/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>22382f81-70cb-470d-8ab2-3e1b9fad10df</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>generic-vnf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/model-elements/model-element/6cf69470-ccbf-4034-a37f-f714c135f05c/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>6cf69470-ccbf-4034-a37f-f714c135f05c</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/model-elements/model-element/059db56c-6d72-4023-9fc3-0db29534ddff/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>059db56c-6d72-4023-9fc3-0db29534ddff</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>523f0645-8182-4c91-9d6a-2f968e923937</model-invariant-id> + <model-type>widget</model-type> + <model-name>pserver</model-name> + <model-id>c277c968-7e2b-4a88-9094-2b8a55dfb9f4</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698757</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/model-elements/model-element/76624fe1-0f28-4e17-ae9f-f0e2bba6d13d/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/6614ffae-6e64-4c78-9dea-4d5c0f057ea2/model-elements/model-element/0204aad0-fe13-4f75-b022-f91f245f0e9e/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>6614ffae-6e64-4c78-9dea-4d5c0f057ea2</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>0204aad0-fe13-4f75-b022-f91f245f0e9e</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/named-query-elements/named-query-element/920399b7-21c1-4e81-8fb9-a3b2283a72ba/named-query-elements/named-query-element/a79552d6-20dc-4b9e-b4d4-f29a8a2a8447/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>920399b7-21c1-4e81-8fb9-a3b2283a72ba</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>a79552d6-20dc-4b9e-b4d4-f29a8a2a8447</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/named-query-elements/named-query-element/dc38d8ae-0993-4426-af79-a7aff4a4b4f3/named-query-elements/named-query-element/41294247-9f7e-4abf-becd-3bbca6945c09/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc38d8ae-0993-4426-af79-a7aff4a4b4f3</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>41294247-9f7e-4abf-becd-3bbca6945c09</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>99469866-95bb-400e-8786-f83e87696725</model-invariant-id> + <model-type>widget</model-type> + <model-name>virtual-data-center</model-name> + <model-id>3c70c43f-99ed-4476-82f4-92a30616e512</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698727</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/model-elements/model-element/200de3d5-c207-47c2-a507-8846ba1d7068/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>200de3d5-c207-47c2-a507-8846ba1d7068</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</model-invariant-id> + <model-type>resource</model-type> + <model-name>ipe</model-name> + <model-id>e8f973a5-418a-44f2-9784-159e3e37d708</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>b7b48ba6-427b-4d23-ada7-a67ac9e0f84f</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>ebc25508-b2e3-4021-b684-269cfd2b63c0</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>f610d699-11af-4c13-a918-a89344e4a1bd</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/49032ff1-5466-4054-b64b-15395ac10c00/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>49032ff1-5466-4054-b64b-15395ac10c00</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>vlan</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/0a706320-b8e7-4b18-9485-fba156ea00cf/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>0a706320-b8e7-4b18-9485-fba156ea00cf</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>l-interface</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/3d9f4b1d-360c-4862-9623-703b150157ce/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>3d9f4b1d-360c-4862-9623-703b150157ce</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>p-interface</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/523f0645-8182-4c91-9d6a-2f968e923937/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>523f0645-8182-4c91-9d6a-2f968e923937</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>pserver</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/model-elements/model-element/304ddca5-47cd-49ec-a2d7-1ce17baa5b70/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>304ddca5-47cd-49ec-a2d7-1ce17baa5b70</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/model-elements/model-element/193ec825-44ce-4416-85ac-20a6b6663575/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>193ec825-44ce-4416-85ac-20a6b6663575</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>668464da-6d41-4599-bdbb-2576147b440e</model-invariant-id> + <model-type>resource</model-type> + <model-name>WAN Connector v0.1</model-name> + <model-id>dc700a83-c507-47d9-b775-1fdfcdd5f9eb</model-id> + <model-version>0.1</model-version> + <model-description>Connects a customer vpn to the border elements of a vendor product</model-description> + <resource-version>1466698623</resource-version> + <model-elements> + <model-element> + <model-element-uuid>93a37846-b497-490e-bc97-7d130022d6db</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>200de3d5-c207-47c2-a507-8846ba1d7068</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>7ccfe6b5-6566-4b44-83d3-b79f5de7a87b</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>VL ELAN</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + <model-element> + <model-element-uuid>dfd30146-74f4-49e9-bad6-019d413352ac</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>vLAN on a Physical Wire</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/99469866-95bb-400e-8786-f83e87696725/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>99469866-95bb-400e-8786-f83e87696725</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>virtual-data-center</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/15f47352-28b7-4bbd-9828-393eaf79eeff/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>15f47352-28b7-4bbd-9828-393eaf79eeff</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>connector</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <metadata> + <metadatum> + <metaname>product</metaname> + <metaval>product-value-1</metaval> + <resource-version>1466698623</resource-version> + </metadatum> + <metadatum> + <metaname>vpn-id</metaname> + <metaval>vpn-id-value-1</metaval> + <resource-version>1466698623</resource-version> + </metadatum> + </metadata> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/460c6de2-a92b-4e3b-9ba3-538ce782b2fa/model-elements/model-element/71b825be-febf-45f7-b86a-ca0e3de19c90/model-elements/model-element/986167cb-57d3-4aad-8896-784a22c5289c/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>460c6de2-a92b-4e3b-9ba3-538ce782b2fa</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>71b825be-febf-45f7-b86a-ca0e3de19c90</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>986167cb-57d3-4aad-8896-784a22c5289c</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>460c6de2-a92b-4e3b-9ba3-538ce782b2fa</model-invariant-id> + <model-type>service</model-type> + <model-name>WAN Bonding v0.1</model-name> + <model-id>0ee8c1bc-7cbd-4b0a-a1ac-e9999255abc1</model-id> + <model-version>0.1</model-version> + <model-description>service-instance of the wan object</model-description> + <resource-version>1466698623</resource-version> + <model-elements> + <model-element> + <model-element-uuid>71b825be-febf-45f7-b86a-ca0e3de19c90</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698623</resource-version> + <model-elements> + <model-element> + <model-element-uuid>986167cb-57d3-4aad-8896-784a22c5289c</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698623</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>WAN Connector v0.1</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/46b92144-923a-4d20-b85a-3cbd847668a9/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>46b92144-923a-4d20-b85a-3cbd847668a9</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>service-instance</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <metadata> + <metadatum> + <metaname>b</metaname> + <metaval>product</metaval> + <resource-version>1466698623</resource-version> + </metadatum> + <metadatum> + <metaname>a</metaname> + <metaval>vpn-id</metaval> + <resource-version>1466698623</resource-version> + </metadatum> + </metadata> + </model> + <model> + <model-invariant-id>generic-vnf-widget-id</model-invariant-id> + <model-type>widget</model-type> + <model-name>generic-vnf</model-name> + <model-id>generic-vnf-model-id</model-id> + <model-version>v1.0</model-version> + <resource-version>1466624623</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/vMME-resource-id/model-elements/model-element/af4b6df2-65d0-4d10-b25e-02206799e1fa/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>vMME-resource-id</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>af4b6df2-65d0-4d10-b25e-02206799e1fa</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>6614ffae-6e64-4c78-9dea-4d5c0f057ea2</model-invariant-id> + <model-type>resource</model-type> + <model-name>pBgf</model-name> + <model-id>9038f1d7-61f2-49ef-a61d-ace468d4ab32</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>0204aad0-fe13-4f75-b022-f91f245f0e9e</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698620</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/523f0645-8182-4c91-9d6a-2f968e923937/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>523f0645-8182-4c91-9d6a-2f968e923937</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>pserver</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/model-elements/model-element/ad161a89-ef32-4b2c-b86d-7fbb7a251571/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>ad161a89-ef32-4b2c-b86d-7fbb7a251571</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/model-elements/model-element/d0d50aad-bb97-4865-a3bb-72dbf41be50b/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>d0d50aad-bb97-4865-a3bb-72dbf41be50b</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>15f47352-28b7-4bbd-9828-393eaf79eeff</model-invariant-id> + <model-type>widget</model-type> + <model-name>connector</model-name> + <model-id>4f0dbd2d-b667-4d19-a563-84a764e62fa7</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698717</resource-version> + <relationship-list> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>682ae094-0aaa-4381-a55d-bc633c40e4c0</model-invariant-id> + <model-type>resource</model-type> + <model-name>vLAN on a Physical Wire</model-name> + <model-id>32bee148-2cae-4f3d-a42e-22c9e4f078a2</model-id> + <model-version>1</model-version> + <model-description>An l2-bridge used by a wan connector connects an ipe to a BGF </model-description> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>d0d50aad-bb97-4865-a3bb-72dbf41be50b</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/6614ffae-6e64-4c78-9dea-4d5c0f057ea2/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>6614ffae-6e64-4c78-9dea-4d5c0f057ea2</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>pBgf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/fa01ef50-bbb5-49d4-91d1-ebbda9816e01/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>fa01ef50-bbb5-49d4-91d1-ebbda9816e01</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>logical-link</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/model-elements/model-element/200de3d5-c207-47c2-a507-8846ba1d7068/model-elements/model-element/dfd30146-74f4-49e9-bad6-019d413352ac/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>200de3d5-c207-47c2-a507-8846ba1d7068</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>dfd30146-74f4-49e9-bad6-019d413352ac</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>46b92144-923a-4d20-b85a-3cbd847668a9</model-invariant-id> + <model-type>widget</model-type> + <model-name>service-instance</model-name> + <model-id>82194af1-3c2c-485a-8f44-420e22a9eaa4</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698646</resource-version> + <relationship-list> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/460c6de2-a92b-4e3b-9ba3-538ce782b2fa/model-elements/model-element/71b825be-febf-45f7-b86a-ca0e3de19c90/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>460c6de2-a92b-4e3b-9ba3-538ce782b2fa</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>71b825be-febf-45f7-b86a-ca0e3de19c90</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>3d9f4b1d-360c-4862-9623-703b150157ce</model-invariant-id> + <model-type>widget</model-type> + <model-name>p-interface</model-name> + <model-id>479f5f13-51d9-4ccb-bddf-f554f1af0cfc</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/model-elements/model-element/76624fe1-0f28-4e17-ae9f-f0e2bba6d13d/model-elements/model-element/b7b48ba6-427b-4d23-ada7-a67ac9e0f84f/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>b7b48ba6-427b-4d23-ada7-a67ac9e0f84f</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>0d23052d-8ffe-433e-a25d-da5da027bb7c</model-invariant-id> + <model-type>resource</model-type> + <model-name>vDbe</model-name> + <model-id>fe8aac07-ce6c-4f9f-aa0d-b561c77da9e8</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>17e48d38-e055-4158-ae6b-a170e8a647cd</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698618</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/22382f81-70cb-470d-8ab2-3e1b9fad10df/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>22382f81-70cb-470d-8ab2-3e1b9fad10df</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>generic-vnf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/model-elements/model-element/1d73a0dc-e7f6-4b6d-9450-5dda720d1a7f/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>1d73a0dc-e7f6-4b6d-9450-5dda720d1a7f</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/model-elements/model-element/a1b205ea-17bb-442b-83a3-38b4e0fcb099/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>a1b205ea-17bb-442b-83a3-38b4e0fcb099</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>vMME-resource-id</model-invariant-id> + <model-type>resource</model-type> + <model-name>vMME</model-name> + <model-id>vMME-model-id</model-id> + <model-version>v1.0</model-version> + <resource-version>1466624623</resource-version> + <model-elements> + <model-element> + <model-element-uuid>af4b6df2-65d0-4d10-b25e-02206799e1fa</model-element-uuid> + <new-data-del-flag>true</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466624623</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/generic-vnf-widget-id/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>generic-vnf-widget-id</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>generic-vnf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + </model> + <model> + <model-invariant-id>fa01ef50-bbb5-49d4-91d1-ebbda9816e01</model-invariant-id> + <model-type>widget</model-type> + <model-name>logical-link</model-name> + <model-id>8742d5b3-ee98-4165-8bd5-fc012a7885b9</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698737</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/named-query-elements/named-query-element/920399b7-21c1-4e81-8fb9-a3b2283a72ba/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>920399b7-21c1-4e81-8fb9-a3b2283a72ba</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/named-query-elements/named-query-element/dc38d8ae-0993-4426-af79-a7aff4a4b4f3/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc38d8ae-0993-4426-af79-a7aff4a4b4f3</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>0a706320-b8e7-4b18-9485-fba156ea00cf</model-invariant-id> + <model-type>widget</model-type> + <model-name>l-interface</model-name> + <model-id>d9131b0d-698f-4297-8699-af0a3ac7ebdc</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698767</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/model-elements/model-element/76624fe1-0f28-4e17-ae9f-f0e2bba6d13d/model-elements/model-element/b7b48ba6-427b-4d23-ada7-a67ac9e0f84f/model-elements/model-element/ebc25508-b2e3-4021-b684-269cfd2b63c0/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>b7b48ba6-427b-4d23-ada7-a67ac9e0f84f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>ebc25508-b2e3-4021-b684-269cfd2b63c0</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/named-query-elements/named-query-element/dc38d8ae-0993-4426-af79-a7aff4a4b4f3/named-query-elements/named-query-element/29ac58b9-37fa-4d6a-9d2e-29f33e1e3b7a/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc38d8ae-0993-4426-af79-a7aff4a4b4f3</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>29ac58b9-37fa-4d6a-9d2e-29f33e1e3b7a</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/named-query-elements/named-query-element/920399b7-21c1-4e81-8fb9-a3b2283a72ba/named-query-elements/named-query-element/eda1554f-3eff-4195-9185-bcbc4f75826f/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>920399b7-21c1-4e81-8fb9-a3b2283a72ba</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>eda1554f-3eff-4195-9185-bcbc4f75826f</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>49032ff1-5466-4054-b64b-15395ac10c00</model-invariant-id> + <model-type>widget</model-type> + <model-name>vlan</model-name> + <model-id>2febb0bc-b776-45b3-af50-75a578a8a4c4</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/model-elements/model-element/76624fe1-0f28-4e17-ae9f-f0e2bba6d13d/model-elements/model-element/b7b48ba6-427b-4d23-ada7-a67ac9e0f84f/model-elements/model-element/ebc25508-b2e3-4021-b684-269cfd2b63c0/model-elements/model-element/f610d699-11af-4c13-a918-a89344e4a1bd/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>b7b48ba6-427b-4d23-ada7-a67ac9e0f84f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>ebc25508-b2e3-4021-b684-269cfd2b63c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>f610d699-11af-4c13-a918-a89344e4a1bd</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-invariant-id>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</model-invariant-id> + <model-type>resource</model-type> + <model-name>VL ELAN</model-name> + <model-id>932518e5-4260-4cc4-8038-df604a367f85</model-id> + <model-version>1</model-version> + <model-description>An l2-bridge used by a wan connector connects an ipe to a SBG or DBE</model-description> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>c44dbdf9-494e-49c1-b462-74e24e837b22</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>a1b205ea-17bb-442b-83a3-38b4e0fcb099</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/0d23052d-8ffe-433e-a25d-da5da027bb7c/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>0d23052d-8ffe-433e-a25d-da5da027bb7c</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>vDbe</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/fa01ef50-bbb5-49d4-91d1-ebbda9816e01/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>fa01ef50-bbb5-49d4-91d1-ebbda9816e01</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>logical-link</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/model-elements/model-element/200de3d5-c207-47c2-a507-8846ba1d7068/model-elements/model-element/7ccfe6b5-6566-4b44-83d3-b79f5de7a87b/</related-link> + <relationship-data> + <relationship-key>model.model-invariant-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>200de3d5-c207-47c2-a507-8846ba1d7068</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>7ccfe6b5-6566-4b44-83d3-b79f5de7a87b</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> +</models>
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-validator/connector-instance-errors.json b/src/test/resources/model-validation/instance-validator/connector-instance-errors.json new file mode 100644 index 0000000..b932344 --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/connector-instance-errors.json @@ -0,0 +1,113 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v9", + "action": "CREATE", + "entity-type": "connector", + "top-entity-type": "connector", + "entity-link": "https://dummy-host.onap.org:8443/aai/v9/business/connectors/connector/c7611ebe-c324-48f1-8085-94aef0c12fd" + }, + "entity": { + "inventory-response-item": [ + { + "connector": { + "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd", + "resource-version": "1467975776", + "persona-model-id": "connector-widget-id", + "persona-model-version": "v1.0", + "widget-model-id": "example-widget-model-id-val-69486", + "widget-model-version": "v1.0" + }, + "extra-properties": { + "metadatum": [ + { + "metaname": "vpn-id", + "metaval": "vpn-id-value-1", + "resource-version": "1465990410" + }, + { + "metaname": "unexpected", + "metaval": "unexpected-value-1", + "resource-version": "1465990410" + } + ] + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "virtual-data-center": { + "vdc-id": "vdc-01", + "vdc-name": "example-vdc-name-val-10107", + "resource-version": "1467975781" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "logical-link": { + "link-name": "example-link-name-val-23759", + "link-type": "example-link-type-val-23759", + "speed-value": "example-speed-value-val-23759", + "speed-units": "example-speed-units-val-23759", + "ip-version": "example-ip-version-val-23759", + "routing-protocol": "example-routing-protocol-val-23759", + "resource-version": "1467975786", + "persona-model-id": "example-persona-model-id-val-23759", + "persona-model-version": "example-persona-model-version-val-23759", + "widget-model-id": "example-widget-model-id-val-23759", + "widget-model-version": "example-widget-model-version-val-23759" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "pserver": { + "hostname": "example-hostname-val-79914", + "ptnii-equip-name": "example-ptnii-equip-name-val-79914", + "number-of-cpus": 79914, + "disk-in-gigabytes": 79914, + "ram-in-megabytes": 79914, + "equip-type": "example-equip-type-val-79914", + "equip-vendor": "example-equip-vendor-val-79914", + "equip-model": "example-equip-model-val-79914", + "fqdn": "example-fqdn-val-79914", + "pserver-selflink": "example-pserver-selflink-val-79914", + "ipv4-oam-address": "example-ipv4-oam-address-val-79914", + "serial-number": "example-serial-number-val-79914", + "pserver-id": "example-pserver-id-val-79914", + "internet-topology": "example-internet-topology-val-79914", + "in-maint": true, + "resource-version": "1467994603", + "pserver-name2": "example-pserver-name2-val-79914", + "purpose": "example-purpose-val-79914" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } +}
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-validator/connector-instance-multiple-missing-attrs.json b/src/test/resources/model-validation/instance-validator/connector-instance-multiple-missing-attrs.json new file mode 100644 index 0000000..5b92692 --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/connector-instance-multiple-missing-attrs.json @@ -0,0 +1,50 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v9", + "action": "CREATE", + "entity-type": "connector", + "top-entity-type": "connector", + "entity-link": "https://dummy-host.onap.org:8443/aai/v9/business/connectors/connector/c7611ebe-c324-48f1-8085-94aef0c12fd" + }, + "entity": { + "inventory-response-item": [ + { + "connector": { + "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd", + "resource-version": "1467975776", + "persona-model-id": "connector-widget-id", + "persona-model-version": "v1.0", + "widget-model-id": "example-widget-model-id-val-69486", + "widget-model-version": "v1.0" + }, + "extra-properties": { + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "virtual-data-center": { + "vdc-id": "vdc-01", + "vdc-name": "example-vdc-name-val-10107", + "resource-version": "1467975781" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } + } + ] + } +}
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-validator/connector-instance-multiple-unexpected-attrs.json b/src/test/resources/model-validation/instance-validator/connector-instance-multiple-unexpected-attrs.json new file mode 100644 index 0000000..254433b --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/connector-instance-multiple-unexpected-attrs.json @@ -0,0 +1,72 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v9", + "action": "CREATE", + "entity-type": "connector", + "top-entity-type": "connector", + "entity-link": "https://dummy-host.onap.org:8443/aai/v9/business/connectors/connector/c7611ebe-c324-48f1-8085-94aef0c12fd" + }, + "entity": { + "inventory-response-item": [ + { + "connector": { + "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd", + "resource-version": "1467975776", + "persona-model-id": "connector-widget-id", + "persona-model-version": "v1.0", + "widget-model-id": "example-widget-model-id-val-69486", + "widget-model-version": "v1.0" + }, + "extra-properties": { + "metadatum": [ + { + "metaname": "vpn-id", + "metaval": "vpn-id-value-1", + "resource-version": "1465990410" + }, + { + "metaname": "product", + "metaval": "product-value-1", + "resource-version": "1465990410" + }, + { + "metaname": "city", + "metaval": "city-value-1", + "resource-version": "1465990410" + }, + { + "metaname": "state", + "metaval": "state-value-1", + "resource-version": "1465990410" + } + ] + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "virtual-data-center": { + "vdc-id": "vdc-01", + "vdc-name": "example-vdc-name-val-10107", + "resource-version": "1467975781" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } + } + ] + } +}
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-validator/connector-instance-no-model-id.json b/src/test/resources/model-validation/instance-validator/connector-instance-no-model-id.json new file mode 100644 index 0000000..8d2664d --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/connector-instance-no-model-id.json @@ -0,0 +1,111 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v9", + "action": "CREATE", + "entity-type": "connector", + "top-entity-type": "connector", + "entity-link": "https://dummy-host.onap.org:8443/aai/v9/business/connectors/connector/c7611ebe-c324-48f1-8085-94aef0c12fd" + }, + "entity": { + "inventory-response-item": [ + { + "connector": { + "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd", + "resource-version": "1467975776", + "widget-model-id": "example-widget-model-id-val-69486", + "widget-model-version": "v1.0" + }, + "extra-properties": { + "metadatum": [ + { + "metaname": "vpn-id", + "metaval": "vpn-id-value-1", + "resource-version": "1465990410" + }, + { + "metaname": "unexpected", + "metaval": "unexpected-value-1", + "resource-version": "1465990410" + } + ] + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "virtual-data-center": { + "vdc-id": "vdc-01", + "vdc-name": "example-vdc-name-val-10107", + "resource-version": "1467975781" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "logical-link": { + "link-name": "example-link-name-val-23759", + "link-type": "example-link-type-val-23759", + "speed-value": "example-speed-value-val-23759", + "speed-units": "example-speed-units-val-23759", + "ip-version": "example-ip-version-val-23759", + "routing-protocol": "example-routing-protocol-val-23759", + "resource-version": "1467975786", + "persona-model-id": "example-persona-model-id-val-23759", + "persona-model-version": "example-persona-model-version-val-23759", + "widget-model-id": "example-widget-model-id-val-23759", + "widget-model-version": "example-widget-model-version-val-23759" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "pserver": { + "hostname": "example-hostname-val-79914", + "ptnii-equip-name": "example-ptnii-equip-name-val-79914", + "number-of-cpus": 79914, + "disk-in-gigabytes": 79914, + "ram-in-megabytes": 79914, + "equip-type": "example-equip-type-val-79914", + "equip-vendor": "example-equip-vendor-val-79914", + "equip-model": "example-equip-model-val-79914", + "fqdn": "example-fqdn-val-79914", + "pserver-selflink": "example-pserver-selflink-val-79914", + "ipv4-oam-address": "example-ipv4-oam-address-val-79914", + "serial-number": "example-serial-number-val-79914", + "pserver-id": "example-pserver-id-val-79914", + "internet-topology": "example-internet-topology-val-79914", + "in-maint": true, + "resource-version": "1467994603", + "pserver-name2": "example-pserver-name2-val-79914", + "purpose": "example-purpose-val-79914" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } +}
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-validator/connector-instance-success.json b/src/test/resources/model-validation/instance-validator/connector-instance-success.json new file mode 100644 index 0000000..629321c --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/connector-instance-success.json @@ -0,0 +1,62 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v9", + "action": "CREATE", + "entity-type": "connector", + "top-entity-type": "connector", + "entity-link": "https://dummy-host.onap.org:8443/aai/v9/business/connectors/connector/c7611ebe-c324-48f1-8085-94aef0c12fd" + }, + "entity": { + "inventory-response-item": [ + { + "connector": { + "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd", + "resource-version": "1467975776", + "persona-model-id": "connector-widget-id", + "persona-model-version": "v1.0", + "widget-model-id": "example-widget-model-id-val-69486", + "widget-model-version": "v1.0" + }, + "extra-properties": { + "metadatum": [ + { + "metaname": "vpn-id", + "metaval": "vpn-id-value-1", + "resource-version": "1465990410" + }, + { + "metaname": "product", + "metaval": "product-value-1", + "resource-version": "1465990410" + } + ] + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "virtual-data-center": { + "vdc-id": "vdc-01", + "vdc-name": "example-vdc-name-val-10107", + "resource-version": "1467975781" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } + } + ] + } +}
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-validator/connector-instance-unknown-model-id.json b/src/test/resources/model-validation/instance-validator/connector-instance-unknown-model-id.json new file mode 100644 index 0000000..c293606 --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/connector-instance-unknown-model-id.json @@ -0,0 +1,113 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v9", + "action": "CREATE", + "entity-type": "connector", + "top-entity-type": "connector", + "entity-link": "https://dummy-host.onap.org:8443/aai/v9/business/connectors/connector/c7611ebe-c324-48f1-8085-94aef0c12fd" + }, + "entity": { + "inventory-response-item": [ + { + "connector": { + "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd", + "resource-version": "1467975776", + "persona-model-id": "UNKNOWN-MODEL", + "persona-model-version": "v1.0", + "widget-model-id": "example-widget-model-id-val-69486", + "widget-model-version": "v1.0" + }, + "extra-properties": { + "metadatum": [ + { + "metaname": "vpn-id", + "metaval": "vpn-id-value-1", + "resource-version": "1465990410" + }, + { + "metaname": "unexpected", + "metaval": "unexpected-value-1", + "resource-version": "1465990410" + } + ] + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "virtual-data-center": { + "vdc-id": "vdc-01", + "vdc-name": "example-vdc-name-val-10107", + "resource-version": "1467975781" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "logical-link": { + "link-name": "example-link-name-val-23759", + "link-type": "example-link-type-val-23759", + "speed-value": "example-speed-value-val-23759", + "speed-units": "example-speed-units-val-23759", + "ip-version": "example-ip-version-val-23759", + "routing-protocol": "example-routing-protocol-val-23759", + "resource-version": "1467975786", + "persona-model-id": "example-persona-model-id-val-23759", + "persona-model-version": "example-persona-model-version-val-23759", + "widget-model-id": "example-widget-model-id-val-23759", + "widget-model-version": "example-widget-model-version-val-23759" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "pserver": { + "hostname": "example-hostname-val-79914", + "ptnii-equip-name": "example-ptnii-equip-name-val-79914", + "number-of-cpus": 79914, + "disk-in-gigabytes": 79914, + "ram-in-megabytes": 79914, + "equip-type": "example-equip-type-val-79914", + "equip-vendor": "example-equip-vendor-val-79914", + "equip-model": "example-equip-model-val-79914", + "fqdn": "example-fqdn-val-79914", + "pserver-selflink": "example-pserver-selflink-val-79914", + "ipv4-oam-address": "example-ipv4-oam-address-val-79914", + "serial-number": "example-serial-number-val-79914", + "pserver-id": "example-pserver-id-val-79914", + "internet-topology": "example-internet-topology-val-79914", + "in-maint": true, + "resource-version": "1467994603", + "pserver-name2": "example-pserver-name2-val-79914", + "purpose": "example-purpose-val-79914" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } +}
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-validator/connector-instance.json b/src/test/resources/model-validation/instance-validator/connector-instance.json new file mode 100644 index 0000000..4fb489e --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/connector-instance.json @@ -0,0 +1,113 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v9", + "action": "CREATE", + "entity-type": "connector", + "top-entity-type": "connector", + "entity-link": "https://dummy-host.onap.org:8443/aai/v9/business/connectors/connector/c7611ebe-c324-48f1-8085-94aef0c12fd" + }, + "entity": { + "inventory-response-item": [ + { + "connector": { + "resource-instance-id": "c7611ebe-c324-48f1-8085-94aef0c12fd", + "resource-version": "1467975776", + "persona-model-id": "connector-widget-id", + "persona-model-version": "v1.0", + "widget-model-id": "example-widget-model-id-val-69486", + "widget-model-version": "v1.0" + }, + "extra-properties": { + "metadatum": [ + { + "metaname": "vpn-id", + "metaval": "vpn-id-value-1", + "resource-version": "1465990410" + }, + { + "metaname": "product", + "metaval": "product-value-1", + "resource-version": "1465990410" + } + ] + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "virtual-data-center": { + "vdc-id": "vdc-01", + "vdc-name": "example-vdc-name-val-10107", + "resource-version": "1467975781" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "logical-link": { + "link-name": "example-link-name-val-23759", + "link-type": "example-link-type-val-23759", + "speed-value": "example-speed-value-val-23759", + "speed-units": "example-speed-units-val-23759", + "ip-version": "example-ip-version-val-23759", + "routing-protocol": "example-routing-protocol-val-23759", + "resource-version": "1467975786", + "persona-model-id": "example-persona-model-id-val-23759", + "persona-model-version": "example-persona-model-version-val-23759", + "widget-model-id": "example-widget-model-id-val-23759", + "widget-model-version": "example-widget-model-version-val-23759" + }, + "extra-properties": { + + }, + "inventory-response-items": { + "inventory-response-item": [ + { + "pserver": { + "hostname": "example-hostname-val-79914", + "ptnii-equip-name": "example-ptnii-equip-name-val-79914", + "number-of-cpus": 79914, + "disk-in-gigabytes": 79914, + "ram-in-megabytes": 79914, + "equip-type": "example-equip-type-val-79914", + "equip-vendor": "example-equip-vendor-val-79914", + "equip-model": "example-equip-model-val-79914", + "fqdn": "example-fqdn-val-79914", + "pserver-selflink": "example-pserver-selflink-val-79914", + "ipv4-oam-address": "example-ipv4-oam-address-val-79914", + "serial-number": "example-serial-number-val-79914", + "pserver-id": "example-pserver-id-val-79914", + "internet-topology": "example-internet-topology-val-79914", + "in-maint": true, + "resource-version": "1467994603", + "pserver-name2": "example-pserver-name2-val-79914", + "purpose": "example-purpose-val-79914" + }, + "extra-properties": { + + }, + "inventory-response-items": { + + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } +}
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-validator/connector-widget-id.xml b/src/test/resources/model-validation/instance-validator/connector-widget-id.xml new file mode 100644 index 0000000..924ce67 --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/connector-widget-id.xml @@ -0,0 +1,79 @@ +<!-- +============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===================================================== +--> +<model> + <model-name-version-id>connector-widget-id</model-name-version-id> + <model-type>widget</model-type> + <model-name>connector</model-name> + <model-id>connector-model-id</model-id> + <model-version>v1.0</model-version> + <resource-version>1466417894</resource-version> + <model-elements> + <model-element> + <model-element-uuid>8c0fd413-0d2b-491b-ad14-10c434c359bb</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466417894</resource-version> + <model-constraints/> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.onap.org:8443/aai/v7/service-design-and-creation/models/model/virtual-data-center-widget-id/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>virtual-data-center-widget-id</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>virtual-data-center</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <metadata> + <metadatum> + <metaname>vpn-id</metaname> + <metaval>a</metaval> + <resource-version>1466417844</resource-version> + </metadatum> + <metadatum> + <metaname>product</metaname> + <metaval>b</metaval> + <resource-version>1466417844</resource-version> + </metadatum> + </metadata> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.onap.org:8443/aai/v7/service-design-and-creation/model-elements/model-element/54629607-160a-4dcf-8c5c-15b8a3756f9a/</related-link> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>54629607-160a-4dcf-8c5c-15b8a3756f9a</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>wan-connector-service-id</relationship-value> + </relationship-data> + </relationship> + </relationship-list> +</model>
\ No newline at end of file diff --git a/src/test/resources/model-validation/instance-validator/model-instance-mapping.json_conf b/src/test/resources/model-validation/instance-validator/model-instance-mapping.json_conf new file mode 100644 index 0000000..12d39ea --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/model-instance-mapping.json_conf @@ -0,0 +1,28 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "id": "relationship-list/relationship/relationship-data/relationship-value[../relationship-key/text()='model.model-name-version-id']", + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']", + "filter": { + "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']", + "valid": ["widget"] + } + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + }, + { + "mappingType": "ATTRIBUTE", + "model": { + "value": "metadata/metadatum/metaname" + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "value": "$..extra-properties.metadatum[*].metaname" + } + } +] diff --git a/src/test/resources/model-validation/instance-validator/test-validation-service-beans.xml b/src/test/resources/model-validation/instance-validator/test-validation-service-beans.xml new file mode 100644 index 0000000..82fe160 --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/test-validation-service-beans.xml @@ -0,0 +1,116 @@ +<?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: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.xsd"> + + <import resource="../../oxm-reader/oxm-reader-beans.xml" /> + + <!-- ////////////////////////////////////////////////////////////////// --> + <!-- PROPERTY AND CONFIGURATION FILES --> + <!-- ////////////////////////////////////////////////////////////////// --> + <context:property-placeholder location="classpath:event-reader.properties" + ignore-unresolvable="true" /> + <context:property-placeholder location="classpath:model-validation/instance-validator/aai-environment.properties" + ignore-unresolvable="true" /> + <context:property-placeholder location="classpath:model-validation/instance-validator/validation-service.properties" + ignore-unresolvable="true" /> + + <bean id="mappingFile" class="org.apache.commons.io.IOUtils" factory-method="toString"> + <constructor-arg value="file:src/test/resources/model-validation/instance-validator/model-instance-mapping.json_conf" + type="java.io.InputStream" /> + </bean> + + <!-- ////////////////////////////////////////////////////////////////// --> + <!-- CONFIG BEANS --> + <!-- ////////////////////////////////////////////////////////////////// --> + <bean id="modelConfig" class="org.onap.aai.validation.config.ModelConfig"> + <property name="modelCacheExpirySeconds" value="${model.cache.expirySeconds}" /> + </bean> + + <bean id="restConfig" class="org.onap.aai.validation.config.RestConfig"> + <property name="host" value="${host}" /> + <property name="port" value="${port}" /> + <property name="protocol" value="${httpProtocol}" /> + <property name="baseModelURI" value="${baseModelURI}" /> + <property name="trustStorePath" value="${trustStorePath}" /> + <property name="trustStorePassword" value="${trustStorePassword.x}" /> + <property name="keyStorePath" value="${keyStorePath}" /> + <property name="keyStorePassword" value="${keyStorePassword.x}" /> + <property name="keyManagerFactoryAlgorithm" value="${keyManagerFactoryAlgorithm}" /> + <property name="keyStoreType" value="${keyStoreType}" /> + <property name="securityProtocol" value="${securityProtocol}" /> + <property name="connectionTimeout" value="${connectionTimeout}" /> + <property name="readTimeout" value="${readTimeout}" /> + </bean> + + <bean id="eventReaderConfig" class="org.onap.aai.validation.config.EventReaderConfig"> + <property name="eventDomainPath" value="${event.domain.path}" /> + <property name="eventActionPath" value="${event.action.path}" /> + <property name="eventTypePath" value="${event.type.path}" /> + <property name="entityTypePath" value="${event.entity.type.path}" /> + <property name="topEntityTypePath" value="${event.entity.type.top.path}" /> + <property name="entityLinkPath" value="${event.entity.link.path}" /> + <property name="entityPath" value="${event.entity.path}" /> + <property name="nestedEntityPath" value="${event.entity.nested.path}" /> + <property name="entityIdPath" value="${entity.id.path}" /> + <property name="entityResourceVersionPath" value="${entity.resource.version.path}" /> + </bean> + + <!-- ////////////////////////////////////////////////////////////////// --> + <!-- READER BEANS --> + <!-- ////////////////////////////////////////////////////////////////// --> + + <bean id="jsonReader" class="org.onap.aai.validation.reader.JsonReader" /> + + <bean id="eventReader" class="org.onap.aai.validation.reader.EventReader"> + <constructor-arg ref="eventReaderConfig" /> + <constructor-arg ref="jsonReader" /> + <constructor-arg ref="oxmReader" /> + </bean> + + <!-- ////////////////////////////////////////////////////////////////// --> + <!-- IMPLEMENTATION BEANS --> + <!-- ////////////////////////////////////////////////////////////////// --> + + <!-- MODEL VALIDATION BEANS --> + <bean id="modelCacheManager" class="org.onap.aai.validation.modeldriven.ModelCacheManager"> + <constructor-arg ref="modelConfig" /> + <constructor-arg ref="restConfig" /> + </bean> + + <bean id="modelInstanceMappingReader" class="org.onap.aai.validation.modeldriven.configuration.mapping.ModelInstanceMappingReader"> + <constructor-arg ref="mappingFile" /> + </bean> + + <bean id="instanceReader" class="org.onap.aai.validation.modeldriven.validator.InstanceReader"> + <constructor-arg ref="jsonReader" /> + <constructor-arg ref="oxmReader" /> + </bean> + + <bean id="instanceValidator" class="org.onap.aai.validation.modeldriven.validator.ModelDrivenValidator"> + <constructor-arg ref="modelCacheManager" /> + <constructor-arg ref="modelInstanceMappingReader" /> + <constructor-arg ref="instanceReader" /> + <constructor-arg ref="eventReader" /> + </bean> + +</beans> diff --git a/src/test/resources/model-validation/instance-validator/validation-service.properties b/src/test/resources/model-validation/instance-validator/validation-service.properties new file mode 100644 index 0000000..4e1b264 --- /dev/null +++ b/src/test/resources/model-validation/instance-validator/validation-service.properties @@ -0,0 +1,29 @@ +# ============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===================================================== + +topic.publish.enable=true +topic.publish.retries=3 +topic.consume.enable=true +topic.consume.polling.interval.seconds=3 + +event.domain=devINT1 +event.action.exclude=DELETE +event.type.rule=AAI-EVENT,AAI-DATA-EXPORT-API,GIZMO-EVENT +event.type.model=AAI-DATA-EXPORT-NQ +event.type.end=END-EVENT + +model.cache.expirySeconds=3 +aai.oxm.version=12 diff --git a/src/test/resources/model-validation/model-parser/all-models.xml b/src/test/resources/model-validation/model-parser/all-models.xml new file mode 100644 index 0000000..a295a5f --- /dev/null +++ b/src/test/resources/model-validation/model-parser/all-models.xml @@ -0,0 +1,1370 @@ +<?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===================================================== +--> +<models xmlns="http://org.onap.aai.inventory/v7"> + <model> + <model-name-version-id>22382f81-70cb-470d-8ab2-3e1b9fad10df</model-name-version-id> + <model-type>widget</model-type> + <model-name>generic-vnf</model-name> + <model-id>6dcdbbc8-23b6-42c3-ac9f-2c0a3fe8cfba</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698747</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/43095b8a-8e9c-4a76-8490-6120140f6804/model-elements/model-element/41e6d6e5-aa69-4d33-b9f2-975bf418d1e3/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>43095b8a-8e9c-4a76-8490-6120140f6804</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>41e6d6e5-aa69-4d33-b9f2-975bf418d1e3</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/0d23052d-8ffe-433e-a25d-da5da027bb7c/model-elements/model-element/17e48d38-e055-4158-ae6b-a170e8a647cd/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>0d23052d-8ffe-433e-a25d-da5da027bb7c</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>17e48d38-e055-4158-ae6b-a170e8a647cd</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/named-query-elements/named-query-element/dc38d8ae-0993-4426-af79-a7aff4a4b4f3/named-query-elements/named-query-element/a97e8ab3-addd-40ee-9d29-3de505a56374/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc38d8ae-0993-4426-af79-a7aff4a4b4f3</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>a97e8ab3-addd-40ee-9d29-3de505a56374</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/named-query-elements/named-query-element/920399b7-21c1-4e81-8fb9-a3b2283a72ba/named-query-elements/named-query-element/759ef1e4-3eca-4d55-8a9c-a8be31179f47/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>920399b7-21c1-4e81-8fb9-a3b2283a72ba</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>759ef1e4-3eca-4d55-8a9c-a8be31179f47</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>connector-widget-id</model-name-version-id> + <model-type>widget</model-type> + <model-name>connector</model-name> + <model-id>connector-model-id</model-id> + <model-version>v2.0</model-version> + <resource-version>1466689944</resource-version> + </model> + <model> + <model-name-version-id>43095b8a-8e9c-4a76-8490-6120140f6804</model-name-version-id> + <model-type>resource</model-type> + <model-name>vSbg</model-name> + <model-id>b23fb31b-4c21-45f7-9d92-96ed70e63df1</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>41e6d6e5-aa69-4d33-b9f2-975bf418d1e3</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698619</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/22382f81-70cb-470d-8ab2-3e1b9fad10df/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>22382f81-70cb-470d-8ab2-3e1b9fad10df</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>generic-vnf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/model-elements/model-element/6cf69470-ccbf-4034-a37f-f714c135f05c/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>6cf69470-ccbf-4034-a37f-f714c135f05c</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/model-elements/model-element/059db56c-6d72-4023-9fc3-0db29534ddff/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>059db56c-6d72-4023-9fc3-0db29534ddff</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>523f0645-8182-4c91-9d6a-2f968e923937</model-name-version-id> + <model-type>widget</model-type> + <model-name>pserver</model-name> + <model-id>c277c968-7e2b-4a88-9094-2b8a55dfb9f4</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698757</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/model-elements/model-element/76624fe1-0f28-4e17-ae9f-f0e2bba6d13d/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/6614ffae-6e64-4c78-9dea-4d5c0f057ea2/model-elements/model-element/0204aad0-fe13-4f75-b022-f91f245f0e9e/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>6614ffae-6e64-4c78-9dea-4d5c0f057ea2</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>0204aad0-fe13-4f75-b022-f91f245f0e9e</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/named-query-elements/named-query-element/920399b7-21c1-4e81-8fb9-a3b2283a72ba/named-query-elements/named-query-element/a79552d6-20dc-4b9e-b4d4-f29a8a2a8447/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>920399b7-21c1-4e81-8fb9-a3b2283a72ba</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>a79552d6-20dc-4b9e-b4d4-f29a8a2a8447</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/named-query-elements/named-query-element/dc38d8ae-0993-4426-af79-a7aff4a4b4f3/named-query-elements/named-query-element/41294247-9f7e-4abf-becd-3bbca6945c09/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc38d8ae-0993-4426-af79-a7aff4a4b4f3</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>41294247-9f7e-4abf-becd-3bbca6945c09</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>99469866-95bb-400e-8786-f83e87696725</model-name-version-id> + <model-type>widget</model-type> + <model-name>virtual-data-center</model-name> + <model-id>3c70c43f-99ed-4476-82f4-92a30616e512</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698727</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/model-elements/model-element/200de3d5-c207-47c2-a507-8846ba1d7068/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>200de3d5-c207-47c2-a507-8846ba1d7068</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</model-name-version-id> + <model-type>resource</model-type> + <model-name>ipe</model-name> + <model-id>e8f973a5-418a-44f2-9784-159e3e37d708</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>b7b48ba6-427b-4d23-ada7-a67ac9e0f84f</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>ebc25508-b2e3-4021-b684-269cfd2b63c0</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>f610d699-11af-4c13-a918-a89344e4a1bd</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/49032ff1-5466-4054-b64b-15395ac10c00/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>49032ff1-5466-4054-b64b-15395ac10c00</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>vlan</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/0a706320-b8e7-4b18-9485-fba156ea00cf/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>0a706320-b8e7-4b18-9485-fba156ea00cf</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>l-interface</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/3d9f4b1d-360c-4862-9623-703b150157ce/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>3d9f4b1d-360c-4862-9623-703b150157ce</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>p-interface</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/523f0645-8182-4c91-9d6a-2f968e923937/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>523f0645-8182-4c91-9d6a-2f968e923937</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>pserver</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/model-elements/model-element/304ddca5-47cd-49ec-a2d7-1ce17baa5b70/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>304ddca5-47cd-49ec-a2d7-1ce17baa5b70</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/model-elements/model-element/193ec825-44ce-4416-85ac-20a6b6663575/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>193ec825-44ce-4416-85ac-20a6b6663575</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>668464da-6d41-4599-bdbb-2576147b440e</model-name-version-id> + <model-type>resource</model-type> + <model-name>WAN Connector v0.1</model-name> + <model-id>dc700a83-c507-47d9-b775-1fdfcdd5f9eb</model-id> + <model-version>0.1</model-version> + <model-description>Connects a customer vpn to the border elements of a vendor product</model-description> + <resource-version>1466698623</resource-version> + <model-elements> + <model-element> + <model-element-uuid>93a37846-b497-490e-bc97-7d130022d6db</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>200de3d5-c207-47c2-a507-8846ba1d7068</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>7ccfe6b5-6566-4b44-83d3-b79f5de7a87b</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>VL ELAN</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + <model-element> + <model-element-uuid>dfd30146-74f4-49e9-bad6-019d413352ac</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>vLAN on a Physical Wire</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/99469866-95bb-400e-8786-f83e87696725/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>99469866-95bb-400e-8786-f83e87696725</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>virtual-data-center</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/15f47352-28b7-4bbd-9828-393eaf79eeff/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>15f47352-28b7-4bbd-9828-393eaf79eeff</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>connector</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <metadata> + <metadatum> + <metaname>product</metaname> + <metaval>product-value-1</metaval> + <resource-version>1466698623</resource-version> + </metadatum> + <metadatum> + <metaname>vpn-id</metaname> + <metaval>vpn-id-value-1</metaval> + <resource-version>1466698623</resource-version> + </metadatum> + </metadata> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/460c6de2-a92b-4e3b-9ba3-538ce782b2fa/model-elements/model-element/71b825be-febf-45f7-b86a-ca0e3de19c90/model-elements/model-element/986167cb-57d3-4aad-8896-784a22c5289c/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>460c6de2-a92b-4e3b-9ba3-538ce782b2fa</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>71b825be-febf-45f7-b86a-ca0e3de19c90</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>986167cb-57d3-4aad-8896-784a22c5289c</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>460c6de2-a92b-4e3b-9ba3-538ce782b2fa</model-name-version-id> + <model-type>service</model-type> + <model-name>WAN Bonding v0.1</model-name> + <model-id>0ee8c1bc-7cbd-4b0a-a1ac-e9999255abc1</model-id> + <model-version>0.1</model-version> + <model-description>service-instance of the wan object</model-description> + <resource-version>1466698623</resource-version> + <model-elements> + <model-element> + <model-element-uuid>71b825be-febf-45f7-b86a-ca0e3de19c90</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698623</resource-version> + <model-elements> + <model-element> + <model-element-uuid>986167cb-57d3-4aad-8896-784a22c5289c</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698623</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>NetBond WAN Connector v0.1</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/46b92144-923a-4d20-b85a-3cbd847668a9/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>46b92144-923a-4d20-b85a-3cbd847668a9</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>service-instance</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <metadata> + <metadatum> + <metaname>b</metaname> + <metaval>product</metaval> + <resource-version>1466698623</resource-version> + </metadatum> + <metadatum> + <metaname>a</metaname> + <metaval>vpn-id</metaval> + <resource-version>1466698623</resource-version> + </metadatum> + </metadata> + </model> + <model> + <model-name-version-id>generic-vnf-widget-id</model-name-version-id> + <model-type>widget</model-type> + <model-name>generic-vnf</model-name> + <model-id>generic-vnf-model-id</model-id> + <model-version>v1.0</model-version> + <resource-version>1466624623</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/vMME-resource-id/model-elements/model-element/af4b6df2-65d0-4d10-b25e-02206799e1fa/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>vMME-resource-id</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>af4b6df2-65d0-4d10-b25e-02206799e1fa</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>6614ffae-6e64-4c78-9dea-4d5c0f057ea2</model-name-version-id> + <model-type>resource</model-type> + <model-name>pBgf</model-name> + <model-id>9038f1d7-61f2-49ef-a61d-ace468d4ab32</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>0204aad0-fe13-4f75-b022-f91f245f0e9e</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698620</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/523f0645-8182-4c91-9d6a-2f968e923937/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>523f0645-8182-4c91-9d6a-2f968e923937</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>pserver</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/model-elements/model-element/ad161a89-ef32-4b2c-b86d-7fbb7a251571/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>ad161a89-ef32-4b2c-b86d-7fbb7a251571</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/model-elements/model-element/d0d50aad-bb97-4865-a3bb-72dbf41be50b/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>d0d50aad-bb97-4865-a3bb-72dbf41be50b</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>15f47352-28b7-4bbd-9828-393eaf79eeff</model-name-version-id> + <model-type>widget</model-type> + <model-name>connector</model-name> + <model-id>4f0dbd2d-b667-4d19-a563-84a764e62fa7</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698717</resource-version> + <relationship-list> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>682ae094-0aaa-4381-a55d-bc633c40e4c0</model-name-version-id> + <model-type>resource</model-type> + <model-name>vLAN on a Physical Wire</model-name> + <model-id>32bee148-2cae-4f3d-a42e-22c9e4f078a2</model-id> + <model-version>1</model-version> + <model-description>An l2-bridge used by a wan connector connects an ipe to a BGF </model-description> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>d0d50aad-bb97-4865-a3bb-72dbf41be50b</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/6614ffae-6e64-4c78-9dea-4d5c0f057ea2/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>6614ffae-6e64-4c78-9dea-4d5c0f057ea2</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>pBgf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/fa01ef50-bbb5-49d4-91d1-ebbda9816e01/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>fa01ef50-bbb5-49d4-91d1-ebbda9816e01</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>logical-link</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/model-elements/model-element/200de3d5-c207-47c2-a507-8846ba1d7068/model-elements/model-element/dfd30146-74f4-49e9-bad6-019d413352ac/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>200de3d5-c207-47c2-a507-8846ba1d7068</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>dfd30146-74f4-49e9-bad6-019d413352ac</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>46b92144-923a-4d20-b85a-3cbd847668a9</model-name-version-id> + <model-type>widget</model-type> + <model-name>service-instance</model-name> + <model-id>82194af1-3c2c-485a-8f44-420e22a9eaa4</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698646</resource-version> + <relationship-list> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/460c6de2-a92b-4e3b-9ba3-538ce782b2fa/model-elements/model-element/71b825be-febf-45f7-b86a-ca0e3de19c90/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>460c6de2-a92b-4e3b-9ba3-538ce782b2fa</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>71b825be-febf-45f7-b86a-ca0e3de19c90</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>3d9f4b1d-360c-4862-9623-703b150157ce</model-name-version-id> + <model-type>widget</model-type> + <model-name>p-interface</model-name> + <model-id>479f5f13-51d9-4ccb-bddf-f554f1af0cfc</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/model-elements/model-element/76624fe1-0f28-4e17-ae9f-f0e2bba6d13d/model-elements/model-element/b7b48ba6-427b-4d23-ada7-a67ac9e0f84f/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>b7b48ba6-427b-4d23-ada7-a67ac9e0f84f</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>0d23052d-8ffe-433e-a25d-da5da027bb7c</model-name-version-id> + <model-type>resource</model-type> + <model-name>vDbe</model-name> + <model-id>fe8aac07-ce6c-4f9f-aa0d-b561c77da9e8</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>17e48d38-e055-4158-ae6b-a170e8a647cd</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698618</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/22382f81-70cb-470d-8ab2-3e1b9fad10df/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>22382f81-70cb-470d-8ab2-3e1b9fad10df</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>generic-vnf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/model-elements/model-element/1d73a0dc-e7f6-4b6d-9450-5dda720d1a7f/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>1d73a0dc-e7f6-4b6d-9450-5dda720d1a7f</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/model-elements/model-element/a1b205ea-17bb-442b-83a3-38b4e0fcb099/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>a1b205ea-17bb-442b-83a3-38b4e0fcb099</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>vMME-resource-id</model-name-version-id> + <model-type>resource</model-type> + <model-name>vMME</model-name> + <model-id>vMME-model-id</model-id> + <model-version>v1.0</model-version> + <resource-version>1466624623</resource-version> + <model-elements> + <model-element> + <model-element-uuid>af4b6df2-65d0-4d10-b25e-02206799e1fa</model-element-uuid> + <new-data-del-flag>true</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466624623</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/generic-vnf-widget-id/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>generic-vnf-widget-id</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>generic-vnf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + </model> + <model> + <model-name-version-id>fa01ef50-bbb5-49d4-91d1-ebbda9816e01</model-name-version-id> + <model-type>widget</model-type> + <model-name>logical-link</model-name> + <model-id>8742d5b3-ee98-4165-8bd5-fc012a7885b9</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698737</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/named-query-elements/named-query-element/920399b7-21c1-4e81-8fb9-a3b2283a72ba/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>920399b7-21c1-4e81-8fb9-a3b2283a72ba</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/named-query-elements/named-query-element/dc38d8ae-0993-4426-af79-a7aff4a4b4f3/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc38d8ae-0993-4426-af79-a7aff4a4b4f3</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>0a706320-b8e7-4b18-9485-fba156ea00cf</model-name-version-id> + <model-type>widget</model-type> + <model-name>l-interface</model-name> + <model-id>d9131b0d-698f-4297-8699-af0a3ac7ebdc</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698767</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/model-elements/model-element/76624fe1-0f28-4e17-ae9f-f0e2bba6d13d/model-elements/model-element/b7b48ba6-427b-4d23-ada7-a67ac9e0f84f/model-elements/model-element/ebc25508-b2e3-4021-b684-269cfd2b63c0/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>b7b48ba6-427b-4d23-ada7-a67ac9e0f84f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>ebc25508-b2e3-4021-b684-269cfd2b63c0</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/named-query-elements/named-query-element/dc38d8ae-0993-4426-af79-a7aff4a4b4f3/named-query-elements/named-query-element/29ac58b9-37fa-4d6a-9d2e-29f33e1e3b7a/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc38d8ae-0993-4426-af79-a7aff4a4b4f3</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>29ac58b9-37fa-4d6a-9d2e-29f33e1e3b7a</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/named-query-elements/named-query-element/920399b7-21c1-4e81-8fb9-a3b2283a72ba/named-query-elements/named-query-element/eda1554f-3eff-4195-9185-bcbc4f75826f/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>920399b7-21c1-4e81-8fb9-a3b2283a72ba</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>eda1554f-3eff-4195-9185-bcbc4f75826f</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>49032ff1-5466-4054-b64b-15395ac10c00</model-name-version-id> + <model-type>widget</model-type> + <model-name>vlan</model-name> + <model-id>2febb0bc-b776-45b3-af50-75a578a8a4c4</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/model-elements/model-element/76624fe1-0f28-4e17-ae9f-f0e2bba6d13d/model-elements/model-element/b7b48ba6-427b-4d23-ada7-a67ac9e0f84f/model-elements/model-element/ebc25508-b2e3-4021-b684-269cfd2b63c0/model-elements/model-element/f610d699-11af-4c13-a918-a89344e4a1bd/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>b7b48ba6-427b-4d23-ada7-a67ac9e0f84f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>ebc25508-b2e3-4021-b684-269cfd2b63c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>f610d699-11af-4c13-a918-a89344e4a1bd</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</model-name-version-id> + <model-type>resource</model-type> + <model-name>VL ELAN</model-name> + <model-id>932518e5-4260-4cc4-8038-df604a367f85</model-id> + <model-version>1</model-version> + <model-description>An l2-bridge used by a wan connector connects an ipe to a SBG or DBE</model-description> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>c44dbdf9-494e-49c1-b462-74e24e837b22</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>a1b205ea-17bb-442b-83a3-38b4e0fcb099</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/0d23052d-8ffe-433e-a25d-da5da027bb7c/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>0d23052d-8ffe-433e-a25d-da5da027bb7c</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>vDbe</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/fa01ef50-bbb5-49d4-91d1-ebbda9816e01/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>fa01ef50-bbb5-49d4-91d1-ebbda9816e01</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>logical-link</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/model-elements/model-element/200de3d5-c207-47c2-a507-8846ba1d7068/model-elements/model-element/7ccfe6b5-6566-4b44-83d3-b79f5de7a87b/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>200de3d5-c207-47c2-a507-8846ba1d7068</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>7ccfe6b5-6566-4b44-83d3-b79f5de7a87b</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> +</models>
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/aai-environment.properties b/src/test/resources/model-validation/model-reader/aai-environment.properties new file mode 100644 index 0000000..3450105 --- /dev/null +++ b/src/test/resources/model-validation/model-reader/aai-environment.properties @@ -0,0 +1,30 @@ +# ============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===================================================== + +httpProtocol=file +baseModelURI=src/test/resources/model-validation/model-reader/all-models.xml + +# the following fields are autowired but will never be used +host= +port= +trustStorePath= +keyStorePath= +keyStorePassword.x= +keyManagerFactoryAlgorithm= +keyStoreType= +securityProtocol= +connectionTimeout= +readTimeout= diff --git a/src/test/resources/model-validation/model-reader/all-models.xml b/src/test/resources/model-validation/model-reader/all-models.xml new file mode 100644 index 0000000..afc5dda --- /dev/null +++ b/src/test/resources/model-validation/model-reader/all-models.xml @@ -0,0 +1,1370 @@ +<?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===================================================== +--> +<models xmlns="http://org.onap.aai.inventory/v7"> + <model> + <model-name-version-id>22382f81-70cb-470d-8ab2-3e1b9fad10df</model-name-version-id> + <model-type>widget</model-type> + <model-name>generic-vnf</model-name> + <model-id>6dcdbbc8-23b6-42c3-ac9f-2c0a3fe8cfba</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698747</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/43095b8a-8e9c-4a76-8490-6120140f6804/model-elements/model-element/41e6d6e5-aa69-4d33-b9f2-975bf418d1e3/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>43095b8a-8e9c-4a76-8490-6120140f6804</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>41e6d6e5-aa69-4d33-b9f2-975bf418d1e3</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/0d23052d-8ffe-433e-a25d-da5da027bb7c/model-elements/model-element/17e48d38-e055-4158-ae6b-a170e8a647cd/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>0d23052d-8ffe-433e-a25d-da5da027bb7c</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>17e48d38-e055-4158-ae6b-a170e8a647cd</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/named-query-elements/named-query-element/dc38d8ae-0993-4426-af79-a7aff4a4b4f3/named-query-elements/named-query-element/a97e8ab3-addd-40ee-9d29-3de505a56374/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc38d8ae-0993-4426-af79-a7aff4a4b4f3</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>a97e8ab3-addd-40ee-9d29-3de505a56374</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/named-query-elements/named-query-element/920399b7-21c1-4e81-8fb9-a3b2283a72ba/named-query-elements/named-query-element/759ef1e4-3eca-4d55-8a9c-a8be31179f47/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>920399b7-21c1-4e81-8fb9-a3b2283a72ba</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>759ef1e4-3eca-4d55-8a9c-a8be31179f47</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>connector-widget-id</model-name-version-id> + <model-type>widget</model-type> + <model-name>connector</model-name> + <model-id>connector-model-id</model-id> + <model-version>v2.0</model-version> + <resource-version>1466689944</resource-version> + </model> + <model> + <model-name-version-id>43095b8a-8e9c-4a76-8490-6120140f6804</model-name-version-id> + <model-type>resource</model-type> + <model-name>vSbg</model-name> + <model-id>b23fb31b-4c21-45f7-9d92-96ed70e63df1</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>41e6d6e5-aa69-4d33-b9f2-975bf418d1e3</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698619</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/22382f81-70cb-470d-8ab2-3e1b9fad10df/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>22382f81-70cb-470d-8ab2-3e1b9fad10df</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>generic-vnf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/model-elements/model-element/6cf69470-ccbf-4034-a37f-f714c135f05c/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>6cf69470-ccbf-4034-a37f-f714c135f05c</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/model-elements/model-element/059db56c-6d72-4023-9fc3-0db29534ddff/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>059db56c-6d72-4023-9fc3-0db29534ddff</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>523f0645-8182-4c91-9d6a-2f968e923937</model-name-version-id> + <model-type>widget</model-type> + <model-name>pserver</model-name> + <model-id>c277c968-7e2b-4a88-9094-2b8a55dfb9f4</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698757</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/model-elements/model-element/76624fe1-0f28-4e17-ae9f-f0e2bba6d13d/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/6614ffae-6e64-4c78-9dea-4d5c0f057ea2/model-elements/model-element/0204aad0-fe13-4f75-b022-f91f245f0e9e/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>6614ffae-6e64-4c78-9dea-4d5c0f057ea2</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>0204aad0-fe13-4f75-b022-f91f245f0e9e</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/named-query-elements/named-query-element/920399b7-21c1-4e81-8fb9-a3b2283a72ba/named-query-elements/named-query-element/a79552d6-20dc-4b9e-b4d4-f29a8a2a8447/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>920399b7-21c1-4e81-8fb9-a3b2283a72ba</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>a79552d6-20dc-4b9e-b4d4-f29a8a2a8447</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/named-query-elements/named-query-element/dc38d8ae-0993-4426-af79-a7aff4a4b4f3/named-query-elements/named-query-element/41294247-9f7e-4abf-becd-3bbca6945c09/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc38d8ae-0993-4426-af79-a7aff4a4b4f3</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>41294247-9f7e-4abf-becd-3bbca6945c09</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>99469866-95bb-400e-8786-f83e87696725</model-name-version-id> + <model-type>widget</model-type> + <model-name>virtual-data-center</model-name> + <model-id>3c70c43f-99ed-4476-82f4-92a30616e512</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698727</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/model-elements/model-element/200de3d5-c207-47c2-a507-8846ba1d7068/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>200de3d5-c207-47c2-a507-8846ba1d7068</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</model-name-version-id> + <model-type>resource</model-type> + <model-name>ipe</model-name> + <model-id>e8f973a5-418a-44f2-9784-159e3e37d708</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>b7b48ba6-427b-4d23-ada7-a67ac9e0f84f</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>ebc25508-b2e3-4021-b684-269cfd2b63c0</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>f610d699-11af-4c13-a918-a89344e4a1bd</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/49032ff1-5466-4054-b64b-15395ac10c00/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>49032ff1-5466-4054-b64b-15395ac10c00</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>vlan</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/0a706320-b8e7-4b18-9485-fba156ea00cf/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>0a706320-b8e7-4b18-9485-fba156ea00cf</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>l-interface</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/3d9f4b1d-360c-4862-9623-703b150157ce/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>3d9f4b1d-360c-4862-9623-703b150157ce</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>p-interface</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/523f0645-8182-4c91-9d6a-2f968e923937/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>523f0645-8182-4c91-9d6a-2f968e923937</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>pserver</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/model-elements/model-element/304ddca5-47cd-49ec-a2d7-1ce17baa5b70/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>304ddca5-47cd-49ec-a2d7-1ce17baa5b70</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/model-elements/model-element/193ec825-44ce-4416-85ac-20a6b6663575/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>193ec825-44ce-4416-85ac-20a6b6663575</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>668464da-6d41-4599-bdbb-2576147b440e</model-name-version-id> + <model-type>resource</model-type> + <model-name>WAN Connector v0.1</model-name> + <model-id>dc700a83-c507-47d9-b775-1fdfcdd5f9eb</model-id> + <model-version>0.1</model-version> + <model-description>Connects a customer vpn to the border elements of a vendor product</model-description> + <resource-version>1466698623</resource-version> + <model-elements> + <model-element> + <model-element-uuid>93a37846-b497-490e-bc97-7d130022d6db</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>200de3d5-c207-47c2-a507-8846ba1d7068</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>7ccfe6b5-6566-4b44-83d3-b79f5de7a87b</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>VL ELAN</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + <model-element> + <model-element-uuid>dfd30146-74f4-49e9-bad6-019d413352ac</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>vLAN on a Physical Wire</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/99469866-95bb-400e-8786-f83e87696725/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>99469866-95bb-400e-8786-f83e87696725</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>virtual-data-center</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/15f47352-28b7-4bbd-9828-393eaf79eeff/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>15f47352-28b7-4bbd-9828-393eaf79eeff</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>connector</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <metadata> + <metadatum> + <metaname>product</metaname> + <metaval>product-value-1</metaval> + <resource-version>1466698623</resource-version> + </metadatum> + <metadatum> + <metaname>vpn-id</metaname> + <metaval>vpn-id-value-1</metaval> + <resource-version>1466698623</resource-version> + </metadatum> + </metadata> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/460c6de2-a92b-4e3b-9ba3-538ce782b2fa/model-elements/model-element/71b825be-febf-45f7-b86a-ca0e3de19c90/model-elements/model-element/986167cb-57d3-4aad-8896-784a22c5289c/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>460c6de2-a92b-4e3b-9ba3-538ce782b2fa</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>71b825be-febf-45f7-b86a-ca0e3de19c90</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>986167cb-57d3-4aad-8896-784a22c5289c</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>460c6de2-a92b-4e3b-9ba3-538ce782b2fa</model-name-version-id> + <model-type>service</model-type> + <model-name>WAN Bonding v0.1</model-name> + <model-id>0ee8c1bc-7cbd-4b0a-a1ac-e9999255abc1</model-id> + <model-version>0.1</model-version> + <model-description>service-instance of the wan object</model-description> + <resource-version>1466698623</resource-version> + <model-elements> + <model-element> + <model-element-uuid>71b825be-febf-45f7-b86a-ca0e3de19c90</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698623</resource-version> + <model-elements> + <model-element> + <model-element-uuid>986167cb-57d3-4aad-8896-784a22c5289c</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698623</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>WAN Connector v0.1</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/46b92144-923a-4d20-b85a-3cbd847668a9/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>46b92144-923a-4d20-b85a-3cbd847668a9</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>service-instance</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <metadata> + <metadatum> + <metaname>b</metaname> + <metaval>product</metaval> + <resource-version>1466698623</resource-version> + </metadatum> + <metadatum> + <metaname>a</metaname> + <metaval>vpn-id</metaval> + <resource-version>1466698623</resource-version> + </metadatum> + </metadata> + </model> + <model> + <model-name-version-id>generic-vnf-widget-id</model-name-version-id> + <model-type>widget</model-type> + <model-name>generic-vnf</model-name> + <model-id>generic-vnf-model-id</model-id> + <model-version>v1.0</model-version> + <resource-version>1466624623</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/vMME-resource-id/model-elements/model-element/af4b6df2-65d0-4d10-b25e-02206799e1fa/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>vMME-resource-id</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>af4b6df2-65d0-4d10-b25e-02206799e1fa</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>6614ffae-6e64-4c78-9dea-4d5c0f057ea2</model-name-version-id> + <model-type>resource</model-type> + <model-name>pBgf</model-name> + <model-id>9038f1d7-61f2-49ef-a61d-ace468d4ab32</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>0204aad0-fe13-4f75-b022-f91f245f0e9e</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698620</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/523f0645-8182-4c91-9d6a-2f968e923937/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>523f0645-8182-4c91-9d6a-2f968e923937</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>pserver</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/model-elements/model-element/ad161a89-ef32-4b2c-b86d-7fbb7a251571/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>ad161a89-ef32-4b2c-b86d-7fbb7a251571</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/model-elements/model-element/d0d50aad-bb97-4865-a3bb-72dbf41be50b/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>d0d50aad-bb97-4865-a3bb-72dbf41be50b</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>15f47352-28b7-4bbd-9828-393eaf79eeff</model-name-version-id> + <model-type>widget</model-type> + <model-name>connector</model-name> + <model-id>4f0dbd2d-b667-4d19-a563-84a764e62fa7</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698717</resource-version> + <relationship-list> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>682ae094-0aaa-4381-a55d-bc633c40e4c0</model-name-version-id> + <model-type>resource</model-type> + <model-name>vLAN on a Physical Wire</model-name> + <model-id>32bee148-2cae-4f3d-a42e-22c9e4f078a2</model-id> + <model-version>1</model-version> + <model-description>An l2-bridge used by a wan connector connects an ipe to a BGF </model-description> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>d0d50aad-bb97-4865-a3bb-72dbf41be50b</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698622</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/6614ffae-6e64-4c78-9dea-4d5c0f057ea2/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>6614ffae-6e64-4c78-9dea-4d5c0f057ea2</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>pBgf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/fa01ef50-bbb5-49d4-91d1-ebbda9816e01/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>fa01ef50-bbb5-49d4-91d1-ebbda9816e01</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>logical-link</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/model-elements/model-element/200de3d5-c207-47c2-a507-8846ba1d7068/model-elements/model-element/dfd30146-74f4-49e9-bad6-019d413352ac/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>200de3d5-c207-47c2-a507-8846ba1d7068</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>dfd30146-74f4-49e9-bad6-019d413352ac</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>46b92144-923a-4d20-b85a-3cbd847668a9</model-name-version-id> + <model-type>widget</model-type> + <model-name>service-instance</model-name> + <model-id>82194af1-3c2c-485a-8f44-420e22a9eaa4</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698646</resource-version> + <relationship-list> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/460c6de2-a92b-4e3b-9ba3-538ce782b2fa/model-elements/model-element/71b825be-febf-45f7-b86a-ca0e3de19c90/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>460c6de2-a92b-4e3b-9ba3-538ce782b2fa</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>71b825be-febf-45f7-b86a-ca0e3de19c90</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>3d9f4b1d-360c-4862-9623-703b150157ce</model-name-version-id> + <model-type>widget</model-type> + <model-name>p-interface</model-name> + <model-id>479f5f13-51d9-4ccb-bddf-f554f1af0cfc</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/model-elements/model-element/76624fe1-0f28-4e17-ae9f-f0e2bba6d13d/model-elements/model-element/b7b48ba6-427b-4d23-ada7-a67ac9e0f84f/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>b7b48ba6-427b-4d23-ada7-a67ac9e0f84f</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>0d23052d-8ffe-433e-a25d-da5da027bb7c</model-name-version-id> + <model-type>resource</model-type> + <model-name>vDbe</model-name> + <model-id>fe8aac07-ce6c-4f9f-aa0d-b561c77da9e8</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>17e48d38-e055-4158-ae6b-a170e8a647cd</model-element-uuid> + <new-data-del-flag>F</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698618</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/22382f81-70cb-470d-8ab2-3e1b9fad10df/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>22382f81-70cb-470d-8ab2-3e1b9fad10df</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>generic-vnf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/model-elements/model-element/1d73a0dc-e7f6-4b6d-9450-5dda720d1a7f/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>1d73a0dc-e7f6-4b6d-9450-5dda720d1a7f</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/model-elements/model-element/a1b205ea-17bb-442b-83a3-38b4e0fcb099/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>a1b205ea-17bb-442b-83a3-38b4e0fcb099</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>vMME-resource-id</model-name-version-id> + <model-type>resource</model-type> + <model-name>vMME</model-name> + <model-id>vMME-model-id</model-id> + <model-version>v1.0</model-version> + <resource-version>1466624623</resource-version> + <model-elements> + <model-element> + <model-element-uuid>af4b6df2-65d0-4d10-b25e-02206799e1fa</model-element-uuid> + <new-data-del-flag>true</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466624623</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/generic-vnf-widget-id/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>generic-vnf-widget-id</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>generic-vnf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + </model> + <model> + <model-name-version-id>fa01ef50-bbb5-49d4-91d1-ebbda9816e01</model-name-version-id> + <model-type>widget</model-type> + <model-name>logical-link</model-name> + <model-id>8742d5b3-ee98-4165-8bd5-fc012a7885b9</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698737</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161/model-elements/model-element/c44dbdf9-494e-49c1-b462-74e24e837b22/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>c44dbdf9-494e-49c1-b462-74e24e837b22</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/682ae094-0aaa-4381-a55d-bc633c40e4c0/model-elements/model-element/9ce59457-81b7-4f0e-8b72-a044a1be4bdf/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>682ae094-0aaa-4381-a55d-bc633c40e4c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>9ce59457-81b7-4f0e-8b72-a044a1be4bdf</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/named-query-elements/named-query-element/920399b7-21c1-4e81-8fb9-a3b2283a72ba/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>920399b7-21c1-4e81-8fb9-a3b2283a72ba</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/named-query-elements/named-query-element/dc38d8ae-0993-4426-af79-a7aff4a4b4f3/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc38d8ae-0993-4426-af79-a7aff4a4b4f3</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>0a706320-b8e7-4b18-9485-fba156ea00cf</model-name-version-id> + <model-type>widget</model-type> + <model-name>l-interface</model-name> + <model-id>d9131b0d-698f-4297-8699-af0a3ac7ebdc</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698767</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/model-elements/model-element/76624fe1-0f28-4e17-ae9f-f0e2bba6d13d/model-elements/model-element/b7b48ba6-427b-4d23-ada7-a67ac9e0f84f/model-elements/model-element/ebc25508-b2e3-4021-b684-269cfd2b63c0/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>b7b48ba6-427b-4d23-ada7-a67ac9e0f84f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>ebc25508-b2e3-4021-b684-269cfd2b63c0</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/be890aae-cf27-4b6a-aeae-e6fa4b5ee17f/named-query-elements/named-query-element/1ac142fb-2caf-4f59-975e-8ad7631c301e/named-query-elements/named-query-element/311f1cad-b41c-4833-8b9f-0d54d85f9009/named-query-elements/named-query-element/dc38d8ae-0993-4426-af79-a7aff4a4b4f3/named-query-elements/named-query-element/29ac58b9-37fa-4d6a-9d2e-29f33e1e3b7a/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>be890aae-cf27-4b6a-aeae-e6fa4b5ee17f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>1ac142fb-2caf-4f59-975e-8ad7631c301e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>311f1cad-b41c-4833-8b9f-0d54d85f9009</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc38d8ae-0993-4426-af79-a7aff4a4b4f3</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>29ac58b9-37fa-4d6a-9d2e-29f33e1e3b7a</relationship-value> + </relationship-data> + </relationship> + <relationship> + <related-to>named-query-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/named-queries/named-query/55f38763-9820-4fce-82a1-e0fa3c38ed24/named-query-elements/named-query-element/dc799ed9-45a5-4323-a2dc-bd1ec3242499/named-query-elements/named-query-element/97ae5271-9ad9-4815-804d-89af014d5b07/named-query-elements/named-query-element/7d189446-54de-49db-b786-8e946f0aece5/named-query-elements/named-query-element/920399b7-21c1-4e81-8fb9-a3b2283a72ba/named-query-elements/named-query-element/eda1554f-3eff-4195-9185-bcbc4f75826f/</related-link> + <relationship-data> + <relationship-key>named-query.named-query-uuid</relationship-key> + <relationship-value>55f38763-9820-4fce-82a1-e0fa3c38ed24</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>dc799ed9-45a5-4323-a2dc-bd1ec3242499</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>97ae5271-9ad9-4815-804d-89af014d5b07</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>7d189446-54de-49db-b786-8e946f0aece5</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>920399b7-21c1-4e81-8fb9-a3b2283a72ba</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>named-query-element.named-query-element-uuid</relationship-key> + <relationship-value>eda1554f-3eff-4195-9185-bcbc4f75826f</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>49032ff1-5466-4054-b64b-15395ac10c00</model-name-version-id> + <model-type>widget</model-type> + <model-name>vlan</model-name> + <model-id>2febb0bc-b776-45b3-af50-75a578a8a4c4</model-id> + <model-version>v1.0</model-version> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/model-elements/model-element/76624fe1-0f28-4e17-ae9f-f0e2bba6d13d/model-elements/model-element/b7b48ba6-427b-4d23-ada7-a67ac9e0f84f/model-elements/model-element/ebc25508-b2e3-4021-b684-269cfd2b63c0/model-elements/model-element/f610d699-11af-4c13-a918-a89344e4a1bd/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>76624fe1-0f28-4e17-ae9f-f0e2bba6d13d</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>b7b48ba6-427b-4d23-ada7-a67ac9e0f84f</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>ebc25508-b2e3-4021-b684-269cfd2b63c0</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>f610d699-11af-4c13-a918-a89344e4a1bd</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> + <model> + <model-name-version-id>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</model-name-version-id> + <model-type>resource</model-type> + <model-name>VL ELAN</model-name> + <model-id>932518e5-4260-4cc4-8038-df604a367f85</model-id> + <model-version>1</model-version> + <model-description>An l2-bridge used by a wan connector connects an ipe to a SBG or DBE</model-description> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>c44dbdf9-494e-49c1-b462-74e24e837b22</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>a1b205ea-17bb-442b-83a3-38b4e0fcb099</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/0d23052d-8ffe-433e-a25d-da5da027bb7c/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>0d23052d-8ffe-433e-a25d-da5da027bb7c</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>vDbe</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/fa01ef50-bbb5-49d4-91d1-ebbda9816e01/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>fa01ef50-bbb5-49d4-91d1-ebbda9816e01</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>logical-link</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/model-elements/model-element/200de3d5-c207-47c2-a507-8846ba1d7068/model-elements/model-element/7ccfe6b5-6566-4b44-83d3-b79f5de7a87b/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>200de3d5-c207-47c2-a507-8846ba1d7068</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>7ccfe6b5-6566-4b44-83d3-b79f5de7a87b</relationship-value> + </relationship-data> + </relationship> + </relationship-list> + </model> +</models>
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/connector-widget-id-no-children-1.xml b/src/test/resources/model-validation/model-reader/connector-widget-id-no-children-1.xml new file mode 100644 index 0000000..e60416c --- /dev/null +++ b/src/test/resources/model-validation/model-reader/connector-widget-id-no-children-1.xml @@ -0,0 +1,51 @@ +<!-- +============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===================================================== +--> +<model> + <model-name-version-id>connector-widget-id</model-name-version-id> + <model-type>widget</model-type> + <model-name>connector</model-name> + <model-id>connector-model-id</model-id> + <model-version>v1.0</model-version> + <resource-version>1466417894</resource-version> + <metadata> + <metadatum> + <metaname>vpn-id</metaname> + <metaval>a</metaval> + <resource-version>1466417844</resource-version> + </metadatum> + <metadatum> + <metaname>product</metaname> + <metaval>b</metaval> + <resource-version>1466417844</resource-version> + </metadatum> + </metadata> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.onap.org:8443/aai/v7/service-design-and-creation/model-elements/model-element/54629607-160a-4dcf-8c5c-15b8a3756f9a/</related-link> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>54629607-160a-4dcf-8c5c-15b8a3756f9a</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>wan-connector-service-id</relationship-value> + </relationship-data> + </relationship> + </relationship-list> +</model>
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/connector-widget-id-no-children-2.xml b/src/test/resources/model-validation/model-reader/connector-widget-id-no-children-2.xml new file mode 100644 index 0000000..924ce67 --- /dev/null +++ b/src/test/resources/model-validation/model-reader/connector-widget-id-no-children-2.xml @@ -0,0 +1,79 @@ +<!-- +============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===================================================== +--> +<model> + <model-name-version-id>connector-widget-id</model-name-version-id> + <model-type>widget</model-type> + <model-name>connector</model-name> + <model-id>connector-model-id</model-id> + <model-version>v1.0</model-version> + <resource-version>1466417894</resource-version> + <model-elements> + <model-element> + <model-element-uuid>8c0fd413-0d2b-491b-ad14-10c434c359bb</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466417894</resource-version> + <model-constraints/> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.onap.org:8443/aai/v7/service-design-and-creation/models/model/virtual-data-center-widget-id/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>virtual-data-center-widget-id</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>virtual-data-center</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <metadata> + <metadatum> + <metaname>vpn-id</metaname> + <metaval>a</metaval> + <resource-version>1466417844</resource-version> + </metadatum> + <metadatum> + <metaname>product</metaname> + <metaval>b</metaval> + <resource-version>1466417844</resource-version> + </metadatum> + </metadata> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.onap.org:8443/aai/v7/service-design-and-creation/model-elements/model-element/54629607-160a-4dcf-8c5c-15b8a3756f9a/</related-link> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>54629607-160a-4dcf-8c5c-15b8a3756f9a</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>wan-connector-service-id</relationship-value> + </relationship-data> + </relationship> + </relationship-list> +</model>
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/connector-widget-id.xml b/src/test/resources/model-validation/model-reader/connector-widget-id.xml new file mode 100644 index 0000000..bd2edfc --- /dev/null +++ b/src/test/resources/model-validation/model-reader/connector-widget-id.xml @@ -0,0 +1,107 @@ +<!-- +============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===================================================== +--> +<model> + <model-name-version-id>connector-widget-id</model-name-version-id> + <model-type>widget</model-type> + <model-name>connector</model-name> + <model-id>connector-model-id</model-id> + <model-version>v1.0</model-version> + <resource-version>1466417894</resource-version> + <model-elements> + <model-element> + <model-element-uuid>8c0fd413-0d2b-491b-ad14-10c434c359bb</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466417894</resource-version> + <model-elements> + <model-element> + <model-element-uuid>6d2dbb11-d509-4e03-8ed9-05bf4aad99d2</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466417894</resource-version> + <model-constraints/> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.onap.org:8443/aai/v7/service-design-and-creation/models/model/l2-bridge-for-wan-connector-resource-id/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>l2-bridge-for-wan-connector</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <model-constraints/> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.onap.org:8443/aai/v7/service-design-and-creation/models/model/virtual-data-center-widget-id/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>virtual-data-center-widget-id</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>virtual-data-center</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <metadata> + <metadatum> + <metaname>vpn-id</metaname> + <metaval>a</metaval> + <resource-version>1466417844</resource-version> + </metadatum> + <metadatum> + <metaname>product</metaname> + <metaval>b</metaval> + <resource-version>1466417844</resource-version> + </metadatum> + </metadata> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.onap.org:8443/aai/v7/service-design-and-creation/model-elements/model-element/54629607-160a-4dcf-8c5c-15b8a3756f9a/</related-link> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>54629607-160a-4dcf-8c5c-15b8a3756f9a</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>wan-connector-service-id</relationship-value> + </relationship-data> + </relationship> + </relationship-list> +</model>
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/logical-link-widget-id.xml b/src/test/resources/model-validation/model-reader/logical-link-widget-id.xml new file mode 100644 index 0000000..39c08a3 --- /dev/null +++ b/src/test/resources/model-validation/model-reader/logical-link-widget-id.xml @@ -0,0 +1,181 @@ +<!-- +============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===================================================== +--> +<model> + <model-name-version-id>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</model-name-version-id> + <model-type>resource</model-type> + <model-name>VL ELAN</model-name> + <model-id>932518e5-4260-4cc4-8038-df604a367f85</model-id> + <model-version>1</model-version> + <model-description>An l2-bridge used by a wan connector connects an ipe to a SBG or DBE</model-description> + <resource-version>1466698622</resource-version> + <model-elements> + <model-element> + <model-element-uuid>c44dbdf9-494e-49c1-b462-74e24e837b22</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <model-elements> + <model-element> + <model-element-uuid>ad161a89-ef32-4b2c-b86d-7fbb7a251571</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/6614ffae-6e64-4c78-9dea-4d5c0f057ea2/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>6614ffae-6e64-4c78-9dea-4d5c0f057ea2</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>pBgf</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + <model-element> + <model-element-uuid>a1b205ea-17bb-442b-83a3-38b4e0fcb099</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/0d23052d-8ffe-433e-a25d-da5da027bb7c/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>0d23052d-8ffe-433e-a25d-da5da027bb7c</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>vDbe</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + <model-element> + <model-element-uuid>193ec825-44ce-4416-85ac-20a6b6663575</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points> + <linkage-point>pserver|lag-interface|l-interface</linkage-point> + <linkage-point>pserver|p-interface|l-interface</linkage-point> + <linkage-point>vlan|l-interface</linkage-point> + </linkage-points> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/5ed1c299-4d31-4531-ae43-4bb56f8f10c8/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>5ed1c299-4d31-4531-ae43-4bb56f8f10c8</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>ipe</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + <model-element> + <model-element-uuid>059db56c-6d72-4023-9fc3-0db29534ddff</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466698621</resource-version> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/43095b8a-8e9c-4a76-8490-6120140f6804/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>43095b8a-8e9c-4a76-8490-6120140f6804</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>vSbg</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/fa01ef50-bbb5-49d4-91d1-ebbda9816e01/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>fa01ef50-bbb5-49d4-91d1-ebbda9816e01</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>logical-link</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>widget</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.test.onap.org:8443/aai/v7/service-design-and-creation/models/model/668464da-6d41-4599-bdbb-2576147b440e/model-elements/model-element/93a37846-b497-490e-bc97-7d130022d6db/model-elements/model-element/200de3d5-c207-47c2-a507-8846ba1d7068/model-elements/model-element/7ccfe6b5-6566-4b44-83d3-b79f5de7a87b/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>668464da-6d41-4599-bdbb-2576147b440e</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>93a37846-b497-490e-bc97-7d130022d6db</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>200de3d5-c207-47c2-a507-8846ba1d7068</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>7ccfe6b5-6566-4b44-83d3-b79f5de7a87b</relationship-value> + </relationship-data> + </relationship> + </relationship-list> +</model>
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/model-instance-mapping-attributes-1.json b/src/test/resources/model-validation/model-reader/model-instance-mapping-attributes-1.json new file mode 100644 index 0000000..916f898 --- /dev/null +++ b/src/test/resources/model-validation/model-reader/model-instance-mapping-attributes-1.json @@ -0,0 +1,11 @@ +[ + { + "mappingType": "ATTRIBUTE", + "model": { + "value": "metadata/metadatum/metaname" + }, + "instance": { + "value": "$..metadata.metadatum[*].metaname" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/model-instance-mapping-attributes-2.json b/src/test/resources/model-validation/model-reader/model-instance-mapping-attributes-2.json new file mode 100644 index 0000000..7bd8829 --- /dev/null +++ b/src/test/resources/model-validation/model-reader/model-instance-mapping-attributes-2.json @@ -0,0 +1,11 @@ +[ + { + "mappingType": "ATTRIBUTE", + "model": { + "value": "unkown" + }, + "instance": { + "value": "$..metadata.metadatum[*].metaname" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-1.json b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-1.json new file mode 100644 index 0000000..4d550f0 --- /dev/null +++ b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-1.json @@ -0,0 +1,18 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "id": "relationship-list/relationship/relationship-data/relationship-value[../relationship-key/text()='model.model-name-version-id']", + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']", + "filter": { + "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']", + "valid": ["INVALID_TYPE"] + } + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-2.json b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-2.json new file mode 100644 index 0000000..2c9799e --- /dev/null +++ b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-2.json @@ -0,0 +1,18 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "id": "relationship-list/relationship/relationship-data/relationship-value[../relationship-key/text()='model.model-name-version-id']", + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']", + "filter": { + "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']", + "valid": [] + } + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-3.json b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-3.json new file mode 100644 index 0000000..6442d7b --- /dev/null +++ b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-3.json @@ -0,0 +1,17 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "id": "relationship-list/relationship/relationship-data/relationship-value[../relationship-key/text()='model.model-name-version-id']", + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']", + "filter": { + "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']" + } + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-4.json b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-4.json new file mode 100644 index 0000000..4f50042 --- /dev/null +++ b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-4.json @@ -0,0 +1,18 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "id": "relationship-list/relationship/relationship-data/relationship-value[../relationship-key/text()='model.model-name-version-id']", + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']", + "filter": { + "path": "INVALID_PATH", + "valid": ["widget"] + } + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-5.json b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-5.json new file mode 100644 index 0000000..8085cfd --- /dev/null +++ b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-5.json @@ -0,0 +1,17 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "id": "relationship-list/relationship/relationship-data/relationship-value[../relationship-key/text()='model.model-name-version-id']", + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']", + "filter": { + "valid": ["widget"] + } + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-6.json b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-6.json new file mode 100644 index 0000000..67be561 --- /dev/null +++ b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-6.json @@ -0,0 +1,14 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "id": "relationship-list/relationship/relationship-data/relationship-value[../relationship-key/text()='model.model-name-version-id']", + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']" + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-root-1.json b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-root-1.json new file mode 100644 index 0000000..de11bb2 --- /dev/null +++ b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-root-1.json @@ -0,0 +1,18 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "root": "INVALID_ROOT", + "id": "relationship-list/relationship/relationship-data/relationship-value[../relationship-key/text()='model.model-name-version-id']", + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']", + "filter": { + "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']", + "valid": ["widget"] + } + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-root-2.json b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-root-2.json new file mode 100644 index 0000000..7bc88ae --- /dev/null +++ b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-root-2.json @@ -0,0 +1,17 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "id": "relationship-list/relationship/relationship-data/relationship-value[../relationship-key/text()='model.model-name-version-id']", + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']", + "filter": { + "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']", + "valid": ["widget"] + } + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-with-id.json b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-with-id.json new file mode 100644 index 0000000..2c9799e --- /dev/null +++ b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-with-id.json @@ -0,0 +1,18 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "id": "relationship-list/relationship/relationship-data/relationship-value[../relationship-key/text()='model.model-name-version-id']", + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']", + "filter": { + "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']", + "valid": [] + } + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships.json b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships.json new file mode 100644 index 0000000..89bcae9 --- /dev/null +++ b/src/test/resources/model-validation/model-reader/model-instance-mapping-relationships.json @@ -0,0 +1,18 @@ +[ + { + "mappingType": "RELATIONSHIP", + "model": { + "root": "model-elements/model-element", + "id": "relationship-list/relationship/relationship-data/relationship-value[../relationship-key/text()='model.model-name-version-id']", + "value": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-name']", + "filter": { + "path": "relationship-list/relationship/related-to-property/property-value[../property-key/text()='model.model-type']", + "valid": ["widget"] + } + }, + "instance": { + "origin": "$.inventory-response-item[0]", + "root": "$.inventory-response-items.inventory-response-item[*]" + } + } +]
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/test-validation-service-beans.xml b/src/test/resources/model-validation/model-reader/test-validation-service-beans.xml new file mode 100644 index 0000000..81dab3e --- /dev/null +++ b/src/test/resources/model-validation/model-reader/test-validation-service-beans.xml @@ -0,0 +1,52 @@ +<?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: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.xsd"> + + <context:property-placeholder location="classpath:model-validation/model-reader/aai-environment.properties" ignore-unresolvable="true" /> + <context:property-placeholder location="classpath:model-validation/model-reader/validation-service.properties" ignore-unresolvable="true" /> + + <bean id="modelConfig" class="org.onap.aai.validation.config.ModelConfig"> + <property name="modelCacheExpirySeconds" value="${model.cache.expirySeconds}" /> + </bean> + + <bean id="restConfig" class="org.onap.aai.validation.config.RestConfig"> + <property name="host" value="${host}" /> + <property name="port" value="${port}" /> + <property name="protocol" value="${httpProtocol}" /> + <property name="baseModelURI" value="${baseModelURI}" /> + <property name="trustStorePath" value="${trustStorePath}" /> + <property name="trustStorePassword" value="${trustStorePassword.x}" /> + <property name="keyStorePath" value="${keyStorePath}" /> + <property name="keyStorePassword" value="${keyStorePassword.x}" /> + <property name="keyManagerFactoryAlgorithm" value="${keyManagerFactoryAlgorithm}" /> + <property name="keyStoreType" value="${keyStoreType}" /> + <property name="securityProtocol" value="${securityProtocol}" /> + <property name="connectionTimeout" value="${connectionTimeout}" /> + <property name="readTimeout" value="${readTimeout}" /> + </bean> + + <bean id="modelCacheManager" class="org.onap.aai.validation.modeldriven.ModelCacheManager"> + <constructor-arg ref="modelConfig" /> + <constructor-arg ref="restConfig" /> + </bean> + +</beans>
\ No newline at end of file diff --git a/src/test/resources/model-validation/model-reader/validation-service.properties b/src/test/resources/model-validation/model-reader/validation-service.properties new file mode 100644 index 0000000..4e1b264 --- /dev/null +++ b/src/test/resources/model-validation/model-reader/validation-service.properties @@ -0,0 +1,29 @@ +# ============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===================================================== + +topic.publish.enable=true +topic.publish.retries=3 +topic.consume.enable=true +topic.consume.polling.interval.seconds=3 + +event.domain=devINT1 +event.action.exclude=DELETE +event.type.rule=AAI-EVENT,AAI-DATA-EXPORT-API,GIZMO-EVENT +event.type.model=AAI-DATA-EXPORT-NQ +event.type.end=END-EVENT + +model.cache.expirySeconds=3 +aai.oxm.version=12 diff --git a/src/test/resources/model-validation/model-reader/virtual-data-center-widget-id.xml b/src/test/resources/model-validation/model-reader/virtual-data-center-widget-id.xml new file mode 100644 index 0000000..aadee37 --- /dev/null +++ b/src/test/resources/model-validation/model-reader/virtual-data-center-widget-id.xml @@ -0,0 +1,72 @@ +<!-- +============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===================================================== +--> +<model> + <model-name-version-id>virtual-data-center-widget-id</model-name-version-id> + <model-type>widget</model-type> + <model-name>virtual-data-center</model-name> + <model-id>vdc-model-id</model-id> + <model-version>v1.0</model-version> + <resource-version>1466417894</resource-version> + <model-elements> + <model-element> + <model-element-uuid>6d2dbb11-d509-4e03-8ed9-05bf4aad99d2</model-element-uuid> + <new-data-del-flag>T</new-data-del-flag> + <cardinality>unbounded</cardinality> + <linkage-points/> + <resource-version>1466417894</resource-version> + <model-constraints/> + <relationship-list> + <relationship> + <related-to>model</related-to> + <related-link>https://dummy-host.onap.org:8443/aai/v7/service-design-and-creation/models/model/l2-bridge-for-wan-connector-resource-id/</related-link> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>e2ccd5c5-bc6e-4ed0-8378-6805ee6ba161</relationship-value> + </relationship-data> + <related-to-property> + <property-key>model.model-name</property-key> + <property-value>l2-bridge-for-wan-connector</property-value> + </related-to-property> + <related-to-property> + <property-key>model.model-type</property-key> + <property-value>resource</property-value> + </related-to-property> + </relationship> + </relationship-list> + </model-element> + </model-elements> + <metadata/> + <relationship-list> + <relationship> + <related-to>model-element</related-to> + <related-link>https://dummy-host.onap.org:8443/aai/v7/service-design-and-creation/model-elements/model-element/8c0fd413-0d2b-491b-ad14-10c434c359bb/</related-link> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>8c0fd413-0d2b-491b-ad14-10c434c359bb</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model-element.model-element-uuid</relationship-key> + <relationship-value>54629607-160a-4dcf-8c5c-15b8a3756f9a</relationship-value> + </relationship-data> + <relationship-data> + <relationship-key>model.model-name-version-id</relationship-key> + <relationship-value>wan-connector-service-id</relationship-value> + </relationship-data> + </relationship> + </relationship-list> +</model>
\ No newline at end of file diff --git a/src/test/resources/oxm-reader/multiple/test_business_v10.xml b/src/test/resources/oxm-reader/multiple/test_business_v10.xml new file mode 100644 index 0000000..f0dc93f --- /dev/null +++ b/src/test/resources/oxm-reader/multiple/test_business_v10.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- +============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===================================================== +--> +<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.business.v12" xml-mapping-metadata-complete="true"> + <xml-schema element-form-default="QUALIFIED"> + <xml-ns namespace-uri="http://org.onap.aai.inventory/v12" /> + </xml-schema> + <java-types> + + <java-type name="Bar"> + <xml-root-element name="bar" /> + <java-attributes> + <xml-element java-attribute="barId" name="bar-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of Bar This is unique across the graph." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="quantity" name="quantity" required="false" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="How many." /> + </xml-properties> + </xml-element> + + </java-attributes> + <xml-properties> + <xml-property name="description" value="General purpose metasyntactic variable" /> + <xml-property name="uniqueProps" value="bar-id" /> + </xml-properties> + </java-type> + + </java-types> +</xml-bindings>
\ No newline at end of file diff --git a/src/test/resources/oxm-reader/multiple/test_business_v13.xml b/src/test/resources/oxm-reader/multiple/test_business_v13.xml new file mode 100644 index 0000000..2529c6d --- /dev/null +++ b/src/test/resources/oxm-reader/multiple/test_business_v13.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- +============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===================================================== +--> +<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.business.v13" xml-mapping-metadata-complete="true"> + <xml-schema element-form-default="QUALIFIED"> + <xml-ns namespace-uri="http://org.onap.aai.inventory/v13" /> + </xml-schema> + <java-types> + + <java-type name="Bar"> + <xml-root-element name="bar" /> + <java-attributes> + <xml-element java-attribute="barId" name="bar-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of Bar This is unique across the graph." /> + </xml-properties> + </xml-element> + + </java-attributes> + <xml-properties> + <xml-property name="description" value="General purpose metasyntactic variable" /> + <xml-property name="uniqueProps" value="bar-id" /> + </xml-properties> + </java-type> + + </java-types> +</xml-bindings>
\ No newline at end of file diff --git a/src/test/resources/oxm-reader/multiple/test_network_v10.xml b/src/test/resources/oxm-reader/multiple/test_network_v10.xml new file mode 100644 index 0000000..9767de6 --- /dev/null +++ b/src/test/resources/oxm-reader/multiple/test_network_v10.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- +============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===================================================== +--> +<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.network.v10" xml-mapping-metadata-complete="true"> + <xml-schema element-form-default="QUALIFIED"> + <xml-ns namespace-uri="http://org.onap.aai.inventory/v12" /> + </xml-schema> + <java-types> + + <java-type name="Foo"> + <xml-root-element name="foo" /> + <java-attributes> + <xml-element java-attribute="fooId" name="foo-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of Foo. This is unique across the graph." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="fooName" name="foo-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of Foo." /> + </xml-properties> + </xml-element> + + </java-attributes> + <xml-properties> + <xml-property name="description" value="General purpose metasyntactic variable" /> + <xml-property name="nameProps" value="foo-name" /> + <xml-property name="uniqueProps" value="foo-id" /> + </xml-properties> + </java-type> + + </java-types> +</xml-bindings>
\ No newline at end of file diff --git a/src/test/resources/oxm-reader/multiple/test_network_v13.xml b/src/test/resources/oxm-reader/multiple/test_network_v13.xml new file mode 100644 index 0000000..892f626 --- /dev/null +++ b/src/test/resources/oxm-reader/multiple/test_network_v13.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- +============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===================================================== +--> +<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.network.v13" xml-mapping-metadata-complete="true"> + <xml-schema element-form-default="QUALIFIED"> + <xml-ns namespace-uri="http://org.onap.aai.inventory/v13" /> + </xml-schema> + <java-types> + + <java-type name="Foo"> + <xml-root-element name="foo" /> + <java-attributes> + <xml-element java-attribute="fooId" name="foo-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of Foo. This is unique across the graph." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="fooName" name="foo-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of Foo." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="quantity" name="quantity" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="How many." /> + </xml-properties> + </xml-element> + + </java-attributes> + <xml-properties> + <xml-property name="description" value="General purpose metasyntactic variable" /> + <xml-property name="nameProps" value="foo-name" /> + <xml-property name="uniqueProps" value="foo-id" /> + </xml-properties> + </java-type> + + <java-type name="Quux"> + <xml-root-element name="quux" /> + <java-attributes> + <xml-element java-attribute="qManagerName" name="q-manager-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of Quux owner. This is unique across the graph." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="color" name="color" required="false" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="color" /> + </xml-properties> + </xml-element> + + </java-attributes> + <xml-properties> + <xml-property name="description" value="General purpose metasyntactic variable" /> + </xml-properties> + </java-type> + + </java-types> +</xml-bindings>
\ No newline at end of file diff --git a/src/test/resources/oxm-reader/oxm-reader-beans.xml b/src/test/resources/oxm-reader/oxm-reader-beans.xml new file mode 100644 index 0000000..c9f064a --- /dev/null +++ b/src/test/resources/oxm-reader/oxm-reader-beans.xml @@ -0,0 +1,40 @@ +<?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: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.xsd"> + + <bean id="schemaLocationsBean" class="org.onap.aai.setup.SchemaLocationsBean" /> + + <bean id="configTranslator" class="org.onap.aai.validation.reader.OxmConfigTranslator"> + <constructor-arg ref="schemaLocationsBean" /> + </bean> + + <bean id="nodeIngestor" class="org.onap.aai.nodes.NodeIngestor"> + <constructor-arg ref="configTranslator" /> + </bean> + + <bean id="oxmReader" class="org.onap.aai.validation.reader.OxmReader" init-method="init"> + <constructor-arg ref="nodeIngestor" /> + <constructor-arg value="V9" /> + </bean> + +</beans> diff --git a/src/test/resources/oxm-reader/schemaIngest.properties b/src/test/resources/oxm-reader/schemaIngest.properties new file mode 100644 index 0000000..bb1027e --- /dev/null +++ b/src/test/resources/oxm-reader/schemaIngest.properties @@ -0,0 +1,20 @@ +# ============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===================================================== + +# Test properties for the org.onap.aai.setup.SchemaLocationsBean +schemaConfig=NA +nodeDir=src/test/resources/oxm-reader/single/ +edgeDir=src/test/resources/oxm-reader/single/
\ No newline at end of file diff --git a/src/test/resources/oxm-reader/single/aai_oxm_v0.xml b/src/test/resources/oxm-reader/single/aai_oxm_v0.xml new file mode 100644 index 0000000..ffab598 --- /dev/null +++ b/src/test/resources/oxm-reader/single/aai_oxm_v0.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- +============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===================================================== +--> +<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v9" xml-mapping-metadata-complete="true"> + <xml-schema element-form-default="QUALIFIED"> + <xml-ns namespace-uri="http://org.openecomp.aai.inventory/v9" /> + </xml-schema> +</xml-bindings>
\ No newline at end of file diff --git a/src/test/resources/oxm-reader/single/aai_oxm_v10.xml b/src/test/resources/oxm-reader/single/aai_oxm_v10.xml new file mode 100644 index 0000000..b4c880a --- /dev/null +++ b/src/test/resources/oxm-reader/single/aai_oxm_v10.xml @@ -0,0 +1,6569 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- +============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===================================================== +--> +<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v10" xml-mapping-metadata-complete="true"> + <xml-schema element-form-default="QUALIFIED"> + <xml-ns namespace-uri="http://org.openecomp.aai.inventory/v10" /> + </xml-schema> + <java-types> + <java-type name="Inventory"> + <xml-root-element name="inventory" /> + <java-attributes> + <xml-element java-attribute="search" name="search" type="inventory.aai.onap.org.v10.Search" /> + <xml-element java-attribute="actions" name="actions" type="inventory.aai.onap.org.v10.Actions" /> + <xml-element java-attribute="cloudInfrastructure" name="cloud-infrastructure" type="inventory.aai.onap.org.v10.CloudInfrastructure" /> + <xml-element java-attribute="licenseManagement" name="license-management" type="inventory.aai.onap.org.v10.LicenseManagement" /> + <xml-element java-attribute="business" name="business" type="inventory.aai.onap.org.v10.Business" /> + <xml-element java-attribute="serviceDesignAndCreation" name="service-design-and-creation" type="inventory.aai.onap.org.v10.ServiceDesignAndCreation" /> + <xml-element java-attribute="network" name="network" type="inventory.aai.onap.org.v10.Network" /> + <xml-element java-attribute="aaiInternal" name="aai-internal" type="inventory.aai.onap.org.v10.AaiInternal" /> + <xml-element java-attribute="nodes" name="nodes" type="inventory.aai.onap.org.v10.Nodes" /> + </java-attributes> + </java-type> + <java-type name="Nodes"> + <xml-root-element name="nodes" /> + </java-type> + <java-type name="Search"> + <xml-root-element name="search" /> + <java-attributes> + <xml-element java-attribute="edgeTagQueryResult" name="edge-tag-query-result" type="inventory.aai.onap.org.v10.EdgeTagQueryResult" /> + <xml-element java-attribute="edgeTagQueryRequest" name="edge-tag-query-request" type="inventory.aai.onap.org.v10.EdgeTagQueryRequest" /> + <xml-element java-attribute="searchResults" name="search-results" type="inventory.aai.onap.org.v10.SearchResults" /> + <xml-element java-attribute="sdnZoneResponse" name="sdn-zone-response" type="inventory.aai.onap.org.v10.SdnZoneResponse" /> + </java-attributes> + </java-type> + <java-type name="EdgeTagQueryResult"> + <xml-root-element name="edge-tag-query-result" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="taggedInventoryItemList" name="tagged-inventory-item-list" type="inventory.aai.onap.org.v10.TaggedInventoryItemList" /> + </java-attributes> + </java-type> + <java-type name="TaggedInventoryItemList"> + <xml-root-element name="tagged-inventory-item-list" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="inventoryItem" name="inventory-item" type="inventory.aai.onap.org.v10.InventoryItem" /> + </java-attributes> + </java-type> + <java-type name="InventoryItem"> + <xml-root-element name="inventory-item" /> + <java-attributes> + <xml-element java-attribute="inventoryItemType" name="inventory-item-type" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="inventoryItemLink" name="inventory-item-link" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="inventoryItemData" name="inventory-item-data" type="inventory.aai.onap.org.v10.InventoryItemData" /> + <xml-element container-type="java.util.ArrayList" java-attribute="taggedInventoryItemList" name="tagged-inventory-item-list" type="inventory.aai.onap.org.v10.TaggedInventoryItemList" /> + </java-attributes> + </java-type> + <java-type name="InventoryItemData"> + <xml-root-element name="inventory-item-data" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="EdgeTagQueryRequest"> + <xml-root-element name="edge-tag-query-request" /> + <java-attributes> + <xml-element java-attribute="edgeTag" name="edge-tag" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resultDetail" name="result-detail" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="startNodeType" name="start-node-type" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="startNodeFilter" name="start-node-filter" type="inventory.aai.onap.org.v10.StartNodeFilter" /> + <xml-element container-type="java.util.ArrayList" java-attribute="includeNodeFilter" name="include-node-filter" type="inventory.aai.onap.org.v10.IncludeNodeFilter" /> + <xml-element container-type="java.util.ArrayList" java-attribute="secondaryFilter" name="secondary-filter" type="inventory.aai.onap.org.v10.SecondaryFilter" /> + </java-attributes> + </java-type> + <java-type name="StartNodeFilter"> + <xml-root-element name="start-node-filter" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="IncludeNodeFilter"> + <xml-root-element name="include-node-filter" /> + <java-attributes> + <xml-element java-attribute="includeNodeType" name="include-node-type" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="SecondaryFilter"> + <xml-root-element name="secondary-filter" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="filterType" name="filter-type" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="SearchResults"> + <xml-root-element name="search-results" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="resultData" name="result-data" type="inventory.aai.onap.org.v10.ResultData" /> + </java-attributes> + </java-type> + <java-type name="ResultData"> + <xml-root-element name="result-data" /> + <java-attributes> + <xml-element java-attribute="resourceType" name="resource-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The specific type of node in the A&AI graph" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceLink" name="resource-link" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The URL to the specific resource" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="SdnZoneResponse"> + <xml-root-element name="sdn-zone-response" /> + <java-attributes> + <xml-element java-attribute="oamNetworks" name="oam-networks" type="inventory.aai.onap.org.v10.OamNetworks" /> + <xml-element container-type="java.util.ArrayList" java-attribute="azAndDvsSwitches" name="az-and-dvs-switches" type="inventory.aai.onap.org.v10.AzAndDvsSwitches" /> + </java-attributes> + </java-type> + <java-type name="AzAndDvsSwitches"> + <xml-root-element name="az-and-dvs-switches" /> + <java-attributes> + <xml-element java-attribute="dvsSwitches" name="dvs-switches" type="inventory.aai.onap.org.v10.DvsSwitches" /> + <xml-element java-attribute="availabilityZone" name="availability-zone" type="inventory.aai.onap.org.v10.AvailabilityZone" /> + </java-attributes> + </java-type> + <java-type name="Actions"> + <xml-properties> + <xml-property name="description" value="APIs that are more action related than REST (e.g., notify, update)." /> + </xml-properties> + <xml-root-element name="actions" /> + <java-attributes> + <xml-element java-attribute="update" name="update" type="inventory.aai.onap.org.v10.Update" /> + <xml-element java-attribute="notify" name="notify" type="inventory.aai.onap.org.v10.Notify" /> + </java-attributes> + </java-type> + <java-type name="Update"> + <xml-properties> + <xml-property name="description" value="Serves a PATCH like function. Does not enforce concurrency control. Clear each usage with AAI team." /> + </xml-properties> + <xml-root-element name="update" /> + <java-attributes> + <xml-element java-attribute="updateNodeType" name="update-node-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="updateNodeKey" name="update-node-key" type="inventory.aai.onap.org.v10.UpdateNodeKey" /> + <xml-element java-attribute="updateNodeUri" name="update-node-uri" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="action" name="action" type="inventory.aai.onap.org.v10.Action" /> + </java-attributes> + </java-type> + <java-type name="Action"> + <xml-root-element name="action" /> + <java-attributes> + <xml-element java-attribute="actionType" name="action-type" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="actionData" name="action-data" type="inventory.aai.onap.org.v10.ActionData" /> + </java-attributes> + </java-type> + <java-type name="ActionData"> + <xml-root-element name="action-data" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="UpdateNodeKey"> + <xml-root-element name="update-node-key" /> + <java-attributes> + <xml-element java-attribute="keyName" name="key-name" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="keyValue" name="key-value" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="Notify"> + <xml-root-element name="notify" /> + <java-attributes> + <xml-element java-attribute="eventId" name="event-id" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="nodeType" name="node-type" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="eventTrigger" name="event-trigger" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="keyData" name="key-data" type="inventory.aai.onap.org.v10.KeyData" /> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="KeyData"> + <xml-root-element name="key-data" /> + <java-attributes> + <xml-element java-attribute="keyName" name="key-name" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="keyValue" name="key-value" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="CloudInfrastructure"> + <xml-properties> + <xml-property name="description" value="Namespace for cloud infrastructure." /> + </xml-properties> + <xml-root-element name="cloud-infrastructure" /> + <java-attributes> + <xml-element java-attribute="complexes" name="complexes" type="inventory.aai.onap.org.v10.Complexes" /> + <xml-element java-attribute="cloudRegions" name="cloud-regions" type="inventory.aai.onap.org.v10.CloudRegions" /> + <xml-element java-attribute="networkProfiles" name="network-profiles" type="inventory.aai.onap.org.v10.NetworkProfiles" /> + <xml-element java-attribute="pservers" name="pservers" type="inventory.aai.onap.org.v10.Pservers" /> + <xml-element java-attribute="virtualDataCenters" name="virtual-data-centers" type="inventory.aai.onap.org.v10.VirtualDataCenters" /> + </java-attributes> + </java-type> + <java-type name="CloudRegions"> + <xml-root-element name="cloud-regions" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="cloudRegion" name="cloud-region" type="inventory.aai.onap.org.v10.CloudRegion" /> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0" /> + </xml-properties> + </java-type> + <java-type name="CloudRegion"> + <xml-root-element name="cloud-region" /> + <java-attributes> + <xml-element java-attribute="cloudOwner" name="cloud-owner" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Identifies the vendor and cloud name, e.g., vendor-cloudname. First part of composite key should be formatted as vendor-cloudname" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudRegionId" name="cloud-region-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Identifier used by the vendor for the region. Second part of composite key" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudType" name="cloud-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the cloud (e.g., openstack)" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ownerDefinedType" name="owner-defined-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Cloud-owner defined type indicator (e.g., dcp, lcp)" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudRegionVersion" name="cloud-region-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Software version employed at the site. NOTE - THIS FIELD IS NOT KEPT UP TO DATE." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="identityUrl" name="identity-url" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL of the keystone identity service" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudZone" name="cloud-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Zone where the cloud is homed. NOTE - THIS FIELD IS NOT CORRECTLY POPULATED." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="complexName" name="complex-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="complex name for cloud-region instance. NOTE - THIS FIELD IS NOT CORRECTLY POPULATED." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumeGroups" name="volume-groups" type="inventory.aai.onap.org.v10.VolumeGroups" /> + <xml-element java-attribute="tenants" name="tenants" type="inventory.aai.onap.org.v10.Tenants" /> + <xml-element java-attribute="flavors" name="flavors" type="inventory.aai.onap.org.v10.Flavors" /> + <xml-element java-attribute="groupAssignments" name="group-assignments" type="inventory.aai.onap.org.v10.GroupAssignments" /> + <xml-element java-attribute="snapshots" name="snapshots" type="inventory.aai.onap.org.v10.Snapshots" /> + <xml-element java-attribute="images" name="images" type="inventory.aai.onap.org.v10.Images" /> + <xml-element java-attribute="dvsSwitches" name="dvs-switches" type="inventory.aai.onap.org.v10.DvsSwitches" /> + <xml-element java-attribute="oamNetworks" name="oam-networks" type="inventory.aai.onap.org.v10.OamNetworks" /> + <xml-element java-attribute="availabilityZones" name="availability-zones" type="inventory.aai.onap.org.v10.AvailabilityZones" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="cloud-region designates an installation of a cloud cluster or region or instantiation" /> + <xml-property name="indexedProps" value="cloud-owner,cloud-region-id,cloud-type,owner-defined-type" /> + <xml-property name="nameProps" value="owner-defined-type" /> + <xml-property name="container" value="cloud-regions" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + <java-type name="VolumeGroups"> + <xml-properties> + <xml-property name="description" value="Collection of persistent block-level storage." /> + </xml-properties> + <xml-root-element name="volume-groups" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="volumeGroup" name="volume-group" type="inventory.aai.onap.org.v10.VolumeGroup" /> + </java-attributes> + </java-type> + <java-type name="VolumeGroup"> + <xml-root-element name="volume-group" /> + <java-attributes> + <xml-element java-attribute="volumeGroupId" name="volume-group-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of volume-group." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumeGroupName" name="volume-group-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the volume group." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this volume-group" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded in service-specific ways and clients should expect changes to occur in the future to this field as ECOMP matures." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this volume-group" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="captures the id of all the configuration used to customize the resource for the service." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfModuleModelCustomizationId" name="vf-module-model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="helps relate the volume group to the vf-module whose components will require the volume group" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Persistent block-level storage." /> + <xml-property name="indexedProps" value="volume-group-name,vnf-type,heat-stack-id,volume-group-id" /> + <xml-property name="searchable" value="volume-group-id,volume-group-name" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="volume-groups" /> + </xml-properties> + </java-type> + <java-type name="RelationshipList"> + <xml-root-element name="relationship-list" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="relationship" name="relationship" type="inventory.aai.onap.org.v10.Relationship" /> + </java-attributes> + </java-type> + <java-type name="Relationship"> + <xml-root-element name="relationship" /> + <java-attributes> + <xml-element java-attribute="relatedTo" name="related-to" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="A keyword provided by A&AI to indicate type of node." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relatedLink" name="related-link" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to the object in A&AI." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="relationshipData" name="relationship-data" type="inventory.aai.onap.org.v10.RelationshipData" /> + <xml-element container-type="java.util.ArrayList" java-attribute="relatedToProperty" name="related-to-property" type="inventory.aai.onap.org.v10.RelatedToProperty" /> + </java-attributes> + </java-type> + <java-type name="RelatedToProperty"> + <xml-root-element name="related-to-property" /> + <java-attributes> + <xml-element java-attribute="propertyKey" name="property-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Key part of a key/value pair" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Value part of a key/value pair" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="RelationshipData"> + <xml-root-element name="relationship-data" /> + <java-attributes> + <xml-element java-attribute="relationshipKey" name="relationship-key" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="A keyword provided by A&AI to indicate an attribute." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipValue" name="relationship-value" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Value of the attribute." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="Complexes"> + <xml-properties> + <xml-property name="description" value="Collection of physical locations that can house cloud-regions." /> + </xml-properties> + <xml-root-element name="complexes" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="complex" name="complex" type="inventory.aai.onap.org.v10.Complex" /> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0" /> + </xml-properties> + </java-type> + <java-type name="Complex"> + <xml-root-element name="complex" /> + <java-attributes> + <xml-element java-attribute="physicalLocationId" name="physical-location-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier for physical location, e.g., CLLI" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataCenterCode" name="data-center-code" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Data center code which can be an alternate way to identify a complex" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="complexName" name="complex-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Gamma complex name for LCP instance." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="identityUrl" name="identity-url" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL of the keystone identity service" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="physicalLocationType" name="physical-location-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type, e.g., central office, data center." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="street1" name="street1" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="street2" name="street2" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="city" name="city" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="state" name="state" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="postalCode" name="postal-code" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="country" name="country" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="region" name="region" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="latitude" name="latitude" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="longitude" name="longitude" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="elevation" name="elevation" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="lata" name="lata" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ctagPools" name="ctag-pools" type="inventory.aai.onap.org.v10.CtagPools" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Collection of physical locations that can house cloud-regions." /> + <xml-property name="indexedProps" value="identity-url,data-center-code,complex-name,physical-location-id" /> + <xml-property name="searchable" value="physical-location-id,data-center-code,complex-name,street1,street2,postal-code" /> + <xml-property name="uniqueProps" value="physical-location-id" /> + <xml-property name="container" value="complexes" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + <java-type name="CtagPools"> + <xml-root-element name="ctag-pools" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="ctagPool" name="ctag-pool" type="inventory.aai.onap.org.v10.CtagPool" /> + </java-attributes> + </java-type> + <java-type name="CtagPool"> + <xml-root-element name="ctag-pool" /> + <java-attributes> + <xml-element java-attribute="targetPe" name="target-pe" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="The Target provider edge router" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="availabilityZoneName" name="availability-zone-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name of the availability zone" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ctagPoolPurpose" name="ctag-pool-purpose" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Describes what the intended purpose of this pool is." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ctagValues" name="ctag-values" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Comma separated list of ctags" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="A collection of C tags (vlan tags) grouped for a specific purpose." /> + <xml-property name="indexedProps" value="availability-zone-name" /> + <xml-property name="dependentOn" value="complex" /> + <xml-property name="container" value="ctag-pools" /> + </xml-properties> + </java-type> + <java-type name="Tenants"> + <xml-properties> + <xml-property name="description" value="Collection of openstack tenants." /> + </xml-properties> + <xml-root-element name="tenants" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="tenant" name="tenant" type="inventory.aai.onap.org.v10.Tenant" /> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0" /> + </xml-properties> + </java-type> + <java-type name="Tenant"> + <xml-root-element name="tenant" /> + <java-attributes> + <xml-element java-attribute="tenantId" name="tenant-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id relative to the cloud-region." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="tenantName" name="tenant-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Readable name of tenant" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vservers" name="vservers" type="inventory.aai.onap.org.v10.Vservers" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack tenant" /> + <xml-property name="nameProps" value="tenant-name" /> + <xml-property name="indexedProps" value="tenant-name,tenant-id" /> + <xml-property name="searchable" value="tenant-id,tenant-name" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="tenants" /> + </xml-properties> + </java-type> + <java-type name="Vservers"> + <xml-properties> + <xml-property name="description" value="Collection of virtual Servers, aka virtual machines or VMs." /> + </xml-properties> + <xml-root-element name="vservers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vserver" name="vserver" type="inventory.aai.onap.org.v10.Vserver" /> + </java-attributes> + </java-type> + <java-type name="Vserver"> + <xml-root-element name="vserver" /> + <java-attributes> + <xml-element java-attribute="vserverId" name="vserver-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier for this vserver relative to its tenant" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vserverName" name="vserver-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of vserver" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vserverName2" name="vserver-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternative name of vserver" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vserverSelflink" name="vserver-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="Used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="isClosedLoopDisabled" name="is-closed-loop-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="Used to indicate whether closed loop function is enabled on this node" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumes" name="volumes" type="inventory.aai.onap.org.v10.Volumes" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v10.LInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Virtual Servers, aka virtual machine or VM." /> + <xml-property name="nameProps" value="vserver-name" /> + <xml-property name="indexedProps" value="is-closed-loop-disabled,prov-status,vserver-name,vserver-id,in-maint,vserver-name2" /> + <xml-property name="searchable" value="vserver-id,vserver-name,vserver-name2" /> + <xml-property name="dependentOn" value="tenant" /> + <xml-property name="container" value="vservers" /> + </xml-properties> + </java-type> + <java-type name="LInterfaces"> + <xml-properties> + <xml-property name="description" value="Collection of logical interfaces." /> + </xml-properties> + <xml-root-element name="l-interfaces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lInterface" name="l-interface" type="inventory.aai.onap.org.v10.LInterface" /> + </java-attributes> + </java-type> + <java-type name="LInterface"> + <xml-root-element name="l-interface" /> + <java-attributes> + <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name given to the interface" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="E.g., CUSTOMER, UPLINK, etc." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="v6WanLinkIp" name="v6-wan-link-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Questionably placed - v6 ip addr of this interface (is in vr-lan-interface from Mary B." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceId" name="interface-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of interface" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="macaddr" name="macaddr" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="MAC address for the interface" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkName" name="network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the network" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Whether A&AI should be managing this interface of not. Could have value like CUSTOMER" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceDescription" name="interface-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Human friendly text regarding this interface." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isPortMirrored" name="is-port-mirrored" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="boolean indicatating whether or not port is a mirrored." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlans" name="vlans" type="inventory.aai.onap.org.v10.Vlans" /> + <xml-element java-attribute="sriovVfs" name="sriov-vfs" type="inventory.aai.onap.org.v10.SriovVfs" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v10.LInterfaces" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv4AddressList" name="l3-interface-ipv4-address-list" type="inventory.aai.onap.org.v10.L3InterfaceIpv4AddressList" /> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv6AddressList" name="l3-interface-ipv6-address-list" type="inventory.aai.onap.org.v10.L3InterfaceIpv6AddressList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Logical interfaces, e.g., a vnic." /> + <xml-property name="indexedProps" value="macaddr,interface-id,interface-name,network-name" /> + <xml-property name="dependentOn" value="generic-vnf,newvce,vpe,p-interface,vserver,lag-interface" /> + <xml-property name="container" value="l-interfaces" /> + </xml-properties> + </java-type> + <java-type name="SriovVfs"> + <xml-properties> + <xml-property name="description" value="Collection of SR-IOV Virtual Functions." /> + </xml-properties> + <xml-root-element name="sriov-vfs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sriovVf" name="sriov-vf" type="inventory.aai.onap.org.v10.SriovVf" /> + </java-attributes> + </java-type> + <java-type name="SriovVf"> + <xml-root-element name="sriov-vf" /> + <java-attributes> + <xml-element java-attribute="pciId" name="pci-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="PCI ID used to identify the sriov-vf" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfVlanFilter" name="vf-vlan-filter" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This metadata provides option to specify list of VLAN filters applied on VF to pass the traffic to VM." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfMacFilter" name="vf-mac-filter" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="When MAC filters are specified, VF-agent service configures VFs to do MAC level filtering before the traffic is passed to VM." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfVlanStrip" name="vf-vlan-strip" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="When this field is set to true, VF will configured to strip the outer TAG before the traffic is passed to VM." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfVlanAntiSpoofCheck" name="vf-vlan-anti-spoof-check" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option ensures anti VLAN spoof checks are done at the VF level to comply with security. The disable check will also be honored per the VNF needs for trusted VMs." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfMacAntiSpoofCheck" name="vf-mac-anti-spoof-check" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option ensures anti MAC spoof checks are done at the VF level to comply with security. The disable check will also be honored per the VNF needs for trusted VMs." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfMirrors" name="vf-mirrors" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This option defines the set of Mirror objects which essentially mirrors the traffic from source to set of collector VNF Ports." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfBroadcastAllow" name="vf-broadcast-allow" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, sets the VF in promiscuous mode and allows all broadcast traffic to reach the VM" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfUnknownMulticastAllow" name="vf-unknown-multicast-allow" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, sets the VF in promiscuous mode and allows unknown multicast traffic to reach the VM" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfUnknownUnicastAllow" name="vf-unknown-unicast-allow" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, sets the VF in promiscuous mode and allows unknown unicast traffic to reach the VM" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfInsertStag" name="vf-insert-stag" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, instructs to insert outer tag after traffic comes out of VM." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfLinkStatus" name="vf-link-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This option is used to set the link status. Valid values as of 1607 are on, off, and auto." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="SR-IOV Virtual Function (not to be confused with virtual network function)" /> + <xml-property name="indexedProps" value="pci-id,vf-vlan-filter,vf-mac-filter,vf-vlan-strip,neutron-network-id" /> + <xml-property name="dependentOn" value="l-interface" /> + <xml-property name="container" value="sriov-vfs" /> + </xml-properties> + </java-type> + <java-type name="L3InterfaceIpv4AddressList"> + <xml-root-element name="l3-interface-ipv4-address-list" /> + <java-attributes> + <xml-element java-attribute="l3InterfaceIpv4Address" name="l3-interface-ipv4-address" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="IP address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="l3InterfaceIpv4PrefixLength" name="l3-interface-ipv4-prefix-length" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Prefix length, 32 for single address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isFloating" name="is-floating" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Indicator of fixed or floating address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface that address belongs to" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of subnet that address belongs to" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPv4 Address Range" /> + <xml-property name="indexedProps" value="l3-interface-ipv4-address,vlan-id-inner,neutron-network-id,neutron-subnet-id" /> + <xml-property name="dependentOn" value="vlan,l-interface" /> + </xml-properties> + </java-type> + <java-type name="Vlans"> + <xml-root-element name="vlans" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vlan" name="vlan" type="inventory.aai.onap.org.v10.Vlan" /> + </java-attributes> + </java-type> + <java-type name="Vlan"> + <xml-root-element name="vlan" /> + <java-attributes> + <xml-element java-attribute="vlanInterface" name="vlan-interface" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="String that identifies the interface" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanDescription" name="vlan-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to describe (the service associated with) the vlan" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="backdoorConnection" name="backdoor-connection" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Whether customer is going to use this VLAN for backdoor connection to another customer premise device." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnId" name="vpn-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This indicates the customers VPN ID associated with this vlan" /> + <xml-property name="dbAlias" value="vpn-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Status of a vnf's vlan interface, on which the customer circuit resides, mastered by SDN-C." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv4AddressList" name="l3-interface-ipv4-address-list" type="inventory.aai.onap.org.v10.L3InterfaceIpv4AddressList" /> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv6AddressList" name="l3-interface-ipv6-address-list" type="inventory.aai.onap.org.v10.L3InterfaceIpv6AddressList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of vlan" /> + <xml-property name="indexedProps" value="vlan-interface,vlan-id-inner,vpn-id" /> + <xml-property name="uniqueProps" value="vpn-id" /> + <xml-property name="dependentOn" value="l-interface" /> + <xml-property name="container" value="vlans" /> + </xml-properties> + </java-type> + <java-type name="L3InterfaceIpv6AddressList"> + <xml-root-element name="l3-interface-ipv6-address-list" /> + <java-attributes> + <xml-element java-attribute="l3InterfaceIpv6Address" name="l3-interface-ipv6-address" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="IP address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="l3InterfaceIpv6PrefixLength" name="l3-interface-ipv6-prefix-length" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Prefix length, 128 for single address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isFloating" name="is-floating" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Indicator of fixed or floating address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface that address belongs to" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of subnet that address belongs to" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPv6 Address Range" /> + <xml-property name="indexedProps" value="l3-interface-ipv6-address,vlan-id-inner,neutron-network-id,neutron-subnet-id" /> + <xml-property name="dependentOn" value="vlan,l-interface" /> + </xml-properties> + </java-type> + <java-type name="Volumes"> + <xml-properties> + <xml-property name="description" value="Collection of ephemeral Block storage volumes." /> + </xml-properties> + <xml-root-element name="volumes" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="volume" name="volume" type="inventory.aai.onap.org.v10.Volume" /> + </java-attributes> + </java-type> + <java-type name="Volume"> + <xml-root-element name="volume" /> + <java-attributes> + <xml-element java-attribute="volumeId" name="volume-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of block storage volume relative to the vserver." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumeSelflink" name="volume-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Ephemeral Block storage volume." /> + <xml-property name="indexedProps" value="volume-id" /> + <xml-property name="dependentOn" value="vserver" /> + <xml-property name="container" value="volumes" /> + </xml-properties> + </java-type> + <java-type name="Flavors"> + <xml-properties> + <xml-property name="description" value="Collection of openstack flavors." /> + </xml-properties> + <xml-root-element name="flavors" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="flavor" name="flavor" type="inventory.aai.onap.org.v10.Flavor" /> + </java-attributes> + </java-type> + <java-type name="Flavor"> + <xml-root-element name="flavor" /> + <java-attributes> + <xml-element java-attribute="flavorId" name="flavor-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Flavor id, expected to be unique across cloud-region." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorName" name="flavor-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Flavor name" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorVcpus" name="flavor-vcpus" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Number of CPUs" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorRam" name="flavor-ram" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Amount of memory" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorDisk" name="flavor-disk" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Disk space" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorEphemeral" name="flavor-ephemeral" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Amount of ephemeral disk space" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorSwap" name="flavor-swap" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="amount of swap space allocation" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorIsPublic" name="flavor-is-public" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="whether flavor is available to all users or private to the tenant it was created in." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorSelflink" name="flavor-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorDisabled" name="flavor-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Boolean as to whether this flavor is no longer enabled" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack flavor." /> + <xml-property name="nameProps" value="flavor-name" /> + <xml-property name="indexedProps" value="flavor-name,flavor-id" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="flavors" /> + </xml-properties> + </java-type> + <java-type name="Snapshots"> + <xml-properties> + <xml-property name="description" value="Collection of openstack snapshots" /> + </xml-properties> + <xml-root-element name="snapshots" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="snapshot" name="snapshot" type="inventory.aai.onap.org.v10.Snapshot" /> + </java-attributes> + </java-type> + <java-type name="Snapshot"> + <xml-root-element name="snapshot" /> + <java-attributes> + <xml-element java-attribute="snapshotId" name="snapshot-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Snapshot id, this is the key UUID assoc associated in glance with the snapshots." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotName" name="snapshot-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Snapshot name" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotArchitecture" name="snapshot-architecture" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operating system architecture" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotOsDistro" name="snapshot-os-distro" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The common name of the operating system distribution in lowercase" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotOsVersion" name="snapshot-os-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The operating system version as specified by the distributor." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="application" name="application" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The application that the image instantiates." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVendor" name="application-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The vendor of the application." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVersion" name="application-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The version of the application." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotSelflink" name="snapshot-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="prevSnapshotId" name="prev-snapshot-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This field contains the UUID of the previous snapshot (if any)." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack snapshot" /> + <xml-property name="nameProps" value="snapshot-name" /> + <xml-property name="uniqueProps" value="snapshot-id" /> + <xml-property name="indexedProps" value="application,snapshot-name,application-vendor,snapshot-id,application-version,prev-snapshot-id" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="snapshots" /> + </xml-properties> + </java-type> + <java-type name="GroupAssignments"> + <xml-properties> + <xml-property name="description" value="Collection of openstack group assignments" /> + </xml-properties> + <xml-root-element name="group-assignments" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="groupAssignment" name="group-assignment" type="inventory.aai.onap.org.v10.GroupAssignment" /> + </java-attributes> + </java-type> + <java-type name="GroupAssignment"> + <xml-root-element name="group-assignment" /> + <java-attributes> + <xml-element java-attribute="groupId" name="group-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Group id, expected to be unique across cloud-region." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupType" name="group-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group type - the type of group this instance refers to" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupName" name="group-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group name - name assigned to the group" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupDescription" name="group-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group description - description of the group" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack group-assignment used to store exclusivity groups (EG)." /> + <xml-property name="nameProps" value="group-name" /> + <xml-property name="indexedProps" value="group-id,group-type,group-name" /> + <xml-property name="searchable" value="group-id,group-name"/> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="group-assignments" /> + </xml-properties> + </java-type> + <java-type name="Images"> + <xml-properties> + <xml-property name="description" value="Collectio of Openstack images." /> + </xml-properties> + <xml-root-element name="images" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="image" name="image" type="inventory.aai.onap.org.v10.Image" /> + </java-attributes> + </java-type> + <java-type name="Image"> + <xml-root-element name="image" /> + <java-attributes> + <xml-element java-attribute="imageId" name="image-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Image id, expected to be unique across cloud region" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageName" name="image-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Image name" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageArchitecture" name="image-architecture" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operating system architecture." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageOsDistro" name="image-os-distro" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The common name of the operating system distribution in lowercase" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageOsVersion" name="image-os-version" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The operating system version as specified by the distributor." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="application" name="application" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The application that the image instantiates." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVendor" name="application-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The vendor of the application." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVersion" name="application-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The version of the application." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageSelflink" name="image-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v10.Metadata" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack image." /> + <xml-property name="nameProps" value="image-name" /> + <xml-property name="indexedProps" value="application,image-name,application-vendor,image-id,application-version" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="images" /> + </xml-properties> + </java-type> + <java-type name="Metadata"> + <xml-properties> + <xml-property name="description" value="Collection of metadatum (key/value pairs)" /> + </xml-properties> + <xml-root-element name="metadata" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="metadatum" name="metadatum" type="inventory.aai.onap.org.v10.Metadatum" /> + </java-attributes> + </java-type> + <java-type name="Metadatum"> + <xml-root-element name="metadatum" /> + <java-attributes> + <xml-element java-attribute="metaname" name="metaname" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="metaval" name="metaval" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Key/value pairs" /> + <xml-property name="indexedProps" value="metaname" /> + <xml-property name="dependentOn" value="tenant,image,service-instance,connector,model" /> + <xml-property name="container" value="metadata" /> + </xml-properties> + </java-type> + <java-type name="DvsSwitches"> + <xml-properties> + <xml-property name="description" value="Collection of digital virtual switch metadata used for vmWare VCEs and VPEs." /> + </xml-properties> + <xml-root-element name="dvs-switches" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="dvsSwitch" name="dvs-switch" type="inventory.aai.onap.org.v10.DvsSwitch" /> + </java-attributes> + </java-type> + <java-type name="DvsSwitch"> + <xml-root-element name="dvs-switch" /> + <java-attributes> + <xml-element java-attribute="switchName" name="switch-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="DVS switch name" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vcenterUrl" name="vcenter-url" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL used to reach the vcenter" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Digital virtual switch metadata, used by SDN-C to configure VCEs. A&AI needs to receive this data from the PO deployment team and administer it using the provisioningTool.sh into A&AI. " /> + <xml-property name="indexedProps" value="vcenter-url,switch-name" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="dvs-switches" /> + </xml-properties> + </java-type> + <java-type name="NetworkProfiles"> + <xml-properties> + <xml-property name="description" value="Collection of network profiles" /> + </xml-properties> + <xml-root-element name="network-profiles" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="networkProfile" name="network-profile" type="inventory.aai.onap.org.v10.NetworkProfile" /> + </java-attributes> + </java-type> + <java-type name="NetworkProfile"> + <xml-root-element name="network-profile" /> + <java-attributes> + <xml-element java-attribute="nmProfileName" name="nm-profile-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique name of network profile." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="communityString" name="community-string" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encrypted SNMP community string" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Network profile populated by SDN-GP for SNMP" /> + <xml-property name="indexedProps" value="nm-profile-name" /> + <xml-property name="container" value="network-profiles" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + <java-type name="Pservers"> + <xml-properties> + <xml-property name="description" value="Collection of compute hosts." /> + </xml-properties> + <xml-root-element name="pservers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pserver" name="pserver" type="inventory.aai.onap.org.v10.Pserver" /> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0" /> + </xml-properties> + </java-type> + <java-type name="Pserver"> + <xml-root-element name="pserver" /> + <java-attributes> + <xml-element java-attribute="hostname" name="hostname" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Value from executing hostname on the compute node." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ptniiEquipName" name="ptnii-equip-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="PTNII name" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="numberOfCpus" name="number-of-cpus" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Number of cpus" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="diskInGigabytes" name="disk-in-gigabytes" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Disk size, in GBs" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ramInMegabytes" name="ram-in-megabytes" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="RAM size, in MBs" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipType" name="equip-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment type. Source of truth should define valid values." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipVendor" name="equip-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment vendor. Source of truth should define valid values." /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipModel" name="equip-model" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment model. Source of truth should define valid values." /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="fqdn" name="fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Fully-qualified domain name" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pserverSelflink" name="pserver-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to configure device, also used for troubleshooting and is IP used for traps generated by device." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serialNumber" name="serial-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Serial number, may be queried" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Loopback0" name="ipaddress-v4-loopback-0" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV4 Loopback 0 address" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Loopback0" name="ipaddress-v6-loopback-0" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 Loopback 0 address" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Aim" name="ipaddress-v4-aim" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV4 AIM address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Aim" name="ipaddress-v6-aim" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 AIM address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Oam" name="ipaddress-v6-oam" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 OAM address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="invStatus" name="inv-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CANOPI's inventory status. Only set with values exactly as defined by CANOPI." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pserverId" name="pserver-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of Pserver" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="internetTopology" name="internet-topology" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="internet topology of Pserver" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pserverName2" name="pserver-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="alternative pserver name" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="purpose" name="purpose" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="purpose of pserver" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Loopback10" name="ipaddress-v4-loopback-10" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV4 Loopback 10 address" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Loopback10" name="ipaddress-v6-loopback-10" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 Loopback 10 address" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Loopback300" name="ipaddress-v4-loopback-300" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV4 Loopback 300 address" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Loopback300" name="ipaddress-v6-loopback-300" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 Loopback 300 address" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="createdDate" name="created-date" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Date the PServer was created (In SOT)" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="lastUpdatedDate" name="last-updated-date" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Date the PServer was last updated (in SOT)" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="lastUpdatedBy" name="last-updated-by" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="User that last updated the PServer (in SOT)" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="functionName" name="function-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Function name" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="rackName" name="rack-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The name of the rack containing the Pserver" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="assetTag" name="asset-tag" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The PServer asset number" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="deploymentPhase" name="deployment-phase" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Deployment phase" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="locationName" name="location-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the PServer Location" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="locationId" name="location-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Id of the PServer Location" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentClli" name="equipment-clli" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The CLLI code for the PServer" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="zoneTopologyId" name="zone-topology-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Zone topology Id" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="zoneId" name="zone-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Zone Id" /> + <xml-property name="source-of-truth-type" value="IDF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prov Status of this device (not under canopi control) Valid values [PREPROV/NVTPROV/PROV]" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="pInterfaces" name="p-interfaces" type="inventory.aai.onap.org.v10.PInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v10.LagInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Compute host whose hostname must be unique and must exactly match what is sent as a relationship to a vserver." /> + <xml-property name="nameProps" value="pserver-name2" /> + <xml-property name="indexedProps" value="hostname,in-maint,pserver-id,pserver-name2,inv-status" /> + <xml-property name="searchable" value="hostname,pserver-name2,pserver-id,ipv4-oam-address" /> + <xml-property name="container" value="pservers" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + <java-type name="PInterfaces"> + <xml-properties> + <xml-property name="description" value="Collection of physical interfaces." /> + </xml-properties> + <xml-root-element name="p-interfaces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pInterface" name="p-interface" type="inventory.aai.onap.org.v10.PInterface" /> + </java-attributes> + </java-type> + <java-type name="PInterface"> + <xml-root-element name="p-interface" /> + <java-attributes> + <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name that identifies the physical interface" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portDescription" name="port-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Nature of the services and connectivity on this port." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentIdentifier" name="equipment-identifier" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CLEI or other specification for p-interface hardware." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role specification for p-interface hardware." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceType" name="interface-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates the physical properties of the interface." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v10.LInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Physical interface (e.g., nic)" /> + <xml-property name="indexedProps" value="interface-name,prov-status" /> + <xml-property name="nameProps" value="prov-status" /> + <xml-property name="dependentOn" value="vpls-pe,pserver,pnf" /> + <xml-property name="container" value="p-interfaces" /> + </xml-properties> + </java-type> + <java-type name="LagInterfaces"> + <xml-properties> + <xml-property name="description" value="Collection of link aggregate interfaces." /> + </xml-properties> + <xml-root-element name="lag-interfaces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lagInterface" name="lag-interface" type="inventory.aai.onap.org.v10.LagInterface" /> + </java-attributes> + </java-type> + <java-type name="LagInterface"> + <xml-root-element name="lag-interface" /> + <java-attributes> + <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name that identifies the link aggregate interface" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceDescription" name="interface-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Human friendly text regarding this interface." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceId" name="interface-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of interface" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role assigned to this Interface, should use values as defined in ECOMP Yang models." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v10.LInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Link aggregate interface" /> + <xml-property name="indexedProps" value="interface-name,interface-id,interface-role" /> + <xml-property name="dependentOn" value="generic-vnf,pserver,vpe,vpls-pe,pnf" /> + <xml-property name="container" value="lag-interfaces" /> + </xml-properties> + </java-type> + <java-type name="OamNetworks"> + <xml-properties> + <xml-property name="description" value="Collection of OAM networks, to be deprecated shortly. Do not use for new purposes. " /> + </xml-properties> + <xml-root-element name="oam-networks" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="oamNetwork" name="oam-network" type="inventory.aai.onap.org.v10.OamNetwork" /> + </java-attributes> + </java-type> + <java-type name="OamNetwork"> + <xml-root-element name="oam-network" /> + <java-attributes> + <xml-element java-attribute="networkUuid" name="network-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID of the network. Unique across a cloud-region" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkName" name="network-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the network." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cvlanTag" name="cvlan-tag" required="true" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="cvlan-id" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddress" name="ipv4-oam-gateway-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for VNF firewall rule so customer cannot send customer traffic over this oam network" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddressPrefixLength" name="ipv4-oam-gateway-address-prefix-length" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Used for VNF firewall rule so customer cannot send customer traffic over this oam network" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="OAM network, to be deprecated shortly. Do not use for new purposes. " /> + <xml-property name="nameProps" value="network-name" /> + <xml-property name="indexedProps" value="cvlan-tag,network-uuid,network-name" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="oam-networks" /> + </xml-properties> + </java-type> + <java-type name="AvailabilityZones"> + <xml-properties> + <xml-property name="description" value="Collection of availability zones" /> + </xml-properties> + <xml-root-element name="availability-zones" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="availabilityZone" name="availability-zone" type="inventory.aai.onap.org.v10.AvailabilityZone" /> + </java-attributes> + </java-type> + <java-type name="AvailabilityZone"> + <xml-root-element name="availability-zone" /> + <java-attributes> + <xml-element java-attribute="availabilityZoneName" name="availability-zone-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name of the availability zone. Unique across a cloud region" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="hypervisorType" name="hypervisor-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of hypervisor. Source of truth should define valid values." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="State that indicates whether the availability zone should be used, etc. Source of truth should define valid values." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Availability zone, a collection of compute hosts/pservers" /> + <xml-property name="indexedProps" value="availability-zone-name" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="availability-zones" /> + </xml-properties> + </java-type> + <java-type name="VirtualDataCenters"> + <xml-properties> + <xml-property name="description" value="Virtual organization of cloud infrastructure elements in a data center context" /> + </xml-properties> + <xml-root-element name="virtual-data-centers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="virtualDataCenter" name="virtual-data-center" type="inventory.aai.onap.org.v10.VirtualDataCenter" /> + </java-attributes> + </java-type> + <java-type name="VirtualDataCenter"> + <xml-root-element name="virtual-data-center" /> + <java-attributes> + <xml-element java-attribute="vdcId" name="vdc-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of the vdc" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vdcName" name="vdc-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the virtual data center" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Virtual organization of cloud infrastructure elements in a data center context" /> + <xml-property name="nameProps" value="vdc-name" /> + <xml-property name="indexedProps" value="vdc-name,vdc-id" /> + <xml-property name="container" value="virtual-data-centers" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + <java-type name="LicenseManagement"> + <xml-root-element name="license-management" /> + <java-attributes> + <xml-element java-attribute="licenseKeyResources" name="license-key-resources" type="inventory.aai.onap.org.v10.LicenseKeyResources" /> + </java-attributes> + </java-type> + <java-type name="LicenseKeyResources"> + <xml-root-element name="license-key-resources" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="licenseKeyResource" name="license-key-resource" type="inventory.aai.onap.org.v10.LicenseKeyResource" /> + </java-attributes> + </java-type> + <java-type name="LicenseKeyResource"> + <xml-root-element name="license-key-resource" /> + <java-attributes> + <xml-element java-attribute="attUuid" name="att-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="assignmentType" name="assignment-type" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="assignmentStatus" name="assignment-status" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="assignmentGroupUuid" name="assignment-group-uuid" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="assignmentDate" name="assignment-date" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="name" name="name" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelUuid" name="model-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersion" name="model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKeyFileUrl" name="license-key-file-url" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="supplierReleaseList" name="supplier-release-list" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="OBSOLETE OBJECT: do not use" /> + <xml-property name="nameProps" value="name" /> + <xml-property name="indexedProps" value="assignment-group-uuid,att-uuid,name" /> + <xml-property name="uniqueProps" value="att-uuid" /> + <xml-property name="container" value="license-key-resources" /> + <xml-property name="namespace" value="license-management" /> + </xml-properties> + </java-type> + <java-type name="Business"> + <xml-properties> + <xml-property name="description" value="Namespace for business related constructs" /> + </xml-properties> + <xml-root-element name="business" /> + <java-attributes> + <xml-element java-attribute="connectors" name="connectors" type="inventory.aai.onap.org.v10.Connectors" /> + <xml-element java-attribute="customers" name="customers" type="inventory.aai.onap.org.v10.Customers" /> + </java-attributes> + </java-type> + <java-type name="Connectors"> + <xml-properties> + <xml-property name="description" value="Collection of resource instances used to connect a variety of disparate inventory widgets" /> + </xml-properties> + <xml-root-element name="connectors" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="connector" name="connector" type="inventory.aai.onap.org.v10.Connector" /> + </java-attributes> + </java-type> + <java-type name="Connector"> + <xml-root-element name="connector" /> + <java-attributes> + <xml-element java-attribute="resourceInstanceId" name="resource-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of resource instance." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-invariant-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-version-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="internal" /> + <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v10.Metadata" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Collection of resource instances used to connect a variety of disparate inventory widgets" /> + <xml-property name="indexedProps" value="resource-instance-id,model-invariant-id,model-version-id,widget-model-id,widget-model-version" /> + <xml-property name="container" value="connectors" /> + <xml-property name="namespace" value="business" /> + </xml-properties> + </java-type> + <java-type name="Customers"> + <xml-properties> + <xml-property name="description" value="Collection of customer identifiers to provide linkage back to BSS information." /> + </xml-properties> + <xml-root-element name="customers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="customer" name="customer" type="inventory.aai.onap.org.v10.Customer" /> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0" /> + </xml-properties> + </java-type> + <java-type name="Customer"> + <xml-root-element name="customer" /> + <java-attributes> + <xml-element java-attribute="globalCustomerId" name="global-customer-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Global customer id used across ECOMP to uniquely identify customer." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="subscriberName" name="subscriber-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Subscriber name, an alternate way to retrieve a customer." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="subscriberType" name="subscriber-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Subscriber type, a way to provide VID with only the INFRA customers." /> + <xml-property name="defaultValue" value="CUST" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceSubscriptions" name="service-subscriptions" type="inventory.aai.onap.org.v10.ServiceSubscriptions" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="customer identifiers to provide linkage back to BSS information." /> + <xml-property name="nameProps" value="subscriber-name" /> + <xml-property name="indexedProps" value="subscriber-name,global-customer-id,subscriber-type" /> + <xml-property name="searchable" value="global-customer-id,subscriber-name" /> + <xml-property name="uniqueProps" value="global-customer-id" /> + <xml-property name="container" value="customers" /> + <xml-property name="namespace" value="business" /> + </xml-properties> + </java-type> + <java-type name="ServiceSubscriptions"> + <xml-properties> + <xml-property name="description" value="Collection of objects that group service instances." /> + </xml-properties> + <xml-root-element name="service-subscriptions" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="serviceSubscription" name="service-subscription" type="inventory.aai.onap.org.v10.ServiceSubscription" /> + </java-attributes> + </java-type> + <java-type name="ServiceSubscription"> + <xml-root-element name="service-subscription" /> + <java-attributes> + <xml-element java-attribute="serviceType" name="service-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Value defined by orchestration to identify this service across ECOMP." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="tempUbSubAccountId" name="temp-ub-sub-account-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This property will be deleted from A&AI in the near future. Only stop gap solution." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceInstances" name="service-instances" type="inventory.aai.onap.org.v10.ServiceInstances" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Object that group service instances." /> + <xml-property name="indexedProps" value="service-type" /> + <xml-property name="dependentOn" value="customer" /> + <xml-property name="container" value="service-subscriptions" /> + <xml-property name="crossEntityReference" value="service-instance,service-type" /> + </xml-properties> + </java-type> + <java-type name="ServiceInstances"> + <xml-properties> + <xml-property name="description" value="Collection of service instances" /> + </xml-properties> + <xml-root-element name="service-instances" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="serviceInstance" name="service-instance" type="inventory.aai.onap.org.v10.ServiceInstance" /> + </java-attributes> + </java-type> + <java-type name="ServiceInstance"> + <xml-root-element name="service-instance" /> + <java-attributes> + <xml-element java-attribute="serviceInstanceId" name="service-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Uniquely identifies this instance of a service" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceInstanceName" name="service-instance-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This field will store a name assigned to the service-instance." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-invariant-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-version-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="internal" /> + <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthTotal" name="bandwidth-total" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates the total bandwidth to be used for this service." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthUpWan1" name="bandwidth-up-wan1" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="indicates the upstream bandwidth this service will use on the WAN1 port of the physical device." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthDownWan1" name="bandwidth-down-wan1" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="indicates the downstream bandwidth this service will use on the WAN1 port of the physical device." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthUpWan2" name="bandwidth-up-wan2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="indicates the upstream bandwidth this service will use on the WAN2 port of the physical device." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthDownWan2" name="bandwidth-down-wan2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="indicates the downstream bandwidth this service will use on the WAN2 port of the physical device." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vhnPortalUrl" name="vhn-portal-url" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL customers will use to access the vHN Portal." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operational status of the service-instance." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceInstanceLocationId" name="service-instance-location-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="An identifier that customers assign to the location where this service is being used." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Path to the controller object." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this service." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v10.Metadata" /> + <xml-element java-attribute="allottedResources" name="allotted-resources" type="inventory.aai.onap.org.v10.AllottedResources" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Instance of a service" /> + <xml-property name="indexedProps" value="service-instance-id,model-invariant-id,model-version-id,widget-model-id,widget-model-version,service-instance-name,service-instance-location-id,orchestration-status" /> + <xml-property name="nameProps" value="service-instance-name" /> + <xml-property name="searchable" value="service-instance-id,service-instance-name" /> + <xml-property name="uniqueProps" value="service-instance-id" /> + <xml-property name="dependentOn" value="service-subscription" /> + <xml-property name="container" value="service-instances" /> + </xml-properties> + </java-type> + <java-type name="ServiceDesignAndCreation"> + <xml-properties> + <xml-property name="description" value="Namespace for objects managed by ASDC" /> + </xml-properties> + <xml-root-element name="service-design-and-creation" /> + <java-attributes> + <xml-element java-attribute="vnfImages" name="vnf-images" type="inventory.aai.onap.org.v10.VnfImages" /> + <xml-element java-attribute="services" name="services" type="inventory.aai.onap.org.v10.Services" /> + <xml-element java-attribute="serviceCapabilities" name="service-capabilities" type="inventory.aai.onap.org.v10.ServiceCapabilities" /> + <xml-element java-attribute="models" name="models" type="inventory.aai.onap.org.v10.Models" /> + <xml-element java-attribute="namedQueries" name="named-queries" type="inventory.aai.onap.org.v10.NamedQueries" /> + </java-attributes> + </java-type> + <java-type name="VnfImages"> + <xml-properties> + <xml-property name="description" value="Collection of image objects that pertain to a VNF that doesn't have associated vservers. This is a kludge." /> + </xml-properties> + <xml-root-element name="vnf-images" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vnfImage" name="vnf-image" type="inventory.aai.onap.org.v10.VnfImage" /> + </java-attributes> + </java-type> + <java-type name="VnfImage"> + <xml-root-element name="vnf-image" /> + <java-attributes> + <xml-element java-attribute="attUuid" name="att-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of this asset" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="application" name="application" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The application that the image instantiates." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVendor" name="application-vendor" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The vendor of the application." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVersion" name="application-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The version of the application." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Image object that pertain to a VNF that doesn't have associated vservers. This is a kludge." /> + <xml-property name="indexedProps" value="application,att-uuid,application-vendor,application-version" /> + <xml-property name="uniqueProps" value="att-uuid" /> + <xml-property name="container" value="vnf-images" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + </java-type> + <java-type name="Services"> + <xml-properties> + <xml-property name="description" value="Collection of service model definitions. Likely to be deprecated in favor of models from ASDC." /> + </xml-properties> + <xml-root-element name="services" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="service" name="service" type="inventory.aai.onap.org.v10.Service" /> + </java-attributes> + </java-type> + <java-type name="Service"> + <xml-root-element name="service" /> + <java-attributes> + <xml-element java-attribute="serviceId" name="service-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="This gets defined by others to provide a unique ID for the service, we accept what is sent." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceDescription" name="service-description" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description of the service" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceSelflink" name="service-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceVersion" name="service-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="service version" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Stand-in for service model definitions. Likely to be deprecated in favor of models from ASDC. Does not strictly map to ASDC services." /> + <xml-property name="indexedProps" value="service-description,service-id" /> + <xml-property name="container" value="services" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + </java-type> + <java-type name="ServiceCapabilities"> + <xml-properties> + <xml-property name="description" value="Collection of service capabilities." /> + </xml-properties> + <xml-root-element name="service-capabilities" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="serviceCapability" name="service-capability" type="inventory.aai.onap.org.v10.ServiceCapability" /> + </java-attributes> + </java-type> + <java-type name="ServiceCapability"> + <xml-root-element name="service-capability" /> + <java-attributes> + <xml-element java-attribute="serviceType" name="service-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="This gets defined by others to provide a unique ID for the service, we accept what is sent." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded in service-specific ways and clients should expect changes to occur in the future to this field as ECOMP matures." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Early definition of server/resource pairings, likely to be replaced by models. No new use should be made of this." /> + <xml-property name="indexedProps" value="service-type,vnf-type" /> + <xml-property name="container" value="service-capabilities" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + </java-type> + <java-type name="Network"> + <xml-properties> + <xml-property name="description" value="Namespace for network inventory resources." /> + </xml-properties> + <xml-root-element name="network" /> + <java-attributes> + <xml-element java-attribute="logicalLinks" name="logical-links" type="inventory.aai.onap.org.v10.LogicalLinks" /> + <xml-element java-attribute="sitePairSets" name="site-pair-sets" type="inventory.aai.onap.org.v10.SitePairSets" /> + <xml-element java-attribute="vpnBindings" name="vpn-bindings" type="inventory.aai.onap.org.v10.VpnBindings" /> + <xml-element java-attribute="vplsPes" name="vpls-pes" type="inventory.aai.onap.org.v10.VplsPes" /> + <xml-element java-attribute="multicastConfigurations" name="multicast-configurations" type="inventory.aai.onap.org.v10.MulticastConfigurations" /> + <xml-element java-attribute="vces" name="vces" type="inventory.aai.onap.org.v10.Vces" /> + <xml-element java-attribute="vpes" name="vpes" type="inventory.aai.onap.org.v10.Vpes" /> + <xml-element java-attribute="vnfcs" name="vnfcs" type="inventory.aai.onap.org.v10.Vnfcs" /> + <xml-element java-attribute="l3Networks" name="l3-networks" type="inventory.aai.onap.org.v10.L3Networks" /> + <xml-element java-attribute="networkPolicies" name="network-policies" type="inventory.aai.onap.org.v10.NetworkPolicies" /> + <xml-element java-attribute="genericVnfs" name="generic-vnfs" type="inventory.aai.onap.org.v10.GenericVnfs" /> + <xml-element java-attribute="lagLinks" name="lag-links" type="inventory.aai.onap.org.v10.LagLinks" /> + <xml-element java-attribute="newvces" name="newvces" type="inventory.aai.onap.org.v10.Newvces" /> + <xml-element java-attribute="pnfs" name="pnfs" type="inventory.aai.onap.org.v10.Pnfs" /> + <xml-element java-attribute="physicalLinks" name="physical-links" type="inventory.aai.onap.org.v10.PhysicalLinks" /> + <xml-element java-attribute="ipsecConfigurations" name="ipsec-configurations" type="inventory.aai.onap.org.v10.IpsecConfigurations" /> + <xml-element java-attribute="routeTableReferences" name="route-table-references" type="inventory.aai.onap.org.v10.RouteTableReferences" /> + <xml-element java-attribute="instanceGroups" name="instance-groups" type="inventory.aai.onap.org.v10.InstanceGroups" /> + <xml-element java-attribute="zones" name="zones" type="inventory.aai.onap.org.v10.Zones" /> + </java-attributes> + </java-type> + <java-type name="LogicalLinks"> + <xml-properties> + <xml-property name="description" value="Collection of logical connections" /> + </xml-properties> + <xml-root-element name="logical-links" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="logicalLink" name="logical-link" type="inventory.aai.onap.org.v10.LogicalLink" /> + </java-attributes> + </java-type> + <java-type name="LogicalLink"> + <xml-root-element name="logical-link" /> + <java-attributes> + <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="e.g., evc-name, or vnf-nameA_interface-nameA_vnf-nameZ_interface-nameZ" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkType" name="link-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of logical link, e.g., evc" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4, v6, or ds for dual stack (should be att-ip-version)" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="routingProtocol" name="routing-protocol" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="For example, static or BGP" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-invariant-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-version-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="internal" /> + <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indication of operational status of the logical link." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this VNF by BAU Service Assurance systems." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkRole" name="link-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indication of the network use of the logical link." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkName2" name="link-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alias or alternate name (CLCI or D1 name)." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkId" name="link-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the logical-link, SDNC generates this." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="circuitId" name="circuit-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Circuit id" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="purpose" name="purpose" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Reason for this entity, role it is playing" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Logical links generally connect l-interfaces but are used to express logical connectivity between two points" /> + <xml-property name="indexedProps" value="link-name,model-invariant-id,model-version-id,widget-model-id,widget-model-version,link-id,prov-status,circuit-id,purpose" /> + <xml-property name="uniqueProps" value="link-id" /> + <xml-property name="container" value="logical-links" /> + <xml-property name="namespace" value="network" /> + <xml-property name="searchable" value="link-name" /> + </xml-properties> + </java-type> + <java-type name="SitePairSets"> + <xml-properties> + <xml-property name="description" value="Collection of sets of instances for probes related to generic-vnf" /> + </xml-properties> + <xml-root-element name="site-pair-sets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sitePairSet" name="site-pair-set" type="inventory.aai.onap.org.v10.SitePairSet" /> + </java-attributes> + </java-type> + <java-type name="SitePairSet"> + <xml-root-element name="site-pair-set" /> + <java-attributes> + <xml-element java-attribute="sitePairSetId" name="site-pair-set-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of site pair set." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="routingInstances" name="routing-instances" type="inventory.aai.onap.org.v10.RoutingInstances" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Set of instances for probes used to measure service level agreements" /> + <xml-property name="indexedProps" value="site-pair-set-id" /> + <xml-property name="uniqueProps" value="site-pair-set-id" /> + <xml-property name="container" value="site-pair-sets" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="RoutingInstances"> + <xml-properties> + <xml-property name="description" value="set of probes related to generic-vnf routing instance" /> + </xml-properties> + <xml-root-element name="routing-instances" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="routingInstance" name="routing-instance" type="inventory.aai.onap.org.v10.RoutingInstance" /> + </java-attributes> + </java-type> + <java-type name="RoutingInstance"> + <xml-root-element name="routing-instance" /> + <java-attributes> + <xml-element java-attribute="routingInstanceId" name="routing-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of routing instance" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="rpmOwner" name="rpm-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="rpm owner" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sitePairs" name="site-pairs" type="inventory.aai.onap.org.v10.SitePairs" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="routing-instance-id" /> + <xml-property name="uniqueProps" value="routing-instance-id" /> + <xml-property name="dependentOn" value="site-pair-set" /> + <xml-property name="container" value="routing-instances" /> + </xml-properties> + </java-type> + <java-type name="SitePairs"> + <xml-properties> + <xml-property name="description" value="probe within a set" /> + </xml-properties> + <xml-root-element name="site-pairs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sitePair" name="site-pair" type="inventory.aai.onap.org.v10.SitePair" /> + </java-attributes> + </java-type> + <java-type name="SitePair"> + <xml-root-element name="site-pair" /> + <java-attributes> + <xml-element java-attribute="sitePairId" name="site-pair-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique identifier of probe" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sourceIp" name="source-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prefix address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="destinationIp" name="destination-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prefix address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ip version, v4, v6" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="destinationHostname" name="destination-hostname" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Hostname of the destination equipment to which SLAs are measured against." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="destinationEquipType" name="destination-equip-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The type of destinatination equipment. Could be Router, UCPE, etc." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="classesOfService" name="classes-of-service" type="inventory.aai.onap.org.v10.ClassesOfService" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="site-pair-id" /> + <xml-property name="uniqueProps" value="site-pair-id" /> + <xml-property name="dependentOn" value="routing-instance" /> + <xml-property name="container" value="site-pairs" /> + </xml-properties> + </java-type> + <java-type name="ClassesOfService"> + <xml-properties> + <xml-property name="description" value="class-of-service of probe" /> + </xml-properties> + <xml-root-element name="classes-of-service" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="classOfService" name="class-of-service" type="inventory.aai.onap.org.v10.ClassOfService" /> + </java-attributes> + </java-type> + <java-type name="ClassOfService"> + <xml-root-element name="class-of-service" /> + <java-attributes> + <xml-element java-attribute="cos" name="cos" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique identifier of probe" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="probeId" name="probe-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="identifier of probe" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="probeType" name="probe-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="type of probe" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="cos" /> + <xml-property name="dependentOn" value="site-pair" /> + <xml-property name="container" value="classes-of-service" /> + </xml-properties> + </java-type> + <java-type name="VpnBindings"> + <xml-root-element name="vpn-bindings" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vpnBinding" name="vpn-binding" type="inventory.aai.onap.org.v10.VpnBinding" /> + </java-attributes> + </java-type> + <java-type name="VpnBinding"> + <xml-root-element name="vpn-binding" /> + <java-attributes> + <xml-element java-attribute="vpnId" name="vpn-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="VPN ID, globally unique within A&AI" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnName" name="vpn-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="VPN Name" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnPlatform" name="vpn-platform" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the platform associated with the VPN example AVPN, Mobility" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnType" name="vpn-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the vpn, should be taken from enumerated/valid values" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="routeDistinguisher" name="route-distinguisher" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to distinguish the distinct VPN routes of separate customers who connect to the provider in an MPLS network." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="routeTargets" name="route-targets" type="inventory.aai.onap.org.v10.RouteTargets" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList"> + <xml-properties> + <xml-property name="description" value="l3-networks relate to vpn-bindings" /> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="VPN binding" /> + <xml-property name="nameProps" value="vpn-name,vpn-type" /> + <xml-property name="indexedProps" value="vpn-name,vpn-id,vpn-type" /> + <xml-property name="searchable" value="vpn-id,vpn-name" /> + <xml-property name="uniqueProps" value="vpn-id" /> + <xml-property name="container" value="vpn-bindings" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="VplsPes"> + <xml-properties> + <xml-property name="description" value="Collection of VPLS Provider Edge routers" /> + </xml-properties> + <xml-root-element name="vpls-pes" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vplsPe" name="vpls-pe" type="inventory.aai.onap.org.v10.VplsPe" /> + </java-attributes> + </java-type> + <java-type name="VplsPe"> + <xml-root-element name="vpls-pe" /> + <java-attributes> + <xml-element java-attribute="equipmentName" name="equipment-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this VNF by BAU Service Assurance systems." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vpe, also used for troubleshooting and is IP used for traps generated by VPE (v4-loopback0-ip-address)." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value, e.g., VPLS-PE." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Temporary location for stag to get to VCE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="pInterfaces" name="p-interfaces" type="inventory.aai.onap.org.v10.PInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v10.LagInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="VPLS Provider Edge routers." /> + <xml-property name="indexedProps" value="prov-status,equipment-name" /> + <xml-property name="container" value="vpls-pes" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="MulticastConfigurations"> + <xml-properties> + <xml-property name="description" value="multicast configuration of generic-vnf ip-address" /> + </xml-properties> + <xml-root-element name="multicast-configurations" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="multicastConfiguration" name="multicast-configuration" type="inventory.aai.onap.org.v10.MulticastConfiguration" /> + </java-attributes> + </java-type> + <java-type name="MulticastConfiguration"> + <xml-root-element name="multicast-configuration" /> + <java-attributes> + <xml-element java-attribute="multicastConfigurationId" name="multicast-configuration-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of multicast configuration." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="multicastProtocol" name="multicast-protocol" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="protocol of multicast configuration" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="rpType" name="rp-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="rp type of multicast configuration" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="multicast-configuration-id" /> + <xml-property name="uniqueProps" value="multicast-configuration-id" /> + <xml-property name="container" value="multicast-configurations" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="Vces"> + <xml-properties> + <xml-property name="description" value="Collection of Virtual Customer Edge Routers, used specifically for Gamma. This object is deprecated." /> + </xml-properties> + <xml-root-element name="vces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vce" name="vce" type="inventory.aai.onap.org.v10.Vce" /> + </java-attributes> + </java-type> + <java-type name="Vce"> + <xml-root-element name="vce" /> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded in service-specific ways and clients should expect changes to occur in the future to this field as ECOMP matures." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service, does not strictly map to ASDC services, SOON TO BE DEPRECATED." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceZone" name="regional-resource-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Regional way of organizing pservers, source of truth should define values" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="OBSOLETE - do not use" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network role being played by this VNF" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpeId" name="vpe-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique ID of VPE connected to this VCE." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="v6VceWanAddress" name="v6-vce-wan-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Valid v6 IP address for the WAN Link on this router. Implied length of /64." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vce, also used for troubleshooting and is IP used for traps generated by VCE." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Loopback0Address" name="ipv4-loopback0-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Loopback0 address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="entitlementResourceUuid" name="entitlement-resource-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="OBSOLETE - see child relationships" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portGroups" name="port-groups" type="inventory.aai.onap.org.v10.PortGroups" /> + <xml-element java-attribute="licenses" name="licenses" type="inventory.aai.onap.org.v10.Licenses" /> + <xml-element java-attribute="entitlements" name="entitlements" type="inventory.aai.onap.org.v10.Entitlements" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Virtual Customer Edge Router, used specifically for Gamma. This object is deprecated." /> + <xml-property name="nameProps" value="vnf-name" /> + <xml-property name="indexedProps" value="vnf-name,vnf-name2,vnf-type,heat-stack-id,vnf-id,interface-name,regional-resource-zone,vpe-id,prov-status,service-id" /> + <xml-property name="searchable" value="vnf-id,vnf-name,vnf-name2" /> + <xml-property name="uniqueProps" value="vnf-id" /> + <xml-property name="container" value="vces" /> + <xml-property name="namespace" value="network" /> + <xml-property name="extends" value="vnf" /> + </xml-properties> + </java-type> + <java-type name="PortGroups"> + <xml-root-element name="port-groups" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="portGroup" name="port-group" type="inventory.aai.onap.org.v10.PortGroup" /> + </java-attributes> + </java-type> + <java-type name="PortGroup"> + <xml-root-element name="port-group" /> + <java-attributes> + <xml-element java-attribute="interfaceId" name="interface-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of the interface" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of this Interface" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkName" name="neutron-network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network name of this Interface" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role assigned to this Interface, should use values as defined in ECOMP Yang models." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portGroupId" name="port-group-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique ID for port group in vmware" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portGroupName" name="port-group-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Likely to duplicate value of neutron network name" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="switchName" name="switch-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="DVS or standard switch name (should be non-null for port groups associated with DVS)" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cvlanTags" name="cvlan-tags" type="inventory.aai.onap.org.v10.CvlanTags" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Used to capture the network interfaces of this VCE" /> + <xml-property name="nameProps" value="port-group-name" /> + <xml-property name="indexedProps" value="port-group-id,heat-stack-id,interface-id,interface-name,switch-name" /> + <xml-property name="dependentOn" value="vce" /> + <xml-property name="container" value="port-groups" /> + </xml-properties> + </java-type> + <java-type name="CvlanTags"> + <xml-root-element name="cvlan-tags" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="cvlanTagEntry" name="cvlan-tag-entry" type="inventory.aai.onap.org.v10.CvlanTagEntry" /> + </java-attributes> + </java-type> + <java-type name="CvlanTagEntry"> + <xml-root-element name="cvlan-tag-entry" /> + <java-attributes> + <xml-element java-attribute="cvlanTag" name="cvlan-tag" required="true" type="java.lang.Long" xml-key="true"> + <xml-properties> + <xml-property name="description" value="See mis-na-virtualization-platform.yang" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="dependentOn" value="port-group" /> + <xml-property name="indexedProps" value="cvlan-tag" /> + <xml-property name="container" value="cvlan-tags" /> + </xml-properties> + </java-type> + <java-type name="Vpes"> + <xml-properties> + <xml-property name="description" value="Virtual provider edge router. In 1504, A&AI will populate this object through an M&P and tool provided to operations." /> + </xml-properties> + <xml-root-element name="vpes" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vpe" name="vpe" type="inventory.aai.onap.org.v10.Vpe" /> + </java-attributes> + </java-type> + <java-type name="Vpe"> + <xml-root-element name="vpe" /> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded in service-specific ways and clients should expect changes to occur in the future to this field as ECOMP matures." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service. Does not map strictly to ASDC services. SOON TO BE DEPRECATED" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceZone" name="regional-resource-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Regional way of organizing pservers, source of truth should define values" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="OBSOLETE - do not use. See child relationships." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vpe, also used for troubleshooting and is IP used for traps generated by VPE (v4-loopback0-ip-address)." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddressPrefixLength" name="ipv4-oam-gateway-address-prefix-length" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Prefix length for oam-address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddress" name="ipv4-oam-gateway-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Gateway address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="v4Loopback0IpAddress" name="v4-loopback0-ip-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Loopback0 address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Temporary location for stag to get to VCE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="asNumber" name="as-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="as-number of the VPE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="summaryStatus" name="summary-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="details regarding the vpe operation, PLEASE DISCONTINUE USE OF THIS FIELD." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="encryptedAccessFlag" name="encrypted-access-flag" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="indicates whether vpe access uses SSH" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v10.LInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v10.LagInterfaces" /> + <xml-element java-attribute="licenses" name="licenses" type="inventory.aai.onap.org.v10.Licenses" /> + <xml-element java-attribute="entitlements" name="entitlements" type="inventory.aai.onap.org.v10.Entitlements" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Relationship-list must include related to info for complex." /> + <xml-property name="nameProps" value="vnf-name" /> + <xml-property name="indexedProps" value="vnf-name,vnf-name2,vnf-type,heat-stack-id,vnf-id,regional-resource-zone,prov-status,service-id" /> + <xml-property name="searchable" value="vnf-id,vnf-name,vnf-name2" /> + <xml-property name="uniqueProps" value="vnf-id" /> + <xml-property name="container" value="vpes" /> + <xml-property name="namespace" value="network" /> + <xml-property name="extends" value="vnf" /> + </xml-properties> + </java-type> + <java-type name="Vnfcs"> + <xml-properties> + <xml-property name="description" value="virtual network components associated with a vserver from application controller." /> + </xml-properties> + <xml-root-element name="vnfcs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vnfc" name="vnfc" type="inventory.aai.onap.org.v10.Vnfc" /> + </java-attributes> + </java-type> + <java-type name="Vnfc"> + <xml-root-element name="vnfc" /> + <java-attributes> + <xml-element java-attribute="vnfcName" name="vnfc-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of vnfc." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfcFunctionCode" name="vnfc-function-code" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="function code" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfcType" name="vnfc-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="type" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="prov status of this vnfc" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by APP-C" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4OamVip" name="ipaddress-v4-oam-vip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Oam V4 vip address of this vnfc" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="isClosedLoopDisabled" name="is-closed-loop-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="used to indicate whether closed loop function is enabled on this node" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupNotation" name="group-notation" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group notation of VNFC" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="vnfc-name,prov-status,vnfc-type,vnfc-function-code,ipaddress-v4-oam-vip,in-maint,is-closed-loop-disabled,group-notation" /> + <xml-property name="searchable" value="vnfc-name" /> + <xml-property name="container" value="vnfcs" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="L3Networks"> + <xml-root-element name="l3-networks" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="l3Network" name="l3-network" type="inventory.aai.onap.org.v10.L3Network" /> + </java-attributes> + </java-type> + <java-type name="L3Network"> + <xml-root-element name="l3-network" /> + <java-attributes> + <xml-element java-attribute="networkId" name="network-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Network ID, should be uuid. Unique across A&AI." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkName" name="network-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the network, governed by some naming convention.." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkType" name="network-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the network - who defines these values?" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkRole" name="network-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role the network plans - who defines these values?" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkTechnology" name="network-technology" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network technology - who defines these values?" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of this Interface" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="isBoundToVpn" name="is-bound-to-vpn" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="Set to true if bound to VPN" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service from ASDC. Does not strictly map to ASDC services. SOON TO BE DEPRECATED" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkRoleInstance" name="network-role-instance" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="network role instance" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="contrailNetworkFqdn" name="contrail-network-fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contrail FQDN for the network" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-invariant-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-version-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="internal" /> + <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="captures the id of all the configuration used to customize the resource for the service." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="physicalNetworkName" name="physical-network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name associated with the physical network." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isProviderNetwork" name="is-provider-network" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="boolean indicatating whether or not network is a provider network." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isSharedNetwork" name="is-shared-network" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="boolean indicatating whether or not network is a shared network." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isExternalNetwork" name="is-external-network" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="boolean indicatating whether or not network is an external network." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Path to the controller object." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="subnets" name="subnets" type="inventory.aai.onap.org.v10.Subnets" /> + <xml-element java-attribute="ctagAssignments" name="ctag-assignments" type="inventory.aai.onap.org.v10.CtagAssignments" /> + <xml-element java-attribute="segmentationAssignments" name="segmentation-assignments" type="inventory.aai.onap.org.v10.SegmentationAssignments" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList"> + <xml-properties> + <xml-property name="description" value="Relates to tenant (or is it a child of tenant), complex, service, vpn-binding" /> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Generic network definition" /> + <xml-property name="nameProps" value="network-name" /> + <xml-property name="indexedProps" value="heat-stack-id,network-uuid,service-id,network-id,network-name,model-invariant-id,model-version-id,widget-model-id,widget-model-version,contrail-network-fqdn,network-role" /> + <xml-property name="searchable" value="network-id,network-name" /> + <xml-property name="uniqueProps" value="network-id" /> + <xml-property name="container" value="l3-networks" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="NetworkPolicies"> + <xml-root-element name="network-policies" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="networkPolicy" name="network-policy" type="inventory.aai.onap.org.v10.NetworkPolicy" /> + </java-attributes> + </java-type> + <java-type name="NetworkPolicy"> + <xml-root-element name="network-policy" /> + <java-attributes> + <xml-element java-attribute="networkPolicyId" name="network-policy-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID representing unique key to this instance" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkPolicyFqdn" name="network-policy-fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contrail FQDN for the policy" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID for the openStack Heat instance" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="nameProps" value="network-policy-fqdn" /> + <xml-property name="indexedProps" value="network-policy-id,network-policy-fqdn" /> + <xml-property name="searchable" value="network-policy-id,network-policy-fqdn" /> + <xml-property name="uniqueProps" value="network-policy-id" /> + <xml-property name="container" value="network-policies" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="CtagAssignments"> + <xml-root-element name="ctag-assignments" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="ctagAssignment" name="ctag-assignment" type="inventory.aai.onap.org.v10.CtagAssignment" /> + </java-attributes> + </java-type> + <java-type name="CtagAssignment"> + <xml-root-element name="ctag-assignment" /> + <java-attributes> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" required="true" type="java.lang.Long" xml-key="true"> + <xml-properties> + <xml-property name="description" value="id." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="vlan-id-inner" /> + <xml-property name="dependentOn" value="l3-network" /> + <xml-property name="container" value="ctag-assignments" /> + </xml-properties> + </java-type> + <java-type name="Subnets"> + <xml-root-element name="subnets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="subnet" name="subnet" type="inventory.aai.onap.org.v10.Subnet" /> + </java-attributes> + </java-type> + <java-type name="Subnet"> + <xml-root-element name="subnet" /> + <java-attributes> + <xml-element java-attribute="subnetId" name="subnet-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Subnet ID, should be UUID." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="subnetName" name="subnet-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name associated with the subnet." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of this subnet" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="gatewayAddress" name="gateway-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="gateway ip address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkStartAddress" name="network-start-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="network start address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cidrMask" name="cidr-mask" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="cidr mask" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ip version" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="dhcpEnabled" name="dhcp-enabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="dhcp enabled" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dhcpStart" name="dhcp-start" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the start address reserved for use by dhcp" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dhcpEnd" name="dhcp-end" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the last address reserved for use by dhcp" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="subnet-id,subnet-name" /> + <xml-property name="nameProps" value="subnet-name" /> + <xml-property name="uniqueProps" value="subnet-id" /> + <xml-property name="dependentOn" value="l3-network" /> + <xml-property name="container" value="subnets" /> + </xml-properties> + </java-type> + <java-type name="GenericVnfs"> + <xml-properties> + <xml-property name="description" value="Collection of VNFs" /> + </xml-properties> + <xml-root-element name="generic-vnfs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="genericVnf" name="generic-vnf" type="inventory.aai.onap.org.v10.GenericVnf" /> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0" /> + </xml-properties> + </java-type> + <java-type name="GenericVnf"> + <xml-root-element name="generic-vnf" /> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded in service-specific ways and clients should expect changes to occur in the future to this field as ECOMP matures." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service, does not necessarily map to ASDC service models. SOON TO BE DEPRECATED" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceZone" name="regional-resource-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Regional way of organizing pservers, source of truth should define values" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + <xml-property name="suggestibleOnSearch" value="true" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational. Valid values are in-service-path and out-of-service-path." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="OBSOLETE - do not use" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, used by MSO." /> + <xml-property name="suggestibleOnSearch" value="true" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="identifier of managed by vendor or customer" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure generic-vnf, also used for troubleshooting and is IP used for traps generated by generic-vnf." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Loopback0Address" name="ipv4-loopback0-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4 Loopback0 address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="nmLanV6Address" name="nm-lan-v6-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v6 Loopback address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementV6Address" name="management-v6-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v6 management address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vcpu" name="vcpu" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="number of vcpus ordered for this instance of VNF, used for VNFs with no vservers/flavors, to be used only by uCPE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vcpuUnits" name="vcpu-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="units associated with vcpu, used for VNFs with no vservers/flavors, to be used only by uCPE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vmemory" name="vmemory" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="number of GB of memory ordered for this instance of VNF, used for VNFs with no vservers/flavors, to be used only by uCPE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vmemoryUnits" name="vmemory-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="units associated with vmemory, used for VNFs with no vservers/flavors, to be used only by uCPE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vdisk" name="vdisk" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="number of vdisks ordered for this instance of VNF, used for VNFs with no vservers/flavors, to be used only uCPE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vdiskUnits" name="vdisk-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="units associated with vdisk, used for VNFs with no vservers/flavors, to be used only by uCPE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="isClosedLoopDisabled" name="is-closed-loop-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="used to indicate whether closed loop function is enabled on this node" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="summaryStatus" name="summary-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="details regarding the generic-vnf operation, PLEASE DISCONTINUE USE OF THIS FIELD." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="encryptedAccessFlag" name="encrypted-access-flag" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="indicates whether generic-vnf access uses SSH" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="entitlementAssignmentGroupUuid" name="entitlement-assignment-group-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the Entitlement group used for licensing VNFs, OBSOLETE - See child relationships." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="entitlementResourceUuid" name="entitlement-resource-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the specific entitlement resource. OBSOLETE - See child relationships." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseAssignmentGroupUuid" name="license-assignment-group-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the license assignment group. OBSOLETE - See child relationships." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKeyUuid" name="license-key-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the actual license resource. OBSOLETE - See child relationships." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-invariant-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-version-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="internal" /> + <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="captures the id of all the configuration used to customize the resource for the service." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="asNumber" name="as-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="as-number of the VNF" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceSubzone" name="regional-resource-subzone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="represents sub zone of the rr plane" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfType" name="nf-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Generic description of the type of NF" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfFunction" name="nf-function" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="English description of Network function that the specific VNF deployment is providing" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfRole" name="nf-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="role in the network that this model will be providing" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfNamingCode" name="nf-naming-code" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="string assigned to this model used for naming purposes" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Path to the controller object." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v10.LInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v10.LagInterfaces" /> + <xml-element java-attribute="vfModules" name="vf-modules" type="inventory.aai.onap.org.v10.VfModules" /> + <xml-element java-attribute="licenses" name="licenses" type="inventory.aai.onap.org.v10.Licenses" /> + <xml-element java-attribute="entitlements" name="entitlements" type="inventory.aai.onap.org.v10.Entitlements" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="General purpose VNF" /> + <xml-property name="nameProps" value="vnf-name" /> + <xml-property name="indexedProps" value="is-closed-loop-disabled,vnf-name2,vnf-type,heat-stack-id,in-maint,vnf-name,vnf-id,regional-resource-zone,prov-status,service-id,model-invariant-id,model-version-id,widget-model-id,widget-model-version,nf-type,nf-function,nf-naming-code,nf-role" /> + <xml-property name="searchable" value="vnf-id,vnf-name,vnf-name2" /> + <xml-property name="uniqueProps" value="vnf-id" /> + <xml-property name="container" value="generic-vnfs" /> + <xml-property name="namespace" value="network" /> + <xml-property name="extends" value="vnf" /> + <xml-property name="containsSuggestibleProps" value="true" /> + <xml-property name="suggestionAliases" value="VNFs" /> + </xml-properties> + </java-type> + <java-type name="VfModules"> + <xml-properties> + <xml-property name="description" value="Collection of vf-modules, a deployment unit of VNFCs" /> + </xml-properties> + <xml-root-element name="vf-modules" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vfModule" name="vf-module" type="inventory.aai.onap.org.v10.VfModule" /> + </java-attributes> + </java-type> + <java-type name="VfModule"> + <xml-root-element name="vf-module" /> + <java-attributes> + <xml-element java-attribute="vfModuleId" name="vf-module-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of vf-module." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfModuleName" name="vf-module-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of vf-module" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="orchestration status of this vf-module, mastered by MSO" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="isBaseVfModule" name="is-base-vf-module" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="used to indicate whether or not this object is base vf module" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-invariant-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-version-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="internal" /> + <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelCustomizationId" name="model-customization-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="captures the id of all the configuration used to customize the resource for the service." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="contrailServiceInstanceFqdn" name="contrail-service-instance-fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the Contrail unique ID for a service-instance" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="moduleIndex" name="module-index" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="the index will track the number of modules of a given type that have been deployed in a VNF, starting with 0, and always choosing the lowest available digit" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Path to the controller object." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="a deployment unit of VNFCs" /> + <xml-property name="indexedProps" value="vf-module-id,vf-module-name,heat-stack-id,model-invariant-id,model-version-id,widget-model-id,widget-model-version,contrail-service-instance-fqdn" /> + <xml-property name="searchable" value="vf-module-id,vf-module-name" /> + <xml-property name="dependentOn" value="generic-vnf" /> + <xml-property name="container" value="vf-modules" /> + </xml-properties> + </java-type> + <java-type name="LagLinks"> + <xml-properties> + <xml-property name="description" value="Collection of link aggregation connections" /> + </xml-properties> + <xml-root-element name="lag-links" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lagLink" name="lag-link" type="inventory.aai.onap.org.v10.LagLink" /> + </java-attributes> + </java-type> + <java-type name="LagLink"> + <xml-root-element name="lag-link" /> + <java-attributes> + <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Alphabetical concatenation of lag-interface names" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="LAG links can connect lag-interfaces" /> + <xml-property name="indexedProps" value="link-name" /> + <xml-property name="container" value="lag-links" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="Newvces"> + <xml-properties> + <xml-property name="description" value="This object fills in the gaps from vce that were incorporated into generic-vnf. This object will be retired with vce." /> + </xml-properties> + <xml-root-element name="newvces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="newvce" name="newvce" type="inventory.aai.onap.org.v10.Newvce" /> + </java-attributes> + </java-type> + <java-type name="Newvce"> + <xml-root-element name="newvce" /> + <java-attributes> + <xml-element java-attribute="vnfId2" name="vnf-id2" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF, can't use same attribute name right now until we promote this new object" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded in service-specific ways and clients should expect changes to occur in the future to this field as ECOMP matures." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this VNF by BAU Service Assurance systems." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="OBSOLETE - do not use" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vpe, also used for troubleshooting and is IP used for traps generated by VPE (v4-loopback0-ip-address)." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value, e.g., VPE." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Loopback0Address" name="ipv4-loopback0-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4 Loopback0 address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v10.LInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="This object fills in the gaps from vce that were incorporated into generic-vnf. This object will be retired with vce." /> + <xml-property name="nameProps" value="vnf-name" /> + <xml-property name="indexedProps" value="vnf-name,vnf-name2,vnf-type,heat-stack-id,prov-status,vnf-id2" /> + <xml-property name="searchable" value="vnf-id2,vnf-name,vnf-name2" /> + <xml-property name="uniqueProps" value="vnf-id2" /> + <xml-property name="container" value="newvces" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="Pnfs"> + <xml-properties> + <xml-property name="description" value="Collection of Physical Network Functions." /> + </xml-properties> + <xml-root-element name="pnfs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pnf" name="pnf" type="inventory.aai.onap.org.v10.Pnf" /> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0" /> + </xml-properties> + </java-type> + <java-type name="Pnf"> + <xml-root-element name="pnf" /> + <java-attributes> + <xml-element java-attribute="pnfName" name="pnf-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique name of Physical Network Function." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pnfName2" name="pnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="name of Physical Network Function." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pnfName2Source" name="pnf-name2-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="source of name2" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pnfId" name="pnf-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="id of pnf" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipType" name="equip-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment type. Source of truth should define valid values." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipVendor" name="equip-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment vendor. Source of truth should define valid values." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipModel" name="equip-model" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment model. Source of truth should define valid values." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="identifier of managed by vendor or customer" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Oam" name="ipaddress-v4-oam" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ipv4-oam-address with new naming convention for IP addresses" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="swVersion" name="sw-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="sw-version is the version of SW for the hosted application on the PNF." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false" /> + <xml-property name="description" value="Used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="frameId" name="frame-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of the physical frame (relay rack) where pnf is installed." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serialNumber" name="serial-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Serial number of the device" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Loopback0" name="ipaddress-v4-loopback-0" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV4 Loopback 0 address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Loopback0" name="ipaddress-v6-loopback-0" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 Loopback 0 address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Aim" name="ipaddress-v4-aim" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV4 AIM address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Aim" name="ipaddress-v6-aim" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 AIM address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV6Oam" name="ipaddress-v6-oam" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="IPV6 OAM address" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="invStatus" name="inv-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CANOPI's inventory status. Only set with values exactly as defined by CANOPI." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prov Status of this device (not under canopi control) Valid values [PREPROV/NVTPROV/PROV]" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="nfRole" name="nf-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Nf Role is the role performed by this instance in the network." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="pInterfaces" name="p-interfaces" type="inventory.aai.onap.org.v10.PInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v10.LagInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="PNF represents a physical network function. typically equipment used in the D1 world. in 1607, this will be populated by SDN-C to represent a premises router that a uCPE connects to." /> + <xml-property name="indexedProps" value="pnf-name,orchestration-status,inv-status" /> + <xml-property name="searchable" value="pnf-name" /> + <xml-property name="uniqueProps" value="pnf-name" /> + <xml-property name="container" value="pnfs" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="PhysicalLinks"> + <xml-properties> + <xml-property name="description" value="Collection of physical connections, typically between p-interfaces" /> + </xml-properties> + <xml-root-element name="physical-links" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="physicalLink" name="physical-link" type="inventory.aai.onap.org.v10.PhysicalLink" /> + </java-attributes> + <xml-properties> + <xml-property name="maximumDepth" value="0" /> + </xml-properties> + </java-type> + <java-type name="PhysicalLink"> + <xml-root-element name="physical-link" /> + <java-attributes> + <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="e.g., hostnameA_p-connection_nameA_hostnameZ+p_connection-nameZ" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="circuitId" name="circuit-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Circuit it" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dualMode" name="dual-mode" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Dual access mode (e.g., primary, secondary" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="To provide information on who manages this circuit. A&AI or 3rd party transport provider" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceProviderName" name="service-provider-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the service Provider on this link." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Collection of physical connections, typically between p-interfaces" /> + <xml-property name="indexedProps" value="circuit-id,link-name" /> + <xml-property name="alternateKeys1" value="circuit-id" /> + <xml-property name="container" value="physical-links" /> + <xml-property name="namespace" value="network" /> + <xml-property name="searchable" value="link-name,circuit-id" /> + </xml-properties> + </java-type> + <java-type name="VigServers"> + <xml-root-element name="vig-servers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vigServer" name="vig-server" type="inventory.aai.onap.org.v10.VigServer" /> + </java-attributes> + </java-type> + <java-type name="VigServer"> + <xml-root-element name="vig-server" /> + <java-attributes> + <xml-element java-attribute="vigAddressType" name="vig-address-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="indicates whether the VIG is for AVPN or INTERNET" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="ipaddressV4Vig" name="ipaddress-v4-vig" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4 IP of the vig server" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="ipaddressV6Vig" name="ipaddress-v6-vig" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v6 IP of the vig server" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="vig-server contains information about a vig server used for IPSec-configuration. Populated by SDN-C from 1607" /> + <xml-property name="indexedProps" value="vig-address-type" /> + <xml-property name="dependentOn" value="ipsec-configuration" /> + <xml-property name="container" value="vig-servers" /> + </xml-properties> + </java-type> + <java-type name="IpsecConfigurations"> + <xml-root-element name="ipsec-configurations" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="ipsecConfiguration" name="ipsec-configuration" type="inventory.aai.onap.org.v10.IpsecConfiguration" /> + </java-attributes> + </java-type> + <java-type name="IpsecConfiguration"> + <xml-root-element name="ipsec-configuration" /> + <java-attributes> + <xml-element java-attribute="ipsecConfigurationId" name="ipsec-configuration-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID of this configuration" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedVigAddressType" name="requested-vig-address-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicate the type of VIG server like AVPN, INTERNET, BOTH" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedEncryptionStrength" name="requested-encryption-strength" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encryption values like 3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedDmzType" name="requested-dmz-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Vendor can offer a shared DMZ or a DMZ specific to a customer" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sharedDmzNetworkAddress" name="shared-dmz-network-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network address of shared DMZ" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedCustomerName" name="requested-customer-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="If the DMZ is a custom DMZ, this field will indicate the customer information" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikeVersion" name="ike-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="can be 1 or 2" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1Authentication" name="ikev1-authentication" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contains values like md5, sha1, sha256, sha384" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1Encryption" name="ikev1-encryption" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encyption values like 3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1DhGroup" name="ikev1-dh-group" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Diffie-Hellman group like DH-GROUP2, DH-GROUP5, DH-GROUP14" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1AmGroupId" name="ikev1-am-group-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group name defined in VIG for clients using aggressive mode" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1AmPassword" name="ikev1-am-password" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="pre-shared key for the above group name " /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1SaLifetime" name="ikev1-sa-lifetime" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Lifetime for IKEv1 SA" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecAuthentication" name="ipsec-authentication" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="md5, sha1, sha256, sha384" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecEncryption" name="ipsec-encryption" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecSaLifetime" name="ipsec-sa-lifetime" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Life time for IPSec SA" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecPfs" name="ipsec-pfs" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="enable PFS or not" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="xauthUserId" name="xauth-userid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="user ID for xAuth, sm-user,ucpeHostName,nmteHostName" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="xauthUserPassword" name="xauth-user-password" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encrypted using the Juniper $9$ algorithm" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dpdInterval" name="dpd-interval" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The time between DPD probe" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dpdFrequency" name="dpd-frequency" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Maximum number of DPD before claiming the tunnel is down" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + <xml-element java-attribute="vigServers" name="vig-servers" type="inventory.aai.onap.org.v10.VigServers" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPSec configuration node will contain various configuration data for the NMTE VNF. This node will have an edge to the generic-vnf (vnf type = TE). Starting 1607, this data will be populated by SDN-C" /> + <xml-property name="indexedProps" value="ipsec-configuration-id" /> + <xml-property name="uniqueProps" value="ipsec-configuration-id" /> + <xml-property name="container" value="ipsec-configurations" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="NotificationEvent"> + <xml-root-element name="notification-event" /> + <java-attributes> + <xml-element java-attribute="cambriaPartition" name="cambria.partition" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="eventHeader" name="event-header" type="inventory.aai.onap.org.v10.NotificationEventHeader" /> + <xml-any-element java-attribute="entity" /> + </java-attributes> + </java-type> + <java-type name="NotificationEventHeader"> + <xml-root-element name="notification-event-header" /> + <java-attributes> + <xml-element java-attribute="id" name="id" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="timestamp" name="timestamp" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sourceName" name="source-name" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="domain" name="domain" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sequenceNumber" name="sequence-number" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="severity" name="severity" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="eventType" name="event-type" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="version" name="version" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="action" name="action" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="entityType" name="entity-type" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="topEntityType" name="top-entity-type" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="entityLink" name="entity-link" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="status" name="status" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="AaiInternal"> + <xml-root-element name="aai-internal" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="reservedPropNames" name="reserved-prop-names" type="inventory.aai.onap.org.v10.ReservedPropNames" /> + <xml-element container-type="java.util.ArrayList" java-attribute="edgePropNames" name="edge-prop-names" type="inventory.aai.onap.org.v10.EdgePropNames" /> + </java-attributes> + </java-type> + <java-type name="ReservedPropNames"> + <xml-properties> + <xml-property name="description" value="Internal map to define some reserved properties of a vertex" /> + <xml-property name="uniqueProps" value="aai-unique-key" /> + <xml-property name="indexedProps" value="aai-unique-key,source-of-truth,aai-node-type,aai-uri" /> + </xml-properties> + <xml-root-element name="reserved-prop-names" /> + <java-attributes> + <xml-element java-attribute="lastModSourceOfTruth" name="last-mod-source-of-truth" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="aaiNodeType" name="aai-node-type" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="aaiCreatedTs" name="aai-created-ts" type="java.lang.Long"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="aaiUniqueKey" name="aai-unique-key" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="aaiLastModTs" name="aai-last-mod-ts" type="java.lang.Long"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sourceOfTruth" name="source-of-truth" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="aaiUri" name="aai-uri" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="EdgePropNames"> + <!-- NOTE that the names of these properties are not consistent and are in mixed case and hyphen case for now --> + <xml-properties> + <xml-property name="description" value="Internal map to define the properties of an edge and interpret the map EdgeRules" /> + <xml-property name="edgeInfo" value="edgeLabel,direction,multiplicityRule,isParent,usesResource,hasDelTarget,SVC-INFRA,SVC-INFRA-REV" /> + </xml-properties> + <xml-root-element name="edge-prop-names" /> + <java-attributes> + <xml-element java-attribute="edgeLabel" name="edgeLabel" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="direction" name="direction" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="multiplicityRule" name="multiplicityRule" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isParent" name="isParent" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="usesResource" name="usesResource" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="hasDelTarget" name="hasDelTarget" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="SVC-INFRA" name="SVC-INFRA" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="SVC-INFRA-REV" name="SVC-INFRA-REV" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="Models"> + <xml-properties> + <xml-property name="description" value="Collection of subgraph definitions provided by ASDC to describe the inventory assets and their connections related to ASDC models" /> + </xml-properties> + <xml-root-element name="models" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="model" name="model" type="inventory.aai.onap.org.v10.Model" /> + </java-attributes> + </java-type> + <java-type name="Model"> + <xml-root-element name="model" /> + <xml-properties> + <xml-property name="description" value="Subgraph definition provided by ASDC to describe an inventory asset and its connections related to ASDC models, independent of version" /> + <xml-property name="nameProps" value="model-type" /> + <xml-property name="indexedProps" value="model-invariant-id,model-type" /> + <xml-property name="uniqueProps" value="model-invariant-id" /> + <xml-property name="container" value="models" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + <java-attributes> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier corresponding to the main definition of a model in ASDC" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelType" name="model-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the model, e.g., service, resource, widget, etc." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVers" name="model-vers" type="inventory.aai.onap.org.v10.ModelVers" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + </java-type> + <java-type name="ModelVers"> + <xml-root-element name="model-vers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="modelVer" name="model-ver" type="inventory.aai.onap.org.v10.ModelVer" /> + </java-attributes> + </java-type> + <java-type name="ModelVer"> + <xml-root-element name="model-ver" /> + <xml-properties> + <xml-property name="description" value="Subgraph definition provided by ASDC to describe a specific version of an inventory asset and its connections related to ASDC models" /> + <xml-property name="nameProps" value="model-name" /> + <xml-property name="indexedProps" value="model-version-id,model-name,model-version" /> + <xml-property name="uniqueProps" value="model-version-id" /> + <xml-property name="container" value="model-vers" /> + </xml-properties> + <java-attributes> + <xml-element java-attribute="modelVersionId" name="model-version-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier corresponding to one version of a model in ASDC" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelName" name="model-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the model, which can change from version to version." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersion" name="model-version" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Version" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelDescription" name="model-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelElements" name="model-elements" type="inventory.aai.onap.org.v10.ModelElements" /> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v10.Metadata" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + </java-type> + <java-type name="ModelElements"> + <xml-root-element name="model-elements" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="modelElement" name="model-element" type="inventory.aai.onap.org.v10.ModelElement" /> + </java-attributes> + </java-type> + <java-type name="ModelElement"> + <xml-properties> + <xml-property name="description" value="Defines how other models combine to make up a higher-level model." /> + <xml-property name="uniqueProps" value="model-element-uuid" /> + <xml-property name="indexedProps" value="model-element-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="model-elements" /> + </xml-properties> + <xml-root-element name="model-element" /> + <java-attributes> + <xml-element java-attribute="modelElementUuid" name="model-element-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="newDataDelFlag" name="new-data-del-flag" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates whether this element was created as part of instantiation from this model" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cardinality" name="cardinality" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="How many of this type of element are required/allowed" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="linkagePoints" name="linkage-points" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelElements" name="model-elements" type="inventory.aai.onap.org.v10.ModelElements"> + <xml-properties> + <xml-property name="description" value="Defines how other models combine to make up a higher-level model" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelConstraints" name="model-constraints" type="inventory.aai.onap.org.v10.ModelConstraints"> + <xml-properties> + <xml-property name="description" value="Describes new constraints on this model element that are not part of that model's definition" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + </java-type> + <java-type name="ModelConstraints"> + <xml-root-element name="model-constraints" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="modelConstraint" name="model-constraint" type="inventory.aai.onap.org.v10.ModelConstraint" /> + </java-attributes> + </java-type> + <java-type name="ModelConstraint"> + <xml-properties> + <xml-property name="description" value="This is how we would capture constraints defining allowed sets of elements." /> + <xml-property name="uniqueProps" value="model-constraint-uuid" /> + <xml-property name="indexedProps" value="model-constraint-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="model-constraints" /> + </xml-properties> + <xml-root-element name="model-constraint" /> + <java-attributes> + <xml-element java-attribute="modelConstraintUuid" name="model-constraint-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="constrainedElementSetUuidToReplace" name="constrained-element-set-uuid-to-replace" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="constrainedElementSets" name="constrained-element-sets" type="inventory.aai.onap.org.v10.ConstrainedElementSets" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="ConstrainedElementSets"> + <xml-root-element name="constrained-element-sets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="constrainedElementSet" name="constrained-element-set" type="inventory.aai.onap.org.v10.ConstrainedElementSet" /> + </java-attributes> + </java-type> + <java-type name="ConstrainedElementSet"> + <xml-properties> + <xml-property name="description" value="This is how we would capture constraints defining allowed sets of elements." /> + <xml-property name="uniqueProps" value="constrained-element-set-uuid" /> + <xml-property name="indexedProps" value="constrained-element-set-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="constrained-element-sets" /> + </xml-properties> + <xml-root-element name="constrained-element-set" /> + <java-attributes> + <xml-element java-attribute="constrainedElementSetUuid" name="constrained-element-set-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="constraintType" name="constraint-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="checkType" name="check-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="elementChoiceSets" name="element-choice-sets" type="inventory.aai.onap.org.v10.ElementChoiceSets" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + </java-type> + <java-type name="ElementChoiceSets"> + <xml-root-element name="element-choice-sets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="elementChoiceSet" name="element-choice-set" type="inventory.aai.onap.org.v10.ElementChoiceSet" /> + </java-attributes> + </java-type> + <java-type name="ElementChoiceSet"> + <xml-properties> + <xml-property name="description" value="This is how we would capture constraints defining allowed sets of elements." /> + <xml-property name="uniqueProps" value="element-choice-set-uuid" /> + <xml-property name="indexedProps" value="element-choice-set-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="element-choice-sets" /> + </xml-properties> + <xml-root-element name="element-choice-set" /> + <java-attributes> + <xml-element java-attribute="elementChoiceSetUuid" name="element-choice-set-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="elementChoiceSetName" name="element-choice-set-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cardinality" name="cardinality" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelElements" name="model-elements" type="inventory.aai.onap.org.v10.ModelElements" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + </java-type> + <java-type name="NamedQueries"> + <xml-root-element name="named-queries" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="namedQuery" name="named-query" type="inventory.aai.onap.org.v10.NamedQuery" /> + </java-attributes> + </java-type> + <java-type name="NamedQuery"> + <xml-properties> + <xml-property name="description" value="TBD" /> + <xml-property name="nameProps" value="named-query-name" /> + <xml-property name="uniqueProps" value="named-query-uuid" /> + <xml-property name="indexedProps" value="named-query-uuid,named-query-name" /> + <xml-property name="container" value="named-queries" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + <xml-root-element name="named-query" /> + <java-attributes> + <xml-element java-attribute="namedQueryUuid" name="named-query-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="namedQueryName" name="named-query-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="namedQueryVersion" name="named-query-version" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="requiredInputParams" name="required-input-param" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + <xml-element-wrapper name="required-input-params" /> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="namedQueryElements" name="named-query-elements" type="inventory.aai.onap.org.v10.NamedQueryElements" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + </java-type> + <java-type name="NamedQueryElements"> + <xml-root-element name="named-query-elements" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="namedQueryElement" name="named-query-element" type="inventory.aai.onap.org.v10.NamedQueryElement" /> + </java-attributes> + </java-type> + <java-type name="NamedQueryElement"> + <xml-properties> + <xml-property name="description" value="TBD" /> + <xml-property name="uniqueProps" value="named-query-element-uuid" /> + <xml-property name="indexedProps" value="named-query-element-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="named-query-elements" /> + </xml-properties> + <xml-root-element name="named-query-element" /> + <java-attributes> + <xml-element java-attribute="namedQueryElementUuid" name="named-query-element-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="propertyCollectList" name="property-collect-list" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="propertyLimitDesc" name="property-limit-desc" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="doNotOutput" name="do-not-output" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="namedQueryElements" name="named-query-elements" type="inventory.aai.onap.org.v10.NamedQueryElements" /> + <xml-element java-attribute="relatedLookups" name="related-lookups" type="inventory.aai.onap.org.v10.RelatedLookups" /> + <xml-element java-attribute="propertyConstraints" name="property-constraints" type="inventory.aai.onap.org.v10.PropertyConstraints" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + </java-type> + <java-type name="RelatedLookups"> + <xml-root-element name="related-lookups" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="relatedLookup" name="related-lookup" type="inventory.aai.onap.org.v10.RelatedLookup" /> + </java-attributes> + </java-type> + <java-type name="RelatedLookup"> + <xml-properties> + <xml-property name="description" value="TBD" /> + <xml-property name="uniqueProps" value="related-lookup-uuid" /> + <xml-property name="indexedProps" value="related-lookup-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="related-lookups" /> + </xml-properties> + <xml-root-element name="related-lookup" /> + <java-attributes> + <xml-element java-attribute="relatedLookupUuid" name="related-lookup-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sourceNodeType" name="source-node-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sourceNodeProperty" name="source-node-property" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="targetNodeType" name="target-node-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="targetNodeProperty" name="target-node-property" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="propertyCollectList" name="property-collect-list" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + </java-type> + <java-type name="PropertyConstraints"> + <xml-root-element name="property-constraints" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="propertyConstraint" name="property-constraint" type="inventory.aai.onap.org.v10.PropertyConstraint" /> + </java-attributes> + </java-type> + <java-type name="PropertyConstraint"> + <xml-properties> + <xml-property name="description" value="TBD" /> + <xml-property name="uniqueProps" value="property-constraint-uuid" /> + <xml-property name="indexedProps" value="property-constraint-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="property-constraints" /> + </xml-properties> + <xml-root-element name="property-constraint" /> + <java-attributes> + <xml-element java-attribute="propertyConstraintUuid" name="property-constraint-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="constraintType" name="constraint-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="propertyName" name="property-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="propertyValue" name="property-value" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="ModelAndNamedQuerySearch"> + <xml-properties> + <xml-property name="description" value="ModelAndNamedQuerySearch holds query-parameters and instance-properties for performing a named-query or model query" /> + </xml-properties> + <xml-root-element name="model-and-named-query-search" /> + <java-attributes> + <xml-element java-attribute="queryParameters" name="query-parameters" type="inventory.aai.onap.org.v10.QueryParameters" /> + <xml-element java-attribute="instanceFilters" name="instance-filters" type="inventory.aai.onap.org.v10.InstanceFilters" /> + <xml-element java-attribute="secondaryFilts" name="secondary-filts" type="inventory.aai.onap.org.v10.SecondaryFilts" /> + <xml-element java-attribute="topNodeType" name="top-node-type" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="secondaryFilterCutPoint" name="secondary-filter-cut-point" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="QueryParameters"> + <xml-properties> + <xml-property name="description" value="QueryParameters for performing a named-query or model query" /> + </xml-properties> + <xml-root-element name="query-parameters" /> + <java-attributes> + <xml-element java-attribute="namedQuery" name="named-query" type="inventory.aai.onap.org.v10.NamedQuery" /> + <xml-element java-attribute="model" name="model" type="inventory.aai.onap.org.v10.OverloadedModel" /> + </java-attributes> + </java-type> + <java-type name="OverloadedModel"> + <xml-root-element name="overloaded-model" /> + <xml-properties> + <xml-property name="description" value="Allows for legacy POST of old-style and new-style models" /> + </xml-properties> + <java-attributes> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier corresponding to the main definition of a model in ASDC" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelNameVersionId" name="model-name-version-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier corresponding to one version of a model in ASDC" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelType" name="model-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the model, e.g., service, resource, widget, etc." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelName" name="model-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the model, which can change from version to version." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelId" name="model-id" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Invariant unique ID which does not change from version to version" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersion" name="model-version" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Version" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelDescription" name="model-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVers" name="model-vers" type="inventory.aai.onap.org.v10.ModelVers" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + </java-type> + <java-type name="InstanceFilters"> + <xml-properties> + <xml-property name="description" value="InstanceFilters for performing a named-query or model query" /> + </xml-properties> + <xml-root-element name="instance-filters" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="instanceFilter" name="instance-filter" type="inventory.aai.onap.org.v10.InstanceFilter" /> + </java-attributes> + </java-type> + <java-type name="InstanceFilter"> + <xml-properties> + <xml-property name="description" value="InstanceFilter for performing a named-query or model query" /> + <xml-property name="container" value="instance-filters" /> + </xml-properties> + <xml-root-element name="instance-filter" /> + <java-attributes> + <xml-any-element container-type="java.util.ArrayList" java-attribute="any" lax="true" name="any" /> + </java-attributes> + </java-type> + <java-type name="SecondaryFilts"> + <xml-properties> + <xml-property name="description" value="SecondaryFilts for performing a named-query or model query" /> + </xml-properties> + <xml-root-element name="secondary-filts" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="secondaryFilt" name="secondary-filt" type="inventory.aai.onap.org.v10.SecondaryFilt" /> + </java-attributes> + </java-type> + <java-type name="SecondaryFilt"> + <xml-properties> + <xml-property name="description" value="SecondaryFilt for performing a named-query or model query" /> + </xml-properties> + <xml-root-element name="secondary-filt" /> + <java-attributes> + <xml-any-element container-type="java.util.ArrayList" java-attribute="any" lax="true" name="any" /> + </java-attributes> + </java-type> + <java-type name="Properties"> + <xml-properties> + <xml-property name="description" value="Property holder for query properties or instance properties" /> + </xml-properties> + <xml-root-element name="properties" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + <java-type name="ResponseList"> + <xml-properties> + <xml-property name="description" value="Response container for the results of a named-query or model query" /> + </xml-properties> + <xml-root-element name="response-list" /> + <java-attributes> + <xml-element java-attribute="inventoryResponseItems" name="inventory-response-items" type="inventory.aai.onap.org.v10.InventoryResponseItems" /> + </java-attributes> + </java-type> + <java-type name="InventoryResponseItems"> + <xml-properties> + <xml-property name="description" value="Container for inventory items in response list" /> + <xml-property name="container" value="response-list" /> + </xml-properties> + <xml-root-element name="inventory-response-items" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="inventoryResponseItem" name="inventory-response-item" type="inventory.aai.onap.org.v10.InventoryResponseItem" /> + </java-attributes> + </java-type> + <java-type name="InventoryResponseItem"> + <xml-properties> + <xml-property name="description" value="Inventory item for response list" /> + <xml-property name="container" value="inventory-response-items" /> + </xml-properties> + <xml-root-element name="inventory-response-item" /> + <java-attributes> + <xml-element java-attribute="modelName" name="model-name" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-any-element java-attribute="item" /> + <xml-element java-attribute="extraProperties" name="extra-properties" type="inventory.aai.onap.org.v10.ExtraProperties" /> + <xml-element java-attribute="inventoryResponseItems" name="inventory-response-items" type="inventory.aai.onap.org.v10.InventoryResponseItems" /> + </java-attributes> + </java-type> + <java-type name="ExtraProperties"> + <xml-properties> + <xml-property name="description" value="Extra properties for inventory item for response list" /> + </xml-properties> + <xml-root-element name="extra-properties" /> + <java-attributes> + <xml-any-element container-type="java.util.ArrayList" java-attribute="extraProperty" name="extra-property" type="inventory.aai.onap.org.v10.ExtraProperty" /> + </java-attributes> + </java-type> + <java-type name="ExtraProperty"> + <xml-root-element name="extra-property" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String"> + <xml-properties> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-any-element java-attribute="propertyValue" lax="true" name="property-value" /> + </java-attributes> + </java-type> + <java-type name="RouteTableReferences"> + <xml-properties> + <xml-property name="description" value="Collection of openstack route table references" /> + </xml-properties> + <xml-root-element name="route-table-references" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="routeTableReference" name="route-table-reference" type="inventory.aai.onap.org.v10.RouteTableReference" /> + </java-attributes> + </java-type> + <java-type name="RouteTableReference"> + <xml-root-element name="route-table-reference" /> + <java-attributes> + <xml-element java-attribute="routeTableReferenceId" name="route-table-reference-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Route Table Reference id, UUID assigned to this instance." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="routeTableReferenceFqdn" name="route-table-reference-fqdn" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="FQDN entry in the route table." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack route table reference." /> + <xml-property name="nameProps" value="route-table-reference-fqdn" /> + <xml-property name="uniqueProps" value="route-table-reference-id" /> + <xml-property name="indexedProps" value="route-table-reference-id,route-table-reference-fqdn" /> + <xml-property name="container" value="route-table-references" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="InstanceGroups"> + <xml-properties> + <xml-property name="description" value="Collection of openstack route table references" /> + </xml-properties> + <xml-root-element name="instance-groups" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="instanceGroup" name="instance-group" type="inventory.aai.onap.org.v10.InstanceGroup" /> + </java-attributes> + </java-type> + <java-type name="InstanceGroup"> + <xml-root-element name="instance-group" /> + <java-attributes> + <xml-element java-attribute="id" name="id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Instance Group ID, UUID assigned to this instance." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Descriptive text to help identify the usage of this instance-group" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="type" name="type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Only valid value today is lower case ha for high availability" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="subType" name="sub-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Valid values for ha type are [geo-activeactive, geo-activestandby, local-activeactive, local-activestandby]" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="General mechanism for grouping instances" /> + <xml-property name="nameProps" value="description" /> + <xml-property name="uniqueProps" value="id" /> + <xml-property name="searchable" value="id,description"/> + <xml-property name="indexedProps" value="id,description,type,sub-type" /> + <xml-property name="container" value="instance-groups" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="SegmentationAssignments"> + <xml-properties> + <xml-property name="description" value="Collection of openstack segmentation assignments" /> + </xml-properties> + <xml-root-element name="segmentation-assignments" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="segmentationAssignment" name="segmentation-assignment" type="inventory.aai.onap.org.v10.SegmentationAssignment" /> + </java-attributes> + </java-type> + <java-type name="SegmentationAssignment"> + <xml-root-element name="segmentation-assignment" /> + <java-attributes> + <xml-element java-attribute="segmentationId" name="segmentation-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Route Table Reference id, UUID assigned to this instance." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack segmentation assignment." /> + <xml-property name="indexedProps" value="segmentation-id" /> + <xml-property name="dependentOn" value="l3-network" /> + <xml-property name="container" value="segmentation-assignments" /> + </xml-properties> + </java-type> + <java-type name="AllottedResources"> + <xml-properties> + <xml-property name="description" value="This object is used to store slices of services being offered" /> + </xml-properties> + <xml-root-element name="allotted-resources" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="allottedResource" name="allotted-resource" type="inventory.aai.onap.org.v10.AllottedResource" /> + </java-attributes> + </java-type> + <java-type name="AllottedResource"> + <xml-root-element name="allotted-resource" /> + <java-attributes> + <xml-element java-attribute="id" name="id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Allotted Resource id UUID assigned to this instance." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The descriptive information assigned to this allotted resource instance" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Link back to more information in the controller" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelInvariantId" name="model-invariant-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-invariant-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersionId" name="model-version-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="deployment" /> + <xml-property name="dbAlias" value="model-version-id-local" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + <xml-property name="visibility" value="internal" /> + <xml-property name="dataCopy" value="service-design-and-creation/models/model/{model-invariant-id}/model-vers/model-ver/{model-version-id}#model-version" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="type" name="type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Generic description of the type of allotted resource." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="role" name="role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="role in the network that this resource will be providing." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="tunnelXconnects" name="tunnel-xconnects" type="inventory.aai.onap.org.v10.TunnelXconnects" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Represents a slice or partial piece of a resource that gets separately allotted" /> + <xml-property name="nameProps" value="description" /> + <xml-property name="uniqueProps" value="id" /> + <xml-property name="indexedProps" value="id,model-invariant-id,model-version-id,type,role" /> + <xml-property name="dependentOn" value="service-instance" /> + <xml-property name="container" value="allotted-resources" /> + <!-- <xml-property name="namespace" value="network" /> --> + </xml-properties> + </java-type> + <java-type name="TunnelXconnects"> + <xml-properties> + <xml-property name="description" value="This object is used to store the specific tunnel cross connect aspects of an allotted resource" /> + </xml-properties> + <xml-root-element name="tunnel-xconnects" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="tunnelXconnect" name="tunnel-xconnect" type="inventory.aai.onap.org.v10.TunnelXconnect" /> + </java-attributes> + </java-type> + <java-type name="TunnelXconnect"> + <xml-root-element name="tunnel-xconnect" /> + <java-attributes> + <xml-element java-attribute="id" name="id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Allotted Resource id UUID assigned to this instance." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthUpWan1" name="bandwidth-up-wan1" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The WAN uplink bandwidth for WAN1" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthDownWan1" name="bandwidth-down-wan1" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The WAN downlink bandwidth for WAN1" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthUpWan2" name="bandwidth-up-wan2" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The WAN uplink bandwidth for WAN2" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthDownWan2" name="bandwidth-down-wan2" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The WAN downlink bandwidth for WAN2" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Represents the specifics of a tunnel cross connect piece of a resource that gets separately allotted" /> + <xml-property name="uniqueProps" value="id" /> + <xml-property name="indexedProps" value="id" /> + <xml-property name="dependentOn" value="allotted-resource" /> + <xml-property name="container" value="tunnel-xconnects" /> + <!-- <xml-property name="namespace" value="network" /> --> + </xml-properties> + </java-type> + <java-type name="Entitlements"> + <xml-properties> + <xml-property name="description" value="Entitlements, keyed by group-uuid and resource-uuid, related to license management" /> + </xml-properties> + <xml-root-element name="entitlements" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="entitlement" name="entitlement" type="inventory.aai.onap.org.v10.Entitlement" /> + </java-attributes> + </java-type> + <java-type name="Entitlement"> + <xml-root-element name="entitlement" /> + <java-attributes> + <xml-element java-attribute="groupUuid" name="group-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID for the entitlement group the resource comes from, should be uuid." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceUuid" name="resource-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of an entitlement resource. " /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Metadata for entitlement group." /> + <xml-property name="indexedProps" value="group-uuid,resource-uuid" /> + <xml-property name="dependentOn" value="generic-vnf,vce,vpe" /> + <xml-property name="container" value="entitlements" /> + </xml-properties> + </java-type> + <java-type name="Licenses"> + <xml-properties> + <xml-property name="description" value="Licenses to be allocated across resources, keyed by group-uuid and resource-uuid, related to license management" /> + </xml-properties> + <xml-root-element name="licenses" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="license" name="license" type="inventory.aai.onap.org.v10.License" /> + </java-attributes> + </java-type> + <java-type name="License"> + <xml-root-element name="license" /> + <java-attributes> + <xml-element java-attribute="groupUuid" name="group-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID for the license group the resource belongs to, should be uuid." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceUuid" name="resource-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of a license resource. " /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Metadata for license group." /> + <xml-property name="indexedProps" value="group-uuid,resource-uuid" /> + <xml-property name="dependentOn" value="generic-vnf,vce,vpe" /> + <xml-property name="container" value="licenses" /> + </xml-properties> + </java-type> + <java-type name="Vnf"> + <xml-root-element name="vnf" /> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Abstract vnf class" /> + <xml-property name="indexedProps" value="vnf-id" /> + <xml-property name="uniqueProps" value="vnf-id" /> + <xml-property name="inheritors" value="vce,vpe,generic-vnf" /> + <xml-property name="abstract" value="true" /> + </xml-properties> + </java-type> + <java-type name="Zones"> + <xml-properties> + <xml-property name="description" value="Collection of zones" /> + </xml-properties> + <xml-root-element name="zones" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="zone" name="zone" type="inventory.aai.onap.org.v10.Zone" /> + </java-attributes> + </java-type> + <java-type name="Zone"> + <xml-root-element name="zone" /> + <java-attributes> + <xml-element java-attribute="zoneId" name="zone-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Code assigned by AIC to the zone" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="zoneName" name="zone-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="English name associated with the zone" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="designType" name="design-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Design of zone [Medium/Large…]" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="zoneContext" name="zone-context" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Context of zone [production/test]" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="status" name="status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Status of a zone." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="A zone is a grouping of assets in a location homing to the same connections into the CBB" /> + <xml-property name="nameProps" value="zone-name" /> + <xml-property name="indexedProps" value="zone-id,design-type,zone-context" /> + <xml-property name="uniqueProps" value="zone-id" /> + <xml-property name="container" value="zones" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="RouteTargets"> + <xml-properties> + <xml-property name="description" value="Collection of route target information" /> + </xml-properties> + <xml-root-element name="route-targets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="routeTarget" name="route-target" type="inventory.aai.onap.org.v10.RouteTarget" /> + </java-attributes> + </java-type> + <java-type name="RouteTarget"> + <xml-root-element name="route-target" /> + <java-attributes> + <xml-element java-attribute="globalRouteTarget" name="global-route-target" required="true" xml-key="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Number used to identify an RT, globally unique in the network" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="routeTargetRole" name="route-target-role" required="true" xml-key="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role assigned to this route target" /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + <xml-property name="source-of-truth-type" value="aai" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v10.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Route target information" /> + <xml-property name="container" value="route-targets" /> + <xml-property name="dependentOn" value="vpn-binding" /> + </xml-properties> + </java-type> + </java-types> +</xml-bindings>
\ No newline at end of file diff --git a/src/test/resources/oxm-reader/single/aai_oxm_v8.xml b/src/test/resources/oxm-reader/single/aai_oxm_v8.xml new file mode 100644 index 0000000..40939a4 --- /dev/null +++ b/src/test/resources/oxm-reader/single/aai_oxm_v8.xml @@ -0,0 +1,4362 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- +============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===================================================== +--> +<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v8" xml-mapping-metadata-complete="true"> + <xml-schema element-form-default="QUALIFIED"> + <xml-ns namespace-uri="http://org.openecomp.aai.inventory/v8" /> + </xml-schema> + <java-types> + <java-type name="Inventory"> + <xml-root-element name="inventory" /> + <java-attributes> + <xml-element java-attribute="search" name="search" type="inventory.aai.onap.org.v8.Search" /> + <xml-element java-attribute="actions" name="actions" type="inventory.aai.onap.org.v8.Actions" /> + <xml-element java-attribute="cloudInfrastructure" name="cloud-infrastructure" type="inventory.aai.onap.org.v8.CloudInfrastructure" /> + <xml-element java-attribute="licenseManagement" name="license-management" type="inventory.aai.onap.org.v8.LicenseManagement" /> + <xml-element java-attribute="business" name="business" type="inventory.aai.onap.org.v8.Business" /> + <xml-element java-attribute="serviceDesignAndCreation" name="service-design-and-creation" type="inventory.aai.onap.org.v8.ServiceDesignAndCreation" /> + <xml-element java-attribute="network" name="network" type="inventory.aai.onap.org.v8.Network" /> + <xml-element java-attribute="aaiInternal" name="aai-internal" type="inventory.aai.onap.org.v8.AaiInternal" /> + </java-attributes> + </java-type> + + <java-type name="Search"> + <xml-root-element name="search" /> + <java-attributes> + <xml-element java-attribute="edgeTagQueryResult" name="edge-tag-query-result" type="inventory.aai.onap.org.v8.EdgeTagQueryResult" /> + <xml-element java-attribute="edgeTagQueryRequest" name="edge-tag-query-request" type="inventory.aai.onap.org.v8.EdgeTagQueryRequest" /> + <xml-element java-attribute="searchResults" name="search-results" type="inventory.aai.onap.org.v8.SearchResults" /> + <xml-element java-attribute="sdnZoneResponse" name="sdn-zone-response" type="inventory.aai.onap.org.v8.SdnZoneResponse" /> + </java-attributes> + </java-type> + + <java-type name="EdgeTagQueryResult"> + <xml-root-element name="edge-tag-query-result" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="taggedInventoryItemList" name="tagged-inventory-item-list" type="inventory.aai.onap.org.v8.TaggedInventoryItemList" /> + </java-attributes> + </java-type> + + <java-type name="TaggedInventoryItemList"> + <xml-root-element name="tagged-inventory-item-list" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="inventoryItem" name="inventory-item" type="inventory.aai.onap.org.v8.InventoryItem" /> + </java-attributes> + </java-type> + + <java-type name="InventoryItem"> + <xml-root-element name="inventory-item" /> + <java-attributes> + <xml-element java-attribute="inventoryItemType" name="inventory-item-type" type="java.lang.String" /> + <xml-element java-attribute="inventoryItemLink" name="inventory-item-link" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="inventoryItemData" name="inventory-item-data" type="inventory.aai.onap.org.v8.InventoryItemData" /> + <xml-element container-type="java.util.ArrayList" java-attribute="taggedInventoryItemList" name="tagged-inventory-item-list" type="inventory.aai.onap.org.v8.TaggedInventoryItemList" /> + </java-attributes> + </java-type> + + <java-type name="InventoryItemData"> + <xml-root-element name="inventory-item-data" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String" /> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="EdgeTagQueryRequest"> + <xml-root-element name="edge-tag-query-request" /> + <java-attributes> + <xml-element java-attribute="edgeTag" name="edge-tag" type="java.lang.String" /> + <xml-element java-attribute="resultDetail" name="result-detail" type="java.lang.String" /> + <xml-element java-attribute="startNodeType" name="start-node-type" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="startNodeFilter" name="start-node-filter" type="inventory.aai.onap.org.v8.StartNodeFilter" /> + <xml-element container-type="java.util.ArrayList" java-attribute="includeNodeFilter" name="include-node-filter" type="inventory.aai.onap.org.v8.IncludeNodeFilter" /> + <xml-element container-type="java.util.ArrayList" java-attribute="secondaryFilter" name="secondary-filter" type="inventory.aai.onap.org.v8.SecondaryFilter" /> + </java-attributes> + </java-type> + + <java-type name="StartNodeFilter"> + <xml-root-element name="start-node-filter" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String" /> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="IncludeNodeFilter"> + <xml-root-element name="include-node-filter" /> + <java-attributes> + <xml-element java-attribute="includeNodeType" name="include-node-type" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="SecondaryFilter"> + <xml-root-element name="secondary-filter" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String" /> + <xml-element java-attribute="filterType" name="filter-type" type="java.lang.String" /> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="SearchResults"> + <xml-root-element name="search-results" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="resultData" name="result-data" type="inventory.aai.onap.org.v8.ResultData" /> + </java-attributes> + </java-type> + + <java-type name="ResultData"> + <xml-root-element name="result-data" /> + <java-attributes> + <xml-element java-attribute="resourceType" name="resource-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The specific type of node in the A&AI graph" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceLink" name="resource-link" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The URL to the specific resource" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + + <java-type name="SdnZoneResponse"> + <xml-root-element name="sdn-zone-response" /> + <java-attributes> + <xml-element java-attribute="oamNetworks" name="oam-networks" type="inventory.aai.onap.org.v8.OamNetworks" /> + <xml-element container-type="java.util.ArrayList" java-attribute="azAndDvsSwitches" name="az-and-dvs-switches" type="inventory.aai.onap.org.v8.AzAndDvsSwitches" /> + </java-attributes> + </java-type> + + <java-type name="AzAndDvsSwitches"> + <xml-root-element name="az-and-dvs-switches" /> + <java-attributes> + <xml-element java-attribute="dvsSwitches" name="dvs-switches" type="inventory.aai.onap.org.v8.DvsSwitches" /> + <xml-element java-attribute="availabilityZone" name="availability-zone" type="inventory.aai.onap.org.v8.AvailabilityZone" /> + </java-attributes> + </java-type> + + <java-type name="Actions"> + <xml-properties> + <xml-property name="description" value="APIs that are more action related than REST (e.g., notify, update)." /> + </xml-properties> + <xml-root-element name="actions" /> + <java-attributes> + <xml-element java-attribute="update" name="update" type="inventory.aai.onap.org.v8.Update" /> + <xml-element java-attribute="notify" name="notify" type="inventory.aai.onap.org.v8.Notify" /> + </java-attributes> + </java-type> + + <java-type name="Update"> + <xml-properties> + <xml-property name="description" value="Serves a PATCH like function. Does not enforce concurrency control. Clear each usage with AAI team." /> + </xml-properties> + <xml-root-element name="update" /> + <java-attributes> + <xml-element java-attribute="updateNodeType" name="update-node-type" required="true" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="updateNodeKey" name="update-node-key" type="inventory.aai.onap.org.v8.UpdateNodeKey" /> + <xml-element java-attribute="updateNodeUri" name="update-node-uri" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="action" name="action" type="inventory.aai.onap.org.v8.Action" /> + </java-attributes> + </java-type> + + <java-type name="Action"> + <xml-root-element name="action" /> + <java-attributes> + <xml-element java-attribute="actionType" name="action-type" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="actionData" name="action-data" type="inventory.aai.onap.org.v8.ActionData" /> + </java-attributes> + </java-type> + + <java-type name="ActionData"> + <xml-root-element name="action-data" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String" /> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="UpdateNodeKey"> + <xml-root-element name="update-node-key" /> + <java-attributes> + <xml-element java-attribute="keyName" name="key-name" type="java.lang.String" /> + <xml-element java-attribute="keyValue" name="key-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="Notify"> + <xml-root-element name="notify" /> + <java-attributes> + <xml-element java-attribute="eventId" name="event-id" required="true" type="java.lang.String" /> + <xml-element java-attribute="nodeType" name="node-type" type="java.lang.String" /> + <xml-element java-attribute="eventTrigger" name="event-trigger" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="keyData" name="key-data" type="inventory.aai.onap.org.v8.KeyData" /> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="KeyData"> + <xml-root-element name="key-data" /> + <java-attributes> + <xml-element java-attribute="keyName" name="key-name" type="java.lang.String" /> + <xml-element java-attribute="keyValue" name="key-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="CloudInfrastructure"> + <xml-properties> + <xml-property name="description" value="Namespace for cloud infrastructure." /> + </xml-properties> + <xml-root-element name="cloud-infrastructure" /> + <java-attributes> + <xml-element java-attribute="complexes" name="complexes" type="inventory.aai.onap.org.v8.Complexes" /> + <xml-element java-attribute="cloudRegions" name="cloud-regions" type="inventory.aai.onap.org.v8.CloudRegions" /> + <xml-element java-attribute="networkProfiles" name="network-profiles" type="inventory.aai.onap.org.v8.NetworkProfiles" /> + <xml-element java-attribute="pservers" name="pservers" type="inventory.aai.onap.org.v8.Pservers" /> + <xml-element java-attribute="virtualDataCenters" name="virtual-data-centers" type="inventory.aai.onap.org.v8.VirtualDataCenters" /> + </java-attributes> + </java-type> + + <java-type name="CloudRegions"> + <xml-root-element name="cloud-regions" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="cloudRegion" name="cloud-region" type="inventory.aai.onap.org.v8.CloudRegion" /> + </java-attributes> + </java-type> + + <java-type name="CloudRegion"> + <xml-root-element name="cloud-region" /> + <java-attributes> + <xml-element java-attribute="cloudOwner" name="cloud-owner" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Identifies the vendor and cloud name, e.g., vendor-cloudname. First part of composite key should be formatted as vendor-cloudname" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudRegionId" name="cloud-region-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Identifier used by the vendor for the region. Second part of composite key" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudType" name="cloud-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the cloud (e.g., openstack)" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ownerDefinedType" name="owner-defined-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Cloud-owner defined type indicator (e.g., DCP, LCP)" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudRegionVersion" name="cloud-region-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Software version employed at the site" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="identityUrl" name="identity-url" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL of the keystone identity service" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudZone" name="cloud-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Zone where the cloud is homed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="complexName" name="complex-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="complex name for cloud-region instance" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumeGroups" name="volume-groups" type="inventory.aai.onap.org.v8.VolumeGroups" /> + <xml-element java-attribute="tenants" name="tenants" type="inventory.aai.onap.org.v8.Tenants" /> + <xml-element java-attribute="flavors" name="flavors" type="inventory.aai.onap.org.v8.Flavors" /> + <xml-element java-attribute="images" name="images" type="inventory.aai.onap.org.v8.Images" /> + <xml-element java-attribute="dvsSwitches" name="dvs-switches" type="inventory.aai.onap.org.v8.DvsSwitches" /> + <xml-element java-attribute="oamNetworks" name="oam-networks" type="inventory.aai.onap.org.v8.OamNetworks" /> + <xml-element java-attribute="availabilityZones" name="availability-zones" type="inventory.aai.onap.org.v8.AvailabilityZones" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="cloud-region designates an installation of a cloud cluster or region or instantiation" /> + <xml-property name="indexedProps" value="cloud-owner,cloud-region-id,cloud-type,owner-defined-type" /> + <xml-property name="nameProps" value="owner-defined-type" /> + <xml-property name="container" value="cloud-regions" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + <java-type name="VolumeGroups"> + <xml-properties> + <xml-property name="description" value="Collection of persistent block-level storage." /> + </xml-properties> + <xml-root-element name="volume-groups" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="volumeGroup" name="volume-group" type="inventory.aai.onap.org.v8.VolumeGroup" /> + </java-attributes> + </java-type> + + <java-type name="VolumeGroup"> + <xml-root-element name="volume-group" /> + <java-attributes> + <xml-element java-attribute="volumeGroupId" name="volume-group-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of volume-group." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumeGroupName" name="volume-group-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the volume group." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this volume-group" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this volume-group" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Persistent block-level storage." /> + <xml-property name="indexedProps" value="volume-group-name,vnf-type,heat-stack-id,volume-group-id" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="volume-groups" /> + </xml-properties> + </java-type> + + <java-type name="RelationshipList"> + <xml-root-element name="relationship-list" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="relationship" name="relationship" type="inventory.aai.onap.org.v8.Relationship" /> + </java-attributes> + </java-type> + + <java-type name="Relationship"> + <xml-root-element name="relationship" /> + <java-attributes> + <xml-element java-attribute="relatedTo" name="related-to" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="A keyword provided by A&AI to indicate type of node." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relatedLink" name="related-link" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to the object in A&AI." /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="relationshipData" name="relationship-data" type="inventory.aai.onap.org.v8.RelationshipData" /> + <xml-element container-type="java.util.ArrayList" java-attribute="relatedToProperty" name="related-to-property" type="inventory.aai.onap.org.v8.RelatedToProperty" /> + </java-attributes> + </java-type> + + <java-type name="RelatedToProperty"> + <xml-root-element name="related-to-property" /> + <java-attributes> + <xml-element java-attribute="propertyKey" name="property-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Key part of a key/value pair" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Value part of a key/value pair" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + + <java-type name="RelationshipData"> + <xml-root-element name="relationship-data" /> + <java-attributes> + <xml-element java-attribute="relationshipKey" name="relationship-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="A keyword provided by A&AI to indicate an attribute." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipValue" name="relationship-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Value of the attribute." /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + + <java-type name="Complexes"> + <xml-properties> + <xml-property name="description" value="Collection of physical locations that can house cloud-regions." /> + </xml-properties> + <xml-root-element name="complexes" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="complex" name="complex" type="inventory.aai.onap.org.v8.Complex" /> + </java-attributes> + </java-type> + + <java-type name="Complex"> + <xml-root-element name="complex" /> + <java-attributes> + <xml-element java-attribute="physicalLocationId" name="physical-location-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier for physical location, e.g., CLLI" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataCenterCode" name="data-center-code" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Data center code which can be an alternate way to identify a complex" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="complexName" name="complex-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Gamma complex name for LCP instance." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="identityUrl" name="identity-url" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL of the keystone identity service" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="physicalLocationType" name="physical-location-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type, e.g., central office, data center." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="street1" name="street1" required="true" type="java.lang.String" /> + <xml-element java-attribute="street2" name="street2" type="java.lang.String" /> + <xml-element java-attribute="city" name="city" required="true" type="java.lang.String" /> + <xml-element java-attribute="state" name="state" type="java.lang.String" /> + <xml-element java-attribute="postalCode" name="postal-code" required="true" type="java.lang.String" /> + <xml-element java-attribute="country" name="country" required="true" type="java.lang.String" /> + <xml-element java-attribute="region" name="region" required="true" type="java.lang.String" /> + <xml-element java-attribute="latitude" name="latitude" type="java.lang.String" /> + <xml-element java-attribute="longitude" name="longitude" type="java.lang.String" /> + <xml-element java-attribute="elevation" name="elevation" type="java.lang.String" /> + <xml-element java-attribute="lata" name="lata" type="java.lang.String" /> + <xml-element java-attribute="ctagPools" name="ctag-pools" type="inventory.aai.onap.org.v8.CtagPools" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Collection of physical locations that can house cloud-regions." /> + <xml-property name="indexedProps" value="identity-url,data-center-code,complex-name,physical-location-id" /> + <xml-property name="uniqueProps" value="physical-location-id" /> + <xml-property name="container" value="complexes" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + + <java-type name="CtagPools"> + <xml-root-element name="ctag-pools" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="ctagPool" name="ctag-pool" type="inventory.aai.onap.org.v8.CtagPool" /> + </java-attributes> + </java-type> + + <java-type name="CtagPool"> + <xml-root-element name="ctag-pool" /> + <java-attributes> + <xml-element java-attribute="targetPe" name="target-pe" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="The Target provider edge router" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="availabilityZoneName" name="availability-zone-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name of the availability zone" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ctagPoolPurpose" name="ctag-pool-purpose" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Describes what the intended purpose of this pool is." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ctagValues" name="ctag-values" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Comma separated list of ctags" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="A collection of C tags (vlan tags) grouped for a specific purpose." /> + <xml-property name="indexedProps" value="availability-zone-name" /> + <xml-property name="dependentOn" value="complex" /> + <xml-property name="container" value="ctag-pools" /> + </xml-properties> + </java-type> + + <java-type name="Tenants"> + <xml-properties> + <xml-property name="description" value="Collection of openstack tenants." /> + </xml-properties> + <xml-root-element name="tenants" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="tenant" name="tenant" type="inventory.aai.onap.org.v8.Tenant" /> + </java-attributes> + </java-type> + + <java-type name="Tenant"> + <xml-root-element name="tenant" /> + <java-attributes> + <xml-element java-attribute="tenantId" name="tenant-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id relative to the cloud-region." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="tenantName" name="tenant-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Readable name of tenant" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vservers" name="vservers" type="inventory.aai.onap.org.v8.Vservers" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack tenant" /> + <xml-property name="nameProps" value="tenant-name" /> + <xml-property name="indexedProps" value="tenant-name,tenant-id" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="tenants" /> + </xml-properties> + </java-type> + + <java-type name="Vservers"> + <xml-properties> + <xml-property name="description" value="Collection of virtual Servers, aka virtual machines or VMs." /> + </xml-properties> + <xml-root-element name="vservers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vserver" name="vserver" type="inventory.aai.onap.org.v8.Vserver" /> + </java-attributes> + </java-type> + + <java-type name="Vserver"> + <xml-root-element name="vserver" /> + <java-attributes> + <xml-element java-attribute="vserverId" name="vserver-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier for this vserver relative to its tenant" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vserverName" name="vserver-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of vserver" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vserverName2" name="vserver-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternative name of vserver" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vserverSelflink" name="vserver-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isClosedLoopDisabled" name="is-closed-loop-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Used to indicate whether closed loop function is enabled on this node" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumes" name="volumes" type="inventory.aai.onap.org.v8.Volumes" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v8.LInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Virtual Servers, aka virtual machine or VM." /> + <xml-property name="nameProps" value="vserver-name" /> + <xml-property name="indexedProps" value="is-closed-loop-disabled,prov-status,vserver-name,vserver-id,in-maint,vserver-name2" /> + <xml-property name="dependentOn" value="tenant" /> + <xml-property name="container" value="vservers" /> + </xml-properties> + </java-type> + + <java-type name="LInterfaces"> + <xml-properties> + <xml-property name="description" value="Collection of logical interfaces." /> + </xml-properties> + <xml-root-element name="l-interfaces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lInterface" name="l-interface" type="inventory.aai.onap.org.v8.LInterface" /> + </java-attributes> + </java-type> + + <java-type name="LInterface"> + <xml-root-element name="l-interface" /> + <java-attributes> + <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name given to the interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="E.g., CUSTOMER, UPLINK, etc." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="v6WanLinkIp" name="v6-wan-link-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Questionably placed - v6 ip addr of this interface (is in vr-lan-interface from Mary B." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceId" name="interface-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="macaddr" name="macaddr" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="MAC address for the interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkName" name="network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the network" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Whether A&AI should be managing this interface of not. Could have value like CUSTOMER" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlans" name="vlans" type="inventory.aai.onap.org.v8.Vlans" /> + <xml-element java-attribute="sriovVfs" name="sriov-vfs" type="inventory.aai.onap.org.v8.SriovVfs" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv4AddressList" name="l3-interface-ipv4-address-list" type="inventory.aai.onap.org.v8.L3InterfaceIpv4AddressList" /> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv6AddressList" name="l3-interface-ipv6-address-list" type="inventory.aai.onap.org.v8.L3InterfaceIpv6AddressList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Logical interfaces, e.g., a vnic." /> + <xml-property name="indexedProps" value="macaddr,interface-id,interface-name,network-name" /> + <xml-property name="dependentOn" value="generic-vnf,newvce,vpe,p-interface,vserver,lag-interface" /> + <xml-property name="container" value="l-interfaces" /> + </xml-properties> + </java-type> + + <java-type name="SriovVfs"> + <xml-properties> + <xml-property name="description" value="Collection of SR-IOV Virtual Functions." /> + </xml-properties> + <xml-root-element name="sriov-vfs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sriovVf" name="sriov-vf" type="inventory.aai.onap.org.v8.SriovVf" /> + </java-attributes> + </java-type> + <java-type name="SriovVf"> + <xml-root-element name="sriov-vf" /> + <java-attributes> + <xml-element java-attribute="pciId" name="pci-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="PCI ID used to identify the sriov-vf" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfVlanFilter" name="vf-vlan-filter" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This metadata provides option to specify list of VLAN filters applied on VF to pass the traffic to VM." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfMacFilter" name="vf-mac-filter" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="When MAC filters are specified, VF-agent service configures VFs to do MAC level filtering before the traffic is passed to VM." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfVlanStrip" name="vf-vlan-strip" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="When this field is set to true, VF will configured to strip the outer TAG before the traffic is passed to VM." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfVlanAntiSpoofCheck" name="vf-vlan-anti-spoof-check" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option ensures anti VLAN spoof checks are done at the VF level to comply with security. The disable check will also be honored per the VNF needs for trusted VMs." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfMacAntiSpoofCheck" name="vf-mac-anti-spoof-check" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option ensures anti MAC spoof checks are done at the VF level to comply with security. The disable check will also be honored per the VNF needs for trusted VMs." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfMirrors" name="vf-mirrors" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This option defines the set of Mirror objects which essentially mirrors the traffic from source to set of collector VNF Ports." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfBroadcastAllow" name="vf-broadcast-allow" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, sets the VF in promiscuous mode and allows all broadcast traffic to reach the VM" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfUnknownMulticastAllow" name="vf-unknown-multicast-allow" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, sets the VF in promiscuous mode and allows unknown multicast traffic to reach the VM" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfUnknownUnicastAllow" name="vf-unknown-unicast-allow" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, sets the VF in promiscuous mode and allows unknown unicast traffic to reach the VM" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfInsertStag" name="vf-insert-stag" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, instructs to insert outer tag after traffic comes out of VM." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfLinkStatus" name="vf-link-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This option is used to set the link status. Valid values as of 1607 are on, off, and auto." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="SR-IOV Virtual Function (not to be confused with virtual network function)" /> + <xml-property name="indexedProps" value="pci-id,vf-vlan-filter,vf-mac-filter,vf-vlan-strip,neutron-network-id" /> + <xml-property name="dependentOn" value="l-interface" /> + <xml-property name="container" value="sriov-vfs" /> + </xml-properties> + </java-type> + + <java-type name="L3InterfaceIpv4AddressList"> + <xml-root-element name="l3-interface-ipv4-address-list" /> + <java-attributes> + <xml-element java-attribute="l3InterfaceIpv4Address" name="l3-interface-ipv4-address" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="IP address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="l3InterfaceIpv4PrefixLength" name="l3-interface-ipv4-prefix-length" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Prefix length, 32 for single address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isFloating" name="is-floating" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Indicator of fixed or floating address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface that address belongs to" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of subnet that address belongs to" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPv4 Address Range" /> + <xml-property name="indexedProps" value="l3-interface-ipv4-address,vlan-id-inner,neutron-network-id,neutron-subnet-id" /> + <xml-property name="dependentOn" value="vlan,l-interface" /> + </xml-properties> + </java-type> + + <java-type name="Vlans"> + <xml-root-element name="vlans" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vlan" name="vlan" type="inventory.aai.onap.org.v8.Vlan" /> + </java-attributes> + </java-type> + + <java-type name="Vlan"> + <xml-root-element name="vlan" /> + <java-attributes> + <xml-element java-attribute="vlanInterface" name="vlan-interface" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="String that identifies the interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanDescription" name="vlan-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to describe (the service associated with) the vlan" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="backdoorConnection" name="backdoor-connection" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Whether customer is going to use this VLAN for backdoor connection to another customer premise device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv4AddressList" name="l3-interface-ipv4-address-list" type="inventory.aai.onap.org.v8.L3InterfaceIpv4AddressList" /> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv6AddressList" name="l3-interface-ipv6-address-list" type="inventory.aai.onap.org.v8.L3InterfaceIpv6AddressList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of vlan" /> + <xml-property name="indexedProps" value="vlan-interface,vlan-id-inner" /> + <xml-property name="dependentOn" value="l-interface" /> + <xml-property name="container" value="vlans" /> + </xml-properties> + </java-type> + + <java-type name="L3InterfaceIpv6AddressList"> + <xml-root-element name="l3-interface-ipv6-address-list" /> + <java-attributes> + <xml-element java-attribute="l3InterfaceIpv6Address" name="l3-interface-ipv6-address" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="IP address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="l3InterfaceIpv6PrefixLength" name="l3-interface-ipv6-prefix-length" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Prefix length, 128 for single address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isFloating" name="is-floating" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Indicator of fixed or floating address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface that address belongs to" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of subnet that address belongs to" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPv6 Address Range" /> + <xml-property name="indexedProps" value="l3-interface-ipv6-address,vlan-id-inner,neutron-network-id,neutron-subnet-id" /> + <xml-property name="dependentOn" value="vlan,l-interface" /> + </xml-properties> + </java-type> + + <java-type name="Volumes"> + <xml-properties> + <xml-property name="description" value="Collection of ephemeral Block storage volumes." /> + </xml-properties> + <xml-root-element name="volumes" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="volume" name="volume" type="inventory.aai.onap.org.v8.Volume" /> + </java-attributes> + </java-type> + + <java-type name="Volume"> + <xml-root-element name="volume" /> + <java-attributes> + <xml-element java-attribute="volumeId" name="volume-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of block storage volume relative to the vserver." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumeSelflink" name="volume-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Ephemeral Block storage volume." /> + <xml-property name="indexedProps" value="volume-id" /> + <xml-property name="dependentOn" value="vserver" /> + <xml-property name="container" value="volumes" /> + </xml-properties> + </java-type> + + <java-type name="Flavors"> + <xml-properties> + <xml-property name="description" value="Collection of openstack flavors." /> + </xml-properties> + <xml-root-element name="flavors" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="flavor" name="flavor" type="inventory.aai.onap.org.v8.Flavor" /> + </java-attributes> + </java-type> + + <java-type name="Flavor"> + <xml-root-element name="flavor" /> + <java-attributes> + <xml-element java-attribute="flavorId" name="flavor-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Flavor id, expected to be unique across cloud-region." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorName" name="flavor-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Flavor name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorVcpus" name="flavor-vcpus" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Number of CPUs" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorRam" name="flavor-ram" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Amount of memory" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorDisk" name="flavor-disk" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Disk space" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorEphemeral" name="flavor-ephemeral" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Amount of ephemeral disk space" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorSwap" name="flavor-swap" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="amount of swap space allocation" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorIsPublic" name="flavor-is-public" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="whether flavor is available to all users or private to the tenant it was created in." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorSelflink" name="flavor-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorDisabled" name="flavor-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Boolean as to whether this flavor is no longer enabled" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack flavor." /> + <xml-property name="nameProps" value="flavor-name" /> + <xml-property name="indexedProps" value="flavor-name,flavor-id" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="flavors" /> + </xml-properties> + </java-type> + + <java-type name="Images"> + <xml-properties> + <xml-property name="description" value="Collectio of Openstack images." /> + </xml-properties> + <xml-root-element name="images" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="image" name="image" type="inventory.aai.onap.org.v8.Image" /> + </java-attributes> + </java-type> + + <java-type name="Image"> + <xml-root-element name="image" /> + <java-attributes> + <xml-element java-attribute="imageId" name="image-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Image id, expected to be unique across cloud region" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageName" name="image-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Image name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageArchitecture" name="image-architecture" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operating system architecture." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageOsDistro" name="image-os-distro" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The common name of the operating system distribution in lowercase" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageOsVersion" name="image-os-version" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The operating system version as specified by the distributor." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="application" name="application" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The application that the image instantiates." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVendor" name="application-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The vendor of the application." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVersion" name="application-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The version of the application." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageSelflink" name="image-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v8.Metadata" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack image." /> + <xml-property name="nameProps" value="image-name" /> + <xml-property name="indexedProps" value="application,image-name,application-vendor,image-id,application-version" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="images" /> + </xml-properties> + </java-type> + + <java-type name="Metadata"> + <xml-properties> + <xml-property name="description" value="Collection of metadatum (key/value pairs)" /> + </xml-properties> + <xml-root-element name="metadata" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="metadatum" name="metadatum" type="inventory.aai.onap.org.v8.Metadatum" /> + </java-attributes> + </java-type> + + <java-type name="Metadatum"> + <xml-root-element name="metadatum" /> + <java-attributes> + <xml-element java-attribute="metaname" name="metaname" required="true" type="java.lang.String" xml-key="true" /> + <xml-element java-attribute="metaval" name="metaval" required="true" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Key/value pairs" /> + <xml-property name="indexedProps" value="metaname" /> + <xml-property name="dependentOn" value="tenant,image,service-instance,connector,model" /> + <xml-property name="container" value="metadata" /> + </xml-properties> + </java-type> + + <java-type name="DvsSwitches"> + <xml-properties> + <xml-property name="description" value="Collection of digital virtual switch metadata used for vmWare VCEs and VPEs." /> + </xml-properties> + <xml-root-element name="dvs-switches" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="dvsSwitch" name="dvs-switch" type="inventory.aai.onap.org.v8.DvsSwitch" /> + </java-attributes> + </java-type> + + <java-type name="DvsSwitch"> + <xml-root-element name="dvs-switch" /> + <java-attributes> + <xml-element java-attribute="switchName" name="switch-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="DVS switch name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vcenterUrl" name="vcenter-url" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL used to reach the vcenter" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Digital virtual switch metadata, used by SDN-C to configure VCEs. A&AI needs to receive this data from the PO deployment team and administer it using the provisioningTool.sh into A&AI. " /> + <xml-property name="indexedProps" value="vcenter-url,switch-name" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="dvs-switches" /> + </xml-properties> + </java-type> + + <java-type name="NetworkProfiles"> + <xml-properties> + <xml-property name="description" value="Collection of network profiles" /> + </xml-properties> + <xml-root-element name="network-profiles" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="networkProfile" name="network-profile" type="inventory.aai.onap.org.v8.NetworkProfile" /> + </java-attributes> + </java-type> + + <java-type name="NetworkProfile"> + <xml-root-element name="network-profile" /> + <java-attributes> + <xml-element java-attribute="nmProfileName" name="nm-profile-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique name of network profile." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="communityString" name="community-string" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encrypted SNMP community string" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Network profile populated by SDN-GP for SNMP" /> + <xml-property name="indexedProps" value="nm-profile-name" /> + <xml-property name="container" value="network-profiles" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + + <java-type name="Pservers"> + <xml-properties> + <xml-property name="description" value="Collection of compute hosts." /> + </xml-properties> + <xml-root-element name="pservers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pserver" name="pserver" type="inventory.aai.onap.org.v8.Pserver" /> + </java-attributes> + </java-type> + + <java-type name="Pserver"> + <xml-root-element name="pserver" /> + <java-attributes> + <xml-element java-attribute="hostname" name="hostname" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Value from executing hostname on the compute node." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ptniiEquipName" name="ptnii-equip-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="PTNII name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="numberOfCpus" name="number-of-cpus" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Number of cpus" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="diskInGigabytes" name="disk-in-gigabytes" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Disk size, in GBs" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ramInMegabytes" name="ram-in-megabytes" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="RAM size, in MBs" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipType" name="equip-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment type. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipVendor" name="equip-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment vendor. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipModel" name="equip-model" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment model. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="fqdn" name="fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Fully-qualified domain name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pserverSelflink" name="pserver-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to configure device, also used for troubleshooting and is IP used for traps generated by device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serialNumber" name="serial-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Serial number, may be queried" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pserverId" name="pserver-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of Pserver" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="internetTopology" name="internet-topology" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="internet topology of Pserver" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pserverName2" name="pserver-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="alternative pserver name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="purpose" name="purpose" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="purpose of pserver" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="pInterfaces" name="p-interfaces" type="inventory.aai.onap.org.v8.PInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v8.LagInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Compute host whose hostname must be unique and must exactly match what is sent as a relationship to a vserver." /> + <xml-property name="nameProps" value="pserver-name2" /> + <xml-property name="indexedProps" value="hostname,in-maint,pserver-id,pserver-name2" /> + <xml-property name="container" value="pservers" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + + <java-type name="PInterfaces"> + <xml-properties> + <xml-property name="description" value="Collection of physical interfaces." /> + </xml-properties> + <xml-root-element name="p-interfaces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pInterface" name="p-interface" type="inventory.aai.onap.org.v8.PInterface" /> + </java-attributes> + </java-type> + + <java-type name="PInterface"> + <xml-root-element name="p-interface" /> + <java-attributes> + <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name that identifies the physical interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portDescription" name="port-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Nature of the services and connectivity on this port." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v8.LInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Physical interface (e.g., nic)" /> + <xml-property name="indexedProps" value="interface-name" /> + <xml-property name="dependentOn" value="vpls-pe,pserver,pnf" /> + <xml-property name="container" value="p-interfaces" /> + </xml-properties> + </java-type> + + <java-type name="LagInterfaces"> + <xml-properties> + <xml-property name="description" value="Collection of link aggregate interfaces." /> + </xml-properties> + <xml-root-element name="lag-interfaces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lagInterface" name="lag-interface" type="inventory.aai.onap.org.v8.LagInterface" /> + </java-attributes> + </java-type> + + <java-type name="LagInterface"> + <xml-root-element name="lag-interface" /> + <java-attributes> + <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name that identifies the link aggregate interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v8.LInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Link aggregate interface" /> + <xml-property name="indexedProps" value="interface-name" /> + <xml-property name="dependentOn" value="generic-vnf,pserver,vpe,vpls-pe" /> + <xml-property name="container" value="lag-interfaces" /> + </xml-properties> + </java-type> + + <java-type name="OamNetworks"> + <xml-properties> + <xml-property name="description" value="Collection of OAM networks, to be deprecated shortly. Do not use for new purposes. " /> + </xml-properties> + <xml-root-element name="oam-networks" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="oamNetwork" name="oam-network" type="inventory.aai.onap.org.v8.OamNetwork" /> + </java-attributes> + </java-type> + + <java-type name="OamNetwork"> + <xml-root-element name="oam-network" /> + <java-attributes> + <xml-element java-attribute="networkUuid" name="network-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID of the network. Unique across a cloud-region" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkName" name="network-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the network." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cvlanTag" name="cvlan-tag" required="true" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="cvlan-id" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddress" name="ipv4-oam-gateway-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for VNF firewall rule so customer cannot send customer traffic over this oam network" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddressPrefixLength" name="ipv4-oam-gateway-address-prefix-length" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Used for VNF firewall rule so customer cannot send customer traffic over this oam network" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="OAM network, to be deprecated shortly. Do not use for new purposes. " /> + <xml-property name="nameProps" value="network-name" /> + <xml-property name="indexedProps" value="cvlan-tag,network-uuid,network-name" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="oam-networks" /> + </xml-properties> + </java-type> + + <java-type name="AvailabilityZones"> + <xml-properties> + <xml-property name="description" value="Collection of availability zones" /> + </xml-properties> + <xml-root-element name="availability-zones" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="availabilityZone" name="availability-zone" type="inventory.aai.onap.org.v8.AvailabilityZone" /> + </java-attributes> + </java-type> + + <java-type name="AvailabilityZone"> + <xml-root-element name="availability-zone" /> + <java-attributes> + <xml-element java-attribute="availabilityZoneName" name="availability-zone-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name of the availability zone. Unique across a cloud region" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="hypervisorType" name="hypervisor-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of hypervisor. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="State that indicates whether the availability zone should be used, etc. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Availability zone, a collection of compute hosts/pservers" /> + <xml-property name="indexedProps" value="availability-zone-name" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="availability-zones" /> + </xml-properties> + </java-type> + + <java-type name="VirtualDataCenters"> + <xml-properties> + <xml-property name="description" value="Virtual organization of cloud infrastructure elements in a data center context" /> + </xml-properties> + <xml-root-element name="virtual-data-centers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="virtualDataCenter" name="virtual-data-center" type="inventory.aai.onap.org.v8.VirtualDataCenter" /> + </java-attributes> + </java-type> + + <java-type name="VirtualDataCenter"> + <xml-root-element name="virtual-data-center" /> + <java-attributes> + <xml-element java-attribute="vdcId" name="vdc-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of the vdc" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vdcName" name="vdc-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the virtual data center" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Virtual organization of cloud infrastructure elements in a data center context" /> + <xml-property name="nameProps" value="vdc-name" /> + <xml-property name="indexedProps" value="vdc-name,vdc-id" /> + <xml-property name="container" value="virtual-data-centers" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + + <java-type name="LicenseManagement"> + <xml-root-element name="license-management" /> + <java-attributes> + <xml-element java-attribute="licenseKeyResources" name="license-key-resources" type="inventory.aai.onap.org.v8.LicenseKeyResources" /> + </java-attributes> + </java-type> + + <java-type name="LicenseKeyResources"> + <xml-root-element name="license-key-resources" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="licenseKeyResource" name="license-key-resource" type="inventory.aai.onap.org.v8.LicenseKeyResource" /> + </java-attributes> + </java-type> + + <java-type name="LicenseKeyResource"> + <xml-root-element name="license-key-resource" /> + <java-attributes> + <xml-element java-attribute="attUuid" name="att-uuid" required="true" type="java.lang.String" xml-key="true" /> + <xml-element java-attribute="assignmentType" name="assignment-type" type="java.lang.String" /> + <xml-element java-attribute="assignmentStatus" name="assignment-status" type="java.lang.String" /> + <xml-element java-attribute="assignmentGroupUuid" name="assignment-group-uuid" required="true" type="java.lang.String" /> + <xml-element java-attribute="assignmentDate" name="assignment-date" type="java.lang.String" /> + <xml-element java-attribute="name" name="name" type="java.lang.String" /> + <xml-element java-attribute="modelUuid" name="model-uuid" type="java.lang.String" /> + <xml-element java-attribute="modelVersion" name="model-version" type="java.lang.String" /> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String" /> + <xml-element java-attribute="licenseKeyFileUrl" name="license-key-file-url" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="supplierReleaseList" name="supplier-release-list" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="nameProps" value="name" /> + <xml-property name="indexedProps" value="assignment-group-uuid,att-uuid,name" /> + <xml-property name="uniqueProps" value="att-uuid" /> + <xml-property name="container" value="license-key-resources" /> + <xml-property name="namespace" value="license-management" /> + </xml-properties> + </java-type> + + <java-type name="Business"> + <xml-properties> + <xml-property name="description" value="Namespace for business related constructs" /> + </xml-properties> + <xml-root-element name="business" /> + <java-attributes> + <xml-element java-attribute="connectors" name="connectors" type="inventory.aai.onap.org.v8.Connectors" /> + <xml-element java-attribute="customers" name="customers" type="inventory.aai.onap.org.v8.Customers" /> + </java-attributes> + </java-type> + + <java-type name="Connectors"> + <xml-properties> + <xml-property name="description" value="Collection of resource instances used to connect a variety of disparate inventory widgets" /> + </xml-properties> + <xml-root-element name="connectors" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="connector" name="connector" type="inventory.aai.onap.org.v8.Connector" /> + </java-attributes> + </java-type> + + <java-type name="Connector"> + <xml-root-element name="connector" /> + <java-attributes> + <xml-element java-attribute="resourceInstanceId" name="resource-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of resource instance." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelId" name="persona-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v8.Metadata" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Collection of resource instances used to connect a variety of disparate inventory widgets" /> + <xml-property name="indexedProps" value="resource-instance-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version" /> + <xml-property name="container" value="connectors" /> + <xml-property name="namespace" value="business" /> + </xml-properties> + </java-type> + + <java-type name="Customers"> + <xml-properties> + <xml-property name="description" value="Collection of customer identifiers to provide linkage back to BSS information." /> + </xml-properties> + <xml-root-element name="customers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="customer" name="customer" type="inventory.aai.onap.org.v8.Customer" /> + </java-attributes> + </java-type> + + <java-type name="Customer"> + <xml-root-element name="customer" /> + <java-attributes> + <xml-element java-attribute="globalCustomerId" name="global-customer-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Global customer id used across ECOMP to uniquely identify customer." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="subscriberName" name="subscriber-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Subscriber name, an alternate way to retrieve a customer." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceSubscriptions" name="service-subscriptions" type="inventory.aai.onap.org.v8.ServiceSubscriptions" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="customer identifiers to provide linkage back to BSS information." /> + <xml-property name="nameProps" value="subscriber-name" /> + <xml-property name="indexedProps" value="subscriber-name,global-customer-id" /> + <xml-property name="uniqueProps" value="global-customer-id,subscriber-name" /> + <xml-property name="alternateKeys1" value="subscriber-name" /> + <xml-property name="container" value="customers" /> + <xml-property name="namespace" value="business" /> + </xml-properties> + </java-type> + + <java-type name="ServiceSubscriptions"> + <xml-properties> + <xml-property name="description" value="Collection of objects that group service instances." /> + </xml-properties> + <xml-root-element name="service-subscriptions" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="serviceSubscription" name="service-subscription" type="inventory.aai.onap.org.v8.ServiceSubscription" /> + </java-attributes> + </java-type> + + <java-type name="ServiceSubscription"> + <xml-root-element name="service-subscription" /> + <java-attributes> + <xml-element java-attribute="serviceType" name="service-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Value defined by orchestration to identify this service across ECOMP." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceInstances" name="service-instances" type="inventory.aai.onap.org.v8.ServiceInstances"> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Object that group service instances." /> + <xml-property name="indexedProps" value="service-type" /> + <xml-property name="dependentOn" value="customer" /> + <xml-property name="container" value="service-subscriptions" /> + </xml-properties> + </java-type> + + <java-type name="ServiceInstances"> + <xml-properties> + <xml-property name="description" value="Collection of service instances" /> + </xml-properties> + <xml-root-element name="service-instances" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="serviceInstance" name="service-instance" type="inventory.aai.onap.org.v8.ServiceInstance" /> + </java-attributes> + </java-type> + + <java-type name="ServiceInstance"> + <xml-root-element name="service-instance" /> + <java-attributes> + <xml-element java-attribute="serviceInstanceId" name="service-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Uniquely identifies this instance of a service" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelId" name="persona-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v8.Metadata" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Instance of a service" /> + <xml-property name="indexedProps" value="service-instance-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version" /> + <xml-property name="uniqueProps" value="service-instance-id" /> + <xml-property name="dependentOn" value="service-subscription" /> + <xml-property name="container" value="service-instances" /> + </xml-properties> + </java-type> + + <java-type name="ServiceDesignAndCreation"> + <xml-properties> + <xml-property name="description" value="Namespace for objects managed by ASDC" /> + </xml-properties> + <xml-root-element name="service-design-and-creation" /> + <java-attributes> + <xml-element java-attribute="vnfImages" name="vnf-images" type="inventory.aai.onap.org.v8.VnfImages" /> + <xml-element java-attribute="services" name="services" type="inventory.aai.onap.org.v8.Services" /> + <xml-element java-attribute="serviceCapabilities" name="service-capabilities" type="inventory.aai.onap.org.v8.ServiceCapabilities" /> + <xml-element java-attribute="models" name="models" type="inventory.aai.onap.org.v8.Models" /> + <xml-element java-attribute="namedQueries" name="named-queries" type="inventory.aai.onap.org.v8.NamedQueries" /> + </java-attributes> + </java-type> + + <java-type name="VnfImages"> + <xml-properties> + <xml-property name="description" value="Collection of image objects that pertain to a VNF that doesn't have associated vservers. This is a kludge." /> + </xml-properties> + <xml-root-element name="vnf-images" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vnfImage" name="vnf-image" type="inventory.aai.onap.org.v8.VnfImage" /> + </java-attributes> + </java-type> + + <java-type name="VnfImage"> + <xml-root-element name="vnf-image" /> + <java-attributes> + <xml-element java-attribute="attUuid" name="att-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of this asset" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="application" name="application" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The application that the image instantiates." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVendor" name="application-vendor" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The vendor of the application." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVersion" name="application-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The version of the application." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Image object that pertain to a VNF that doesn't have associated vservers. This is a kludge." /> + <xml-property name="indexedProps" value="application,att-uuid,application-vendor,application-version" /> + <xml-property name="uniqueProps" value="att-uuid" /> + <xml-property name="container" value="vnf-images" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + </java-type> + + <java-type name="Services"> + <xml-properties> + <xml-property name="description" value="Collection of service model definitions. Likely to be deprecated in favor of models from ASDC." /> + </xml-properties> + <xml-root-element name="services" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="service" name="service" type="inventory.aai.onap.org.v8.Service" /> + </java-attributes> + </java-type> + + <java-type name="Service"> + <xml-root-element name="service" /> + <java-attributes> + <xml-element java-attribute="serviceId" name="service-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="This gets defined by others to provide a unique ID for the service, we accept what is sent." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceDescription" name="service-description" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description of the service" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceSelflink" name="service-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceVersion" name="service-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="service version" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Stand-in for service model definitions. Likely to be deprecated in favor of models from ASDC." /> + <xml-property name="indexedProps" value="service-description,service-id" /> + <xml-property name="container" value="services" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + </java-type> + + <java-type name="ServiceCapabilities"> + <xml-properties> + <xml-property name="description" value="Collection of service capabilities." /> + </xml-properties> + <xml-root-element name="service-capabilities" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="serviceCapability" name="service-capability" type="inventory.aai.onap.org.v8.ServiceCapability" /> + </java-attributes> + </java-type> + + <java-type name="ServiceCapability"> + <xml-root-element name="service-capability" /> + <java-attributes> + <xml-element java-attribute="serviceType" name="service-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="This gets defined by others to provide a unique ID for the service, we accept what is sent." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Early definition of server/resource pairings, likely to be replaced by models. No new use should be made of this." /> + <xml-property name="indexedProps" value="service-type,vnf-type" /> + <xml-property name="container" value="service-capabilities" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + </java-type> + + <java-type name="Network"> + <xml-properties> + <xml-property name="description" value="Namespace for network inventory resources." /> + </xml-properties> + <xml-root-element name="network" /> + <java-attributes> + <xml-element java-attribute="logicalLinks" name="logical-links" type="inventory.aai.onap.org.v8.LogicalLinks" /> + <xml-element java-attribute="sitePairSets" name="site-pair-sets" type="inventory.aai.onap.org.v8.SitePairSets" /> + <xml-element java-attribute="vpnBindings" name="vpn-bindings" type="inventory.aai.onap.org.v8.VpnBindings" /> + <xml-element java-attribute="vplsPes" name="vpls-pes" type="inventory.aai.onap.org.v8.VplsPes" /> + <xml-element java-attribute="multicastConfigurations" name="multicast-configurations" type="inventory.aai.onap.org.v8.MulticastConfigurations" /> + <xml-element java-attribute="vces" name="vces" type="inventory.aai.onap.org.v8.Vces" /> + <xml-element java-attribute="vpes" name="vpes" type="inventory.aai.onap.org.v8.Vpes" /> + <xml-element java-attribute="vnfcs" name="vnfcs" type="inventory.aai.onap.org.v8.Vnfcs" /> + <xml-element java-attribute="l3Networks" name="l3-networks" type="inventory.aai.onap.org.v8.L3Networks" /> + <xml-element java-attribute="networkPolicies" name="network-policies" type="inventory.aai.onap.org.v8.NetworkPolicies" /> + <xml-element java-attribute="genericVnfs" name="generic-vnfs" type="inventory.aai.onap.org.v8.GenericVnfs" /> + <xml-element java-attribute="lagLinks" name="lag-links" type="inventory.aai.onap.org.v8.LagLinks" /> + <xml-element java-attribute="newvces" name="newvces" type="inventory.aai.onap.org.v8.Newvces" /> + <xml-element java-attribute="pnfs" name="pnfs" type="inventory.aai.onap.org.v8.Pnfs" /> + <xml-element java-attribute="physicalLinks" name="physical-links" type="inventory.aai.onap.org.v8.PhysicalLinks" /> + <xml-element java-attribute="ipsecConfigurations" name="ipsec-configurations" type="inventory.aai.onap.org.v8.IpsecConfigurations" /> + </java-attributes> + </java-type> + + <java-type name="LogicalLinks"> + <xml-properties> + <xml-property name="description" value="Collection of logical connections" /> + </xml-properties> + <xml-root-element name="logical-links" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="logicalLink" name="logical-link" type="inventory.aai.onap.org.v8.LogicalLink" /> + </java-attributes> + </java-type> + + <java-type name="LogicalLink"> + <xml-root-element name="logical-link" /> + <java-attributes> + <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="e.g., evc-name, or vnf-nameA_interface-nameA_vnf-nameZ_interface-nameZ" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkType" name="link-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of logical link, e.g., evc" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4, v6, or ds for dual stack (should be att-ip-version)" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="routingProtocol" name="routing-protocol" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="For example, static or BGP" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelId" name="persona-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Logical links generally connect l-interfaces but are used to express logical connectivity between two points" /> + <xml-property name="indexedProps" value="link-name,persona-model-id,persona-model-version,widget-model-id,widget-model-version" /> + <xml-property name="container" value="logical-links" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="SitePairSets"> + <xml-properties> + <xml-property name="description" value="Collection of sets of instances for probes related to generic-vnf" /> + </xml-properties> + <xml-root-element name="site-pair-sets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sitePairSet" name="site-pair-set" type="inventory.aai.onap.org.v8.SitePairSet" /> + </java-attributes> + </java-type> + + <java-type name="SitePairSet"> + <xml-root-element name="site-pair-set" /> + <java-attributes> + <xml-element java-attribute="sitePairSetId" name="site-pair-set-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of site pair set." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="routingInstances" name="routing-instances" type="inventory.aai.onap.org.v8.RoutingInstances" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Set of instances for probes used to measure service level agreements" /> + <xml-property name="indexedProps" value="site-pair-set-id" /> + <xml-property name="uniqueProps" value="site-pair-set-id" /> + <xml-property name="container" value="site-pair-sets" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="RoutingInstances"> + <xml-properties> + <xml-property name="description" value="set of probes related to generic-vnf routing instance" /> + </xml-properties> + <xml-root-element name="routing-instances" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="routingInstance" name="routing-instance" type="inventory.aai.onap.org.v8.RoutingInstance" /> + </java-attributes> + </java-type> + + <java-type name="RoutingInstance"> + <xml-root-element name="routing-instance" /> + <java-attributes> + <xml-element java-attribute="routingInstanceId" name="routing-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of routing instance" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="rpmOwner" name="rpm-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="rpm owner" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sitePairs" name="site-pairs" type="inventory.aai.onap.org.v8.SitePairs" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="routing-instance-id" /> + <xml-property name="uniqueProps" value="routing-instance-id" /> + <xml-property name="dependentOn" value="site-pair-set" /> + <xml-property name="container" value="routing-instances" /> + </xml-properties> + </java-type> + + <java-type name="SitePairs"> + <xml-properties> + <xml-property name="description" value="probe within a set" /> + </xml-properties> + <xml-root-element name="site-pairs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sitePair" name="site-pair" type="inventory.aai.onap.org.v8.SitePair" /> + </java-attributes> + </java-type> + + <java-type name="SitePair"> + <xml-root-element name="site-pair" /> + <java-attributes> + <xml-element java-attribute="sitePairId" name="site-pair-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique identifier of probe" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sourceIp" name="source-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prefix address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="destinationIp" name="destination-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prefix address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ip version, v4, v6" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="destinationHostname" name="destination-hostname" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Hostname of the destination equipment to which SLAs are measured against." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="destinationEquipType" name="destination-equip-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The type of destinatination equipment. Could be Router, UCPE, etc." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="classesOfService" name="classes-of-service" type="inventory.aai.onap.org.v8.ClassesOfService" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="vpn-id,site-pair-id" /> + <xml-property name="uniqueProps" value="site-pair-id" /> + <xml-property name="dependentOn" value="routing-instance" /> + <xml-property name="container" value="site-pairs" /> + </xml-properties> + </java-type> + + <java-type name="ClassesOfService"> + <xml-properties> + <xml-property name="description" value="class-of-service of probe" /> + </xml-properties> + <xml-root-element name="classes-of-service" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="classOfService" name="class-of-service" type="inventory.aai.onap.org.v8.ClassOfService" /> + </java-attributes> + </java-type> + + <java-type name="ClassOfService"> + <xml-root-element name="class-of-service" /> + <java-attributes> + <xml-element java-attribute="cos" name="cos" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique identifier of probe" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="probeId" name="probe-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="identifier of probe" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="probeType" name="probe-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="type of probe" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="cos" /> + <xml-property name="dependentOn" value="site-pair" /> + <xml-property name="container" value="classes-of-service" /> + </xml-properties> + </java-type> + + <java-type name="VpnBindings"> + <xml-root-element name="vpn-bindings" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vpnBinding" name="vpn-binding" type="inventory.aai.onap.org.v8.VpnBinding" /> + </java-attributes> + </java-type> + + <java-type name="VpnBinding"> + <xml-root-element name="vpn-binding" /> + <java-attributes> + <xml-element java-attribute="vpnId" name="vpn-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="VPN ID, globally unique within A&AI" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnName" name="vpn-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="VPN Name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="globalRouteTarget" name="global-route-target" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Number used to identify a VPN, globally unique in the network" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnPlatform" name="vpn-platform" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the platform associated with the VPN example AVPN, Mobility" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList"> + <xml-properties> + <xml-property name="description" value="l3-networks relate to vpn-bindings" /> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="VPN binding" /> + <xml-property name="nameProps" value="vpn-name" /> + <xml-property name="indexedProps" value="vpn-name,vpn-id,global-route-target" /> + <xml-property name="uniqueProps" value="vpn-id" /> + <xml-property name="container" value="vpn-bindings" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="VplsPes"> + <xml-properties> + <xml-property name="description" value="Collection of VPLS Provider Edge routers" /> + </xml-properties> + <xml-root-element name="vpls-pes" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vplsPe" name="vpls-pe" type="inventory.aai.onap.org.v8.VplsPe" /> + </java-attributes> + </java-type> + + <java-type name="VplsPe"> + <xml-root-element name="vpls-pe" /> + <java-attributes> + <xml-element java-attribute="equipmentName" name="equipment-name" required="true" type="java.lang.String" xml-key="true" /> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this VNF by BAU Service Assurance systems." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vpe, also used for troubleshooting and is IP used for traps generated by VPE (v4-loopback0-ip-address)." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value, e.g., VPLS-PE." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Temporary location for stag to get to VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="pInterfaces" name="p-interfaces" type="inventory.aai.onap.org.v8.PInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v8.LagInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="VPLS Provider Edge routers." /> + <xml-property name="indexedProps" value="prov-status,equipment-name" /> + <xml-property name="container" value="vpls-pes" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="MulticastConfigurations"> + <xml-properties> + <xml-property name="description" value="multicast configuration of generic-vnf ip-address" /> + </xml-properties> + <xml-root-element name="multicast-configurations" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="multicastConfiguration" name="multicast-configuration" type="inventory.aai.onap.org.v8.MulticastConfiguration" /> + </java-attributes> + </java-type> + + <java-type name="MulticastConfiguration"> + <xml-root-element name="multicast-configuration" /> + <java-attributes> + <xml-element java-attribute="multicastConfigurationId" name="multicast-configuration-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of multicast configuration." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="multicastProtocol" name="multicast-protocol" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="protocol of multicast configuration" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="rpType" name="rp-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="rp type of multicast configuration" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="multicast-configuration-id" /> + <xml-property name="uniqueProps" value="multicast-configuration-id" /> + <xml-property name="container" value="multicast-configurations" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="Vces"> + <xml-properties> + <xml-property name="description" value="Collection of Virtual Customer Edge Routers, used specifically for Gamma. This object is deprecated." /> + </xml-properties> + <xml-root-element name="vces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vce" name="vce" type="inventory.aai.onap.org.v8.Vce" /> + </java-attributes> + </java-type> + + <java-type name="Vce"> + <xml-root-element name="vce" /> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service from ASDC. Expect this to change as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceZone" name="regional-resource-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Regional way of organizing pservers, source of truth should define values" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="License key" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network role being played by this VNF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpeId" name="vpe-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique ID of VPE connected to this VCE." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="v6VceWanAddress" name="v6-vce-wan-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Valid v6 IP address for the WAN Link on this router. Implied length of /64." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vce, also used for troubleshooting and is IP used for traps generated by VCE." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Loopback0Address" name="ipv4-loopback0-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Loopback0 address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portGroups" name="port-groups" type="inventory.aai.onap.org.v8.PortGroups" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Virtual Customer Edge Router, used specifically for Gamma. This object is deprecated." /> + <xml-property name="nameProps" value="vnf-name" /> + <xml-property name="indexedProps" value="vnf-name,vnf-name2,vnf-type,heat-stack-id,vnf-id,interface-name,regional-resource-zone,vpe-id,prov-status,service-id" /> + <xml-property name="uniqueProps" value="vnf-id" /> + <xml-property name="container" value="vces" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="PortGroups"> + <xml-root-element name="port-groups" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="portGroup" name="port-group" type="inventory.aai.onap.org.v8.PortGroup" /> + </java-attributes> + </java-type> + + <java-type name="PortGroup"> + <xml-root-element name="port-group" /> + <java-attributes> + <xml-element java-attribute="interfaceId" name="interface-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of the interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of this Interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkName" name="neutron-network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network name of this Interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role assigned to this Interface, should use values as defined in ECOMP Yang models." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portGroupId" name="port-group-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique ID for port group in vmware" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portGroupName" name="port-group-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Likely to duplicate value of neutron network name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="switchName" name="switch-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="DVS or standard switch name (should be non-null for port groups associated with DVS)" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cvlanTags" name="cvlan-tags" type="inventory.aai.onap.org.v8.CvlanTags" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Used to capture the network interfaces of this VCE" /> + <xml-property name="nameProps" value="port-group-name" /> + <xml-property name="indexedProps" value="port-group-id,heat-stack-id,interface-id,interface-name,switch-name" /> + <xml-property name="dependentOn" value="vce" /> + <xml-property name="container" value="port-groups" /> + </xml-properties> + </java-type> + + <java-type name="CvlanTags"> + <xml-root-element name="cvlan-tags" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="cvlanTagEntry" name="cvlan-tag-entry" type="inventory.aai.onap.org.v8.CvlanTagEntry" /> + </java-attributes> + </java-type> + + <java-type name="CvlanTagEntry"> + <xml-root-element name="cvlan-tag-entry" /> + <java-attributes> + <xml-element java-attribute="cvlanTag" name="cvlan-tag" required="true" type="java.lang.Long" xml-key="true"> + <xml-properties> + <xml-property name="description" value="See mis-na-virtualization-platform.yang" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="dependentOn" value="port-group" /> + <xml-property name="indexedProps" value="cvlan-tag" /> + <xml-property name="container" value="cvlan-tags" /> + </xml-properties> + </java-type> + + <java-type name="Vpes"> + <xml-properties> + <xml-property name="description" value="Virtual provider edge router. In 1504, A&AI will populate this object through an M&P and tool provided to operations." /> + </xml-properties> + <xml-root-element name="vpes" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vpe" name="vpe" type="inventory.aai.onap.org.v8.Vpe" /> + </java-attributes> + </java-type> + + <java-type name="Vpe"> + <xml-root-element name="vpe" /> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service from ASDC" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceZone" name="regional-resource-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Regional way of organizing pservers, source of truth should define values" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="License key" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vpe, also used for troubleshooting and is IP used for traps generated by VPE (v4-loopback0-ip-address)." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddressPrefixLength" name="ipv4-oam-gateway-address-prefix-length" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Prefix length for oam-address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddress" name="ipv4-oam-gateway-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Gateway address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="v4Loopback0IpAddress" name="v4-loopback0-ip-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Loopback0 address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Temporary location for stag to get to VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="asNumber" name="as-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="as-number of the VPE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="summaryStatus" name="summary-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="details regarding the vpe operation" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="encryptedAccessFlag" name="encrypted-access-flag" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="indicates whether vpe access uses SSH" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v8.LInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v8.LagInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Relationship-list must include related to info for complex." /> + <xml-property name="nameProps" value="vnf-name" /> + <xml-property name="indexedProps" value="vnf-name,vnf-name2,vnf-type,heat-stack-id,vnf-id,regional-resource-zone,prov-status,service-id" /> + <xml-property name="uniqueProps" value="vnf-id" /> + <xml-property name="container" value="vpes" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="Vnfcs"> + <xml-properties> + <xml-property name="description" value="virtual network components associated with a vserver from application controller." /> + </xml-properties> + <xml-root-element name="vnfcs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vnfc" name="vnfc" type="inventory.aai.onap.org.v8.Vnfc" /> + </java-attributes> + </java-type> + + <java-type name="Vnfc"> + <xml-root-element name="vnfc" /> + <java-attributes> + <xml-element java-attribute="vnfcName" name="vnfc-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of vnfc." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfcFunctionCode" name="vnfc-function-code" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="function code" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfcType" name="vnfc-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="type" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="prov status of this vnfc" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by APP-C" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4OamVip" name="ipaddress-v4-oam-vip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Oam V4 vip address of this vnfc" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isClosedLoopDisabled" name="is-closed-loop-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="used to indicate whether closed loop function is enabled on this node" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="vnfc-name,prov-status,vnfc-type,vnfc-function-code,ipaddress-v4-oam-vip,in-maint,is-closed-loop-disabled" /> + <xml-property name="container" value="vnfcs" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="L3Networks"> + <xml-root-element name="l3-networks" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="l3Network" name="l3-network" type="inventory.aai.onap.org.v8.L3Network" /> + </java-attributes> + </java-type> + + <java-type name="L3Network"> + <xml-root-element name="l3-network" /> + <java-attributes> + <xml-element java-attribute="networkId" name="network-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Network ID, should be uuid. Unique across A&AI." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkName" name="network-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the network, governed by some naming convention.." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkType" name="network-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the network - who defines these values?" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkRole" name="network-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role the network plans - who defines these values?" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkTechnology" name="network-technology" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network technology - who defines these values?" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of this Interface" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isBoundToVpn" name="is-bound-to-vpn" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Set to true if bound to VPN" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service from ASDC" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkRoleInstance" name="network-role-instance" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="network role instance" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="contrailNetworkFqdn" name="contrail-network-fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contrail FQDN for the network" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelId" name="persona-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="subnets" name="subnets" type="inventory.aai.onap.org.v8.Subnets" /> + <xml-element java-attribute="ctagAssignments" name="ctag-assignments" type="inventory.aai.onap.org.v8.CtagAssignments" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList"> + <xml-properties> + <xml-property name="description" value="Relates to tenant (or is it a child of tenant), complex, service, vpn-binding" /> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Generic network definition" /> + <xml-property name="nameProps" value="network-name" /> + <xml-property name="indexedProps" value="heat-stack-id,network-uuid,service-id,network-id,network-name,persona-model-id,persona-model-version,widget-model-id,widget-model-version,contrail-network-fqdn" /> + <xml-property name="uniqueProps" value="network-id" /> + <xml-property name="container" value="l3-networks" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="NetworkPolicies"> + <xml-root-element name="network-policies" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="networkPolicy" name="network-policy" type="inventory.aai.onap.org.v8.NetworkPolicy" /> + </java-attributes> + </java-type> + <java-type name="NetworkPolicy"> + <xml-root-element name="network-policy" /> + <java-attributes> + <xml-element java-attribute="networkPolicyId" name="network-policy-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID representing unique key to this instance" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkPolicyFqdn" name="network-policy-fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contrail FQDN for the policy" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID for the openStack Heat instance" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="nameProps" value="network-policy-fqdn" /> + <xml-property name="indexedProps" value="network-policy-id,network-policy-fqdn" /> + <xml-property name="uniqueProps" value="network-policy-id" /> + <xml-property name="container" value="network-policies" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="CtagAssignments"> + <xml-root-element name="ctag-assignments" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="ctagAssignment" name="ctag-assignment" type="inventory.aai.onap.org.v8.CtagAssignment" /> + </java-attributes> + </java-type> + + <java-type name="CtagAssignment"> + <xml-root-element name="ctag-assignment" /> + <java-attributes> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" required="true" type="java.lang.Long" xml-key="true"> + <xml-properties> + <xml-property name="description" value="id." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="vlan-id-inner" /> + <xml-property name="dependentOn" value="l3-network" /> + <xml-property name="container" value="ctag-assignments" /> + </xml-properties> + </java-type> + + <java-type name="Subnets"> + <xml-root-element name="subnets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="subnet" name="subnet" type="inventory.aai.onap.org.v8.Subnet" /> + </java-attributes> + </java-type> + + <java-type name="Subnet"> + <xml-root-element name="subnet" /> + <java-attributes> + <xml-element java-attribute="subnetId" name="subnet-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Subnet ID, should be UUID." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of this subnet" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="gatewayAddress" name="gateway-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="gateway ip address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkStartAddress" name="network-start-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="network start address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cidrMask" name="cidr-mask" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="cidr mask" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ip version" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="dhcpEnabled" name="dhcp-enabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="dhcp enabled" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dhcpStart" name="dhcp-start" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the start address reserved for use by dhcp" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dhcpEnd" name="dhcp-end" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the last address reserved for use by dhcp" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="subnet-id" /> + <xml-property name="uniqueProps" value="subnet-id" /> + <xml-property name="dependentOn" value="l3-network" /> + <xml-property name="container" value="subnets" /> + </xml-properties> + </java-type> + + <java-type name="GenericVnfs"> + <xml-properties> + <xml-property name="description" value="Collection of VNFs" /> + </xml-properties> + <xml-root-element name="generic-vnfs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="genericVnf" name="generic-vnf" type="inventory.aai.onap.org.v8.GenericVnf" /> + </java-attributes> + </java-type> + + <java-type name="GenericVnf"> + <xml-root-element name="generic-vnf" /> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service from ASDC" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceZone" name="regional-resource-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Regional way of organizing pservers, source of truth should define values" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="License key" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, used by MSO." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="identifier of managed by vendor or customer" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure generic-vnf, also used for troubleshooting and is IP used for traps generated by generic-vnf." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Loopback0Address" name="ipv4-loopback0-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4 Loopback0 address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="nmLanV6Address" name="nm-lan-v6-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v6 Loopback address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementV6Address" name="management-v6-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v6 management address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vcpu" name="vcpu" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="number of vcpus ordered for this instance of VNF, used for VNFs with no vservers/flavors" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vcpuUnits" name="vcpu-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="units associated with vcpu, used for VNFs with no vservers/flavors" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vmemory" name="vmemory" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="number of GB of memory ordered for this instance of VNF, used for VNFs with no vservers/flavors" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vmemoryUnits" name="vmemory-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="units associated with vmemory, used for VNFs with no vservers/flavors" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vdisk" name="vdisk" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="number of vdisks ordered for this instance of VNF, used for VNFs with no vservers/flavors" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vdiskUnits" name="vdisk-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="units associated with vdisk, used for VNFs with no vservers/flavors" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isClosedLoopDisabled" name="is-closed-loop-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="used to indicate whether closed loop function is enabled on this node" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="summaryStatus" name="summary-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="details regarding the generic-vnf operation" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="encryptedAccessFlag" name="encrypted-access-flag" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="indicates whether generic-vnf access uses SSH" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="entitlementAssignmentGroupUuid" name="entitlement-assignment-group-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the Entitlement group used for licensing VNFs" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="entitlementResourceUuid" name="entitlement-resource-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the specific entitlement resource" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseAssignmentGroupUuid" name="license-assignment-group-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the license assignment group" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKeyUuid" name="license-key-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the actual license resource" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelId" name="persona-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="asNumber" name="as-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="as-number of the VNF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceSubzone" name="regional-resource-subzone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="represents sub zone of the rr plane" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v8.LInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v8.LagInterfaces" /> + <xml-element java-attribute="vfModules" name="vf-modules" type="inventory.aai.onap.org.v8.VfModules" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="General purpose VNF" /> + <xml-property name="nameProps" value="vnf-name" /> + <xml-property name="indexedProps" value="is-closed-loop-disabled,vnf-name2,vnf-type,heat-stack-id,in-maint,vnf-name,vnf-id,regional-resource-zone,prov-status,service-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version" /> + <xml-property name="uniqueProps" value="vnf-id" /> + <xml-property name="container" value="generic-vnfs" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="VfModules"> + <xml-properties> + <xml-property name="description" value="Collection of vf-modules, a deployment unit of VNFCs" /> + </xml-properties> + <xml-root-element name="vf-modules" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vfModule" name="vf-module" type="inventory.aai.onap.org.v8.VfModule" /> + </java-attributes> + </java-type> + + <java-type name="VfModule"> + <xml-root-element name="vf-module" /> + <java-attributes> + <xml-element java-attribute="vfModuleId" name="vf-module-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of vf-module." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfModuleName" name="vf-module-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of vf-module" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="orchestration status of this vf-module, mastered by MSO" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" java-attribute="isBaseVfModule" name="is-base-vf-module" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="used to indicate whether or not this object is base vf module" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelId" name="persona-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="contrailServiceInstanceFqdn" name="contrail-service-instance-fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the Contrail unique ID for a service-instance" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="a deployment unit of VNFCs" /> + <xml-property name="indexedProps" value="vf-module-id,vf-module-name,heat-stack-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version,contrail-service-instance-fqdn" /> + <xml-property name="dependentOn" value="generic-vnf" /> + <xml-property name="container" value="vf-modules" /> + </xml-properties> + </java-type> + + + <java-type name="LagLinks"> + <xml-properties> + <xml-property name="description" value="Collection of link aggregation connections" /> + </xml-properties> + <xml-root-element name="lag-links" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lagLink" name="lag-link" type="inventory.aai.onap.org.v8.LagLink" /> + </java-attributes> + </java-type> + + <java-type name="LagLink"> + <xml-root-element name="lag-link" /> + <java-attributes> + <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Alphabetical concatenation of lag-interface names" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="LAG links can connect lag-interfaces" /> + <xml-property name="indexedProps" value="link-name" /> + <xml-property name="container" value="lag-links" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="Newvces"> + <xml-properties> + <xml-property name="description" value="This object fills in the gaps from vce that were incorporated into generic-vnf. This object will be retired with vce." /> + </xml-properties> + <xml-root-element name="newvces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="newvce" name="newvce" type="inventory.aai.onap.org.v8.Newvce" /> + </java-attributes> + </java-type> + + <java-type name="Newvce"> + <xml-root-element name="newvce" /> + <java-attributes> + <xml-element java-attribute="vnfId2" name="vnf-id2" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF, can't use same attribute name right now until we promote this new object" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this VNF by BAU Service Assurance systems." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="License key" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vpe, also used for troubleshooting and is IP used for traps generated by VPE (v4-loopback0-ip-address)." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value, e.g., VPE." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Loopback0Address" name="ipv4-loopback0-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4 Loopback0 address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v8.LInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="This object fills in the gaps from vce that were incorporated into generic-vnf. This object will be retired with vce." /> + <xml-property name="nameProps" value="vnf-name" /> + <xml-property name="indexedProps" value="vnf-name,vnf-name2,vnf-type,heat-stack-id,prov-status,vnf-id2" /> + <xml-property name="uniqueProps" value="vnf-id2" /> + <xml-property name="container" value="newvces" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="Pnfs"> + <xml-properties> + <xml-property name="description" value="Collection of Physical Network Functions." /> + </xml-properties> + <xml-root-element name="pnfs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pnf" name="pnf" type="inventory.aai.onap.org.v8.Pnf" /> + </java-attributes> + </java-type> + + <java-type name="Pnf"> + <xml-root-element name="pnf" /> + <java-attributes> + <xml-element java-attribute="pnfName" name="pnf-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique name of Physical Network Function." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pnfName2" name="pnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="name of Physical Network Function." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pnfName2Source" name="pnf-name2-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="source of name2" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pnfId" name="pnf-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="id of pnf" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipType" name="equip-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment type. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipVendor" name="equip-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment vendor. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipModel" name="equip-model" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment model. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="identifier of managed by vendor or customer" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Oam" name="ipaddress-v4-oam" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ipv4-oam-address with new naming convention for IP addresses" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="pInterfaces" name="p-interfaces" type="inventory.aai.onap.org.v8.PInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="PNF represents a physical network function. typically equipment used in the D1 world. in 1607, this will be populated by SDN-C to represent a premises router that a uCPE connects to." /> + <xml-property name="indexedProps" value="pnf-name" /> + <xml-property name="nameProps" value="pnf-name" /> + <xml-property name="uniqueProps" value="pnf-name" /> + <xml-property name="container" value="pnfs" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="PhysicalLinks"> + <xml-properties> + <xml-property name="description" value="Collection of physical connections, typically between p-interfaces" /> + </xml-properties> + <xml-root-element name="physical-links" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="physicalLink" name="physical-link" type="inventory.aai.onap.org.v8.PhysicalLink" /> + </java-attributes> + </java-type> + + <java-type name="PhysicalLink"> + <xml-root-element name="physical-link" /> + <java-attributes> + <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="e.g., hostnameA_p-connection_nameA_hostnameZ+p_connection-nameZ" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="circuitId" name="circuit-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Circuit it" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dualMode" name="dual-mode" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Dual access mode (e.g., primary, secondary" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="To provide information on who manages this circuit. A&AI or 3rd party transport provider" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Collection of physical connections, typically between p-interfaces" /> + <xml-property name="indexedProps" value="circuit-id,link-name" /> + <xml-property name="alternateKeys1" value="circuit-id" /> + <xml-property name="container" value="physical-links" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="VigServers"> + <xml-root-element name="vig-servers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vigServer" name="vig-server" type="inventory.aai.onap.org.v8.VigServer" /> + </java-attributes> + </java-type> + + <java-type name="VigServer"> + <xml-root-element name="vig-server" /> + <java-attributes> + <xml-element java-attribute="vigAddressType" name="vig-address-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="indicates whether the VIG is for AVPN or INTERNET" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="ipaddressV4Vig" name="ipaddress-v4-vig" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4 IP of the vig server" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="ipaddressV6Vig" name="ipaddress-v6-vig" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v6 IP of the vig server" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="vig-server contains information about a vig server used for IPSec-configuration. Populated by SDN-C from 1607" /> + <xml-property name="indexedProps" value="vig-address-type" /> + <xml-property name="dependentOn" value="ipsec-configuration" /> + <xml-property name="container" value="vig-servers" /> + </xml-properties> + </java-type> + + <java-type name="IpsecConfigurations"> + <xml-root-element name="ipsec-configurations" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="ipsecConfiguration" name="ipsec-configuration" type="inventory.aai.onap.org.v8.IpsecConfiguration" /> + </java-attributes> + </java-type> + + <java-type name="IpsecConfiguration"> + <xml-root-element name="ipsec-configuration" /> + <java-attributes> + <xml-element java-attribute="ipsecConfigurationId" name="ipsec-configuration-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID of this configuration" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedVigAddressType" name="requested-vig-address-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicate the type of VIG server like AVPN, INTERNET, BOTH" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedEncryptionStrength" name="requested-encryption-strength" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encryption values like 3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedDmzType" name="requested-dmz-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Vendor can offer a shared DMZ or a DMZ specific to a customer" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sharedDmzNetworkAddress" name="shared-dmz-network-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network address of shared DMZ" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedCustomerName" name="requested-customer-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="If the DMZ is a custom DMZ, this field will indicate the customer information" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikeVersion" name="ike-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="can be 1 or 2" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1Authentication" name="ikev1-authentication" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contains values like md5, sha1, sha256, sha384" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1Encryption" name="ikev1-encryption" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encyption values like 3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1DhGroup" name="ikev1-dh-group" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Diffie-Hellman group like DH-GROUP2, DH-GROUP5, DH-GROUP14" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1AmGroupId" name="ikev1-am-group-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group name defined in VIG for clients using aggressive mode" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1AmPassword" name="ikev1-am-password" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="pre-shared key for the above group name " /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1SaLifetime" name="ikev1-sa-lifetime" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Lifetime for IKEv1 SA" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecAuthentication" name="ipsec-authentication" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="md5, sha1, sha256, sha384" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecEncryption" name="ipsec-encryption" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecSaLifetime" name="ipsec-sa-lifetime" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Life time for IPSec SA" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecPfs" name="ipsec-pfs" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="enable PFS or not" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="xauthUserId" name="xauth-userid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="user ID for xAuth, sm-user,ucpeHostName,nmteHostName" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="xauthUserPassword" name="xauth-user-password" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encrypted using the Juniper $9$ algorithm" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dpdInterval" name="dpd-interval" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The time between DPD probe" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dpdFrequency" name="dpd-frequency" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Maximum number of DPD before claiming the tunnel is down" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + <xml-element java-attribute="vigServers" name="vig-servers" type="inventory.aai.onap.org.v8.VigServers" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPSec configuration node will contain various configuration data for the NMTE VNF. This node will have an edge to the generic-vnf (vnf type = TE). Starting 1607, this data will be populated by SDN-C" /> + <xml-property name="indexedProps" value="ipsec-configuration-id" /> + <xml-property name="nameProps" value="ipsec-configuration-id" /> + <xml-property name="uniqueProps" value="ipsec-configuration-id" /> + <xml-property name="container" value="ipsec-configurations" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + + <java-type name="NotificationEvent"> + <xml-root-element name="notification-event" /> + <java-attributes> + <xml-element java-attribute="cambriaPartition" name="cambria.partition" type="java.lang.String" /> + <xml-element java-attribute="eventHeader" name="event-header" type="inventory.aai.onap.org.v8.NotificationEventHeader" /> + <xml-any-element java-attribute="entity" /> + </java-attributes> + </java-type> + <java-type name="NotificationEventHeader"> + <xml-root-element name="notification-event-header" /> + <java-attributes> + <xml-element java-attribute="id" name="id" type="java.lang.String" /> + <xml-element java-attribute="timestamp" name="timestamp" type="java.lang.String" /> + <xml-element java-attribute="sourceName" name="source-name" type="java.lang.String" /> + <xml-element java-attribute="domain" name="domain" type="java.lang.String" /> + <xml-element java-attribute="sequenceNumber" name="sequence-number" type="java.lang.String" /> + <xml-element java-attribute="severity" name="severity" type="java.lang.String" /> + <xml-element java-attribute="eventType" name="event-type" type="java.lang.String" /> + <xml-element java-attribute="version" name="version" type="java.lang.String" /> + <xml-element java-attribute="action" name="action" type="java.lang.String" /> + <xml-element java-attribute="entityType" name="entity-type" type="java.lang.String" /> + <xml-element java-attribute="topEntityType" name="top-entity-type" type="java.lang.String" /> + <xml-element java-attribute="entityLink" name="entity-link" type="java.lang.String" /> + <xml-element java-attribute="status" name="status" type="java.lang.String" /> + </java-attributes> + </java-type> + <java-type name="AaiInternal"> + <xml-root-element name="aai-internal" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="reservedPropNames" name="reserved-prop-names" type="inventory.aai.onap.org.v8.ReservedPropNames" /> + <xml-element container-type="java.util.ArrayList" java-attribute="edgePropNames" name="edge-prop-names" type="inventory.aai.onap.org.v8.EdgePropNames" /> + </java-attributes> + </java-type> + <java-type name="ReservedPropNames"> + <xml-properties> + <xml-property name="description" value="Internal map to define some reserved properties of a vertex" /> + <xml-property name="uniqueProps" value="aai-unique-key" /> + <xml-property name="indexedProps" value="aai-unique-key,source-of-truth,aai-node-type" /> + </xml-properties> + <xml-root-element name="reserved-prop-names" /> + <java-attributes> + <xml-element java-attribute="lastModSourceOfTruth" name="last-mod-source-of-truth" type="java.lang.String" /> + <xml-element java-attribute="aaiNodeType" name="aai-node-type" type="java.lang.String" /> + <xml-element java-attribute="aaiCreatedTs" name="aai-created-ts" type="java.lang.Long" /> + <xml-element java-attribute="aaiUniqueKey" name="aai-unique-key" type="java.lang.String" /> + <xml-element java-attribute="aaiLastModTs" name="aai-last-mod-ts" type="java.lang.Long" /> + <xml-element java-attribute="sourceOfTruth" name="source-of-truth" type="java.lang.String" /> + </java-attributes> + </java-type> + <java-type name="EdgePropNames"> + <!-- NOTE that the names of these properties are not consistent and are in mixed case and hyphen case for now --> + <xml-properties> + <xml-property name="description" value="Internal map to define the properties of an edge and interpret the map EdgeRules" /> + <xml-property name="edgeInfo" value="edgeLabel,direction,multiplicityRule,isParent,usesResource,hasDelTarget,SVC-INFRA,SVC-INFRA-REV" /> + </xml-properties> + <xml-root-element name="edge-prop-names" /> + <java-attributes> + <xml-element java-attribute="edgeLabel" name="edgeLabel" type="java.lang.String" /> + <xml-element java-attribute="direction" name="direction" type="java.lang.String" /> + <xml-element java-attribute="multiplicityRule" name="multiplicityRule" type="java.lang.String" /> + <xml-element java-attribute="isParent" name="isParent" type="java.lang.Boolean" /> + <xml-element java-attribute="usesResource" name="usesResource" type="java.lang.Boolean" /> + <xml-element java-attribute="hasDelTarget" name="hasDelTarget" type="java.lang.Boolean" /> + <xml-element java-attribute="SVC-INFRA" name="SVC-INFRA" type="java.lang.String" /> + <xml-element java-attribute="SVC-INFRA-REV" name="SVC-INFRA-REV" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="Models"> + <xml-properties> + <xml-property name="description" value="Collection of subgraph definitions provided by ASDC to describe the inventory assets and their connections related to ASDC models" /> + </xml-properties> + <xml-root-element name="models" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="model" name="model" type="inventory.aai.onap.org.v8.Model" /> + </java-attributes> + </java-type> + + <java-type name="Model"> + <xml-properties> + <xml-property name="description" value="Subgraph definition provided by ASDC to describe an inventory asset and its connections related to ASDC models" /> + <xml-property name="nameProps" value="model-name" /> + <xml-property name="indexedProps" value="model-name-version-id,model-type,model-name,model-id,model-version" /> + <xml-property name="alternateKeys1" value="model-id,model-version" /> + <xml-property name="uniqueProps" value="model-name-version-id" /> + <xml-property name="container" value="models" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + <xml-root-element name="model" /> + <java-attributes> + <xml-element java-attribute="modelNameVersionId" name="model-name-version-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier corresponding to one version of a model in ASDC" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelType" name="model-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the model, e.g., service, resource, widget, etc." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelName" name="model-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the model, which can change from version to version." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelId" name="model-id" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Invariant unique ID which does not change from version to version" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersion" name="model-version" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Version" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelDescription" name="model-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelElements" name="model-elements" type="inventory.aai.onap.org.v8.ModelElements" /> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v8.Metadata" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="ModelElements"> + <xml-root-element name="model-elements" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="modelElement" name="model-element" type="inventory.aai.onap.org.v8.ModelElement" /> + </java-attributes> + </java-type> + + <java-type name="ModelElement"> + <xml-properties> + <xml-property name="description" value="Defines how other models combine to make up a higher-level model." /> + <xml-property name="uniqueProps" value="model-element-uuid" /> + <xml-property name="indexedProps" value="model-element-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="model-elements" /> + </xml-properties> + <xml-root-element name="model-element" /> + <java-attributes> + <xml-element java-attribute="modelElementUuid" name="model-element-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="newDataDelFlag" name="new-data-del-flag" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates whether this element was created as part of instantiation from this model" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cardinality" name="cardinality" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="How many of this type of element are required/allowed" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="linkagePoints" name="linkage-point" type="java.lang.String"> + <xml-element-wrapper name="linkage-points" /> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelElements" name="model-elements" type="inventory.aai.onap.org.v8.ModelElements"> + <xml-properties> + <xml-property name="description" value="Defines how other models combine to make up a higher-level model" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelConstraints" name="model-constraints" type="inventory.aai.onap.org.v8.ModelConstraints"> + <xml-properties> + <xml-property name="description" value="Describes new constraints on this model element that are not part of that model's definition" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="ModelConstraints"> + <xml-root-element name="model-constraints" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="modelConstraint" name="model-constraint" type="inventory.aai.onap.org.v8.ModelConstraint" /> + </java-attributes> + </java-type> + + <java-type name="ModelConstraint"> + <xml-properties> + <xml-property name="description" value="This is how we would capture constraints defining allowed sets of elements." /> + <xml-property name="uniqueProps" value="model-constraint-uuid" /> + <xml-property name="indexedProps" value="model-constraint-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="model-constraints" /> + </xml-properties> + <xml-root-element name="model-constraint" /> + <java-attributes> + <xml-element java-attribute="modelConstraintUuid" name="model-constraint-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="constrainedElementSetUuidToReplace" name="constrained-element-set-uuid-to-replace" required="true" type="java.lang.String" /> + <xml-element java-attribute="constrainedElementSets" name="constrained-element-sets" type="inventory.aai.onap.org.v8.ConstrainedElementSets" /> + </java-attributes> + </java-type> + + <java-type name="ConstrainedElementSets"> + <xml-root-element name="constrained-element-sets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="constrainedElementSet" name="constrained-element-set" type="inventory.aai.onap.org.v8.ConstrainedElementSet" /> + </java-attributes> + </java-type> + + <java-type name="ConstrainedElementSet"> + <xml-properties> + <xml-property name="description" value="This is how we would capture constraints defining allowed sets of elements." /> + <xml-property name="uniqueProps" value="constrained-element-set-uuid" /> + <xml-property name="indexedProps" value="constrained-element-set-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="constrained-element-sets" /> + </xml-properties> + <xml-root-element name="constrained-element-set" /> + <java-attributes> + <xml-element java-attribute="constrainedElementSetUuid" name="constrained-element-set-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="constraintType" name="constraint-type" required="true" type="java.lang.String" /> + <xml-element java-attribute="checkType" name="check-type" required="true" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String" /> + <xml-element java-attribute="elementChoiceSets" name="element-choice-sets" type="inventory.aai.onap.org.v8.ElementChoiceSets" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="ElementChoiceSets"> + <xml-root-element name="element-choice-sets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="elementChoiceSet" name="element-choice-set" type="inventory.aai.onap.org.v8.ElementChoiceSet" /> + </java-attributes> + </java-type> + + <java-type name="ElementChoiceSet"> + <xml-properties> + <xml-property name="description" value="This is how we would capture constraints defining allowed sets of elements." /> + <xml-property name="uniqueProps" value="element-choice-set-uuid" /> + <xml-property name="indexedProps" value="element-choice-set-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="element-choice-sets" /> + </xml-properties> + <xml-root-element name="element-choice-set" /> + <java-attributes> + <xml-element java-attribute="elementChoiceSetUuid" name="element-choice-set-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="elementChoiceSetName" name="element-choice-set-name" required="true" type="java.lang.String" /> + <xml-element java-attribute="cardinality" name="cardinality" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String" /> + <xml-element java-attribute="modelElements" name="model-elements" type="inventory.aai.onap.org.v8.ModelElements" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="NamedQueries"> + <xml-root-element name="named-queries" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="namedQuery" name="named-query" type="inventory.aai.onap.org.v8.NamedQuery" /> + </java-attributes> + </java-type> + + <java-type name="NamedQuery"> + <xml-properties> + <xml-property name="description" value="TBD" /> + <xml-property name="nameProps" value="named-query-name" /> + <xml-property name="uniqueProps" value="named-query-uuid" /> + <xml-property name="indexedProps" value="named-query-uuid, named-query-name" /> + <xml-property name="container" value="named-queries" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + <xml-root-element name="named-query" /> + <java-attributes> + <xml-element java-attribute="namedQueryUuid" name="named-query-uuid" required="true" type="java.lang.String" xml-key="true" /> + <xml-element java-attribute="namedQueryName" name="named-query-name" required="true" type="java.lang.String" /> + <xml-element java-attribute="namedQueryVersion" name="named-query-version" required="true" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="requiredInputParams" name="required-input-param" type="java.lang.String"> + <xml-element-wrapper name="required-input-params" /> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String" /> + <xml-element java-attribute="namedQueryElements" name="named-query-elements" type="inventory.aai.onap.org.v8.NamedQueryElements" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="NamedQueryElements"> + <xml-root-element name="named-query-elements" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="namedQueryElement" name="named-query-element" type="inventory.aai.onap.org.v8.NamedQueryElement" /> + </java-attributes> + </java-type> + + <java-type name="NamedQueryElement"> + <xml-properties> + <xml-property name="description" value="TBD" /> + <xml-property name="uniqueProps" value="named-query-element-uuid" /> + <xml-property name="indexedProps" value="named-query-element-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="named-query-elements" /> + </xml-properties> + <xml-root-element name="named-query-element" /> + <java-attributes> + <xml-element java-attribute="namedQueryElementUuid" name="named-query-element-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="propertyCollectList" name="property-collect-list" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String" /> + <xml-element java-attribute="propertyLimitDesc" name="property-limit-desc" type="java.lang.String" /> + <xml-element java-attribute="namedQueryElements" name="named-query-elements" type="inventory.aai.onap.org.v8.NamedQueryElements" /> + <xml-element java-attribute="relatedLookups" name="related-lookups" type="inventory.aai.onap.org.v8.RelatedLookups" /> + <xml-element java-attribute="propertyConstraints" name="property-constraints" type="inventory.aai.onap.org.v8.PropertyConstraints" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="RelatedLookups"> + <xml-root-element name="related-lookups" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="relatedLookup" name="related-lookup" type="inventory.aai.onap.org.v8.RelatedLookup" /> + </java-attributes> + </java-type> + + <java-type name="RelatedLookup"> + <xml-properties> + <xml-property name="description" value="TBD" /> + <xml-property name="uniqueProps" value="related-lookup-id" /> + <xml-property name="indexedProps" value="related-lookup-id" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="related-lookups" /> + </xml-properties> + <xml-root-element name="related-lookup" /> + <java-attributes> + <xml-element java-attribute="relatedLookupUuid" name="related-lookup-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sourceNodeType" name="source-node-type" required="true" type="java.lang.String" /> + <xml-element java-attribute="sourceNodeProperty" name="source-node-property" required="true" type="java.lang.String" /> + <xml-element java-attribute="targetNodeType" name="target-node-type" required="true" type="java.lang.String" /> + <xml-element java-attribute="targetNodeProperty" name="target-node-property" required="true" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="propertyCollectList" name="property-collect-list" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v8.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="PropertyConstraints"> + <xml-root-element name="property-constraints" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="propertyConstraint" name="property-constraint" type="inventory.aai.onap.org.v8.PropertyConstraint" /> + </java-attributes> + </java-type> + + <java-type name="PropertyConstraint"> + <xml-properties> + <xml-property name="description" value="TBD" /> + <xml-property name="unique-props" value="property-constraint-uuid" /> + <xml-property name="indexed-props" value="property-constraint-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="property-constraints" /> + </xml-properties> + <xml-root-element name="property-constraint" /> + <java-attributes> + <xml-element java-attribute="propertyConstraintUuid" name="property-constraint-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="constraintType" name="constraint-type" required="true" type="java.lang.String" /> + <xml-element java-attribute="property-name" name="property-name" required="true" type="java.lang.String" /> + <xml-element java-attribute="property-value" name="property-value" required="true" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="ModelAndNamedQuerySearch"> + <xml-properties> + <xml-property name="description" value="ModelAndNamedQuerySearch holds query-parameters and instance-properties for performing a named-query or model query" /> + </xml-properties> + <xml-root-element name="model-and-named-query-search" /> + <java-attributes> + <xml-element java-attribute="queryParameters" name="query-parameters" type="inventory.aai.onap.org.v8.QueryParameters" /> + <xml-element java-attribute="instanceFilters" name="instance-filters" type="inventory.aai.onap.org.v8.InstanceFilters" /> + </java-attributes> + </java-type> + + <java-type name="QueryParameters"> + <xml-properties> + <xml-property name="description" value="QueryParameters for performing a named-query or model query" /> + </xml-properties> + <xml-root-element name="query-parameters" /> + <java-attributes> + <xml-element java-attribute="namedQuery" name="named-query" type="inventory.aai.onap.org.v8.NamedQuery" /> + <xml-element java-attribute="model" name="model" type="inventory.aai.onap.org.v8.Model" /> + </java-attributes> + </java-type> + + <java-type name="InstanceFilters"> + <xml-properties> + <xml-property name="description" value="InstanceFilters for performing a named-query or model query" /> + </xml-properties> + <xml-root-element name="instance-filters" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="instanceFilter" name="instance-filter" type="inventory.aai.onap.org.v8.InstanceFilter" /> + </java-attributes> + </java-type> + + <java-type name="InstanceFilter"> + <xml-properties> + <xml-property name="description" value="InstanceFilter for performing a named-query or model query" /> + <xml-property name="container" value="instance-filters" /> + </xml-properties> + <xml-root-element name="instance-filter" /> + <java-attributes> + <xml-any-element container-type="java.util.ArrayList" java-attribute="any" lax="true" name="any" /> + </java-attributes> + </java-type> + + <java-type name="Properties"> + <xml-properties> + <xml-property name="description" value="Property holder for query properties or instance properties" /> + </xml-properties> + <xml-root-element name="properties" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String" /> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="ResponseList"> + <xml-properties> + <xml-property name="description" value="Response container for the results of a named-query or model query" /> + </xml-properties> + <xml-root-element name="response-list" /> + <java-attributes> + <xml-element java-attribute="inventoryResponseItems" name="inventory-response-items" type="inventory.aai.onap.org.v8.InventoryResponseItems" /> + </java-attributes> + </java-type> + + <java-type name="InventoryResponseItems"> + <xml-properties> + <xml-property name="description" value="Container for inventory items in response list" /> + <xml-property name="container" value="response-list" /> + </xml-properties> + <xml-root-element name="inventory-response-items" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="inventoryResponseItem" name="inventory-response-item" type="inventory.aai.onap.org.v8.InventoryResponseItem" /> + </java-attributes> + </java-type> + + <java-type name="InventoryResponseItem"> + <xml-properties> + <xml-property name="description" value="Inventory item for response list" /> + <xml-property name="container" value="inventory-response-items" /> + </xml-properties> + <xml-root-element name="inventory-response-item" /> + <java-attributes> + <xml-element java-attribute="modelName" name="model-name" type="java.lang.String" /> + <xml-any-element java-attribute="item" /> + <xml-element java-attribute="extraProperties" name="extra-properties" type="inventory.aai.onap.org.v8.ExtraProperties" /> + <xml-element java-attribute="inventoryResponseItems" name="inventory-response-items" type="inventory.aai.onap.org.v8.InventoryResponseItems" /> + </java-attributes> + </java-type> + + <java-type name="ExtraProperties"> + <xml-properties> + <xml-property name="description" value="Extra properties for inventory item for response list" /> + </xml-properties> + <xml-root-element name="extra-properties" /> + <java-attributes> + <xml-any-element container-type="java.util.ArrayList" java-attribute="extraProperty" name="extra-property" type="inventory.aai.onap.org.v8.ExtraProperty" /> + </java-attributes> + </java-type> + + <java-type name="ExtraProperty"> + <xml-root-element name="extra-property" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String" /> + <xml-any-element java-attribute="propertyValue" lax="true" name="property-value" /> + </java-attributes> + </java-type> + + </java-types> +</xml-bindings>
\ No newline at end of file diff --git a/src/test/resources/oxm-reader/single/aai_oxm_v9.xml b/src/test/resources/oxm-reader/single/aai_oxm_v9.xml new file mode 100644 index 0000000..6fe7379 --- /dev/null +++ b/src/test/resources/oxm-reader/single/aai_oxm_v9.xml @@ -0,0 +1,4772 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- +============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===================================================== +--> +<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v9" xml-mapping-metadata-complete="true"> + <xml-schema element-form-default="QUALIFIED"> + <xml-ns namespace-uri="http://org.openecomp.aai.inventory/v9" /> + </xml-schema> + <java-types> + <java-type name="Inventory"> + <xml-root-element name="inventory" /> + <java-attributes> + <xml-element java-attribute="search" name="search" type="inventory.aai.onap.org.v9.Search" /> + <xml-element java-attribute="actions" name="actions" type="inventory.aai.onap.org.v9.Actions" /> + <xml-element java-attribute="cloudInfrastructure" name="cloud-infrastructure" type="inventory.aai.onap.org.v9.CloudInfrastructure" /> + <xml-element java-attribute="licenseManagement" name="license-management" type="inventory.aai.onap.org.v9.LicenseManagement" /> + <xml-element java-attribute="business" name="business" type="inventory.aai.onap.org.v9.Business" /> + <xml-element java-attribute="serviceDesignAndCreation" name="service-design-and-creation" type="inventory.aai.onap.org.v9.ServiceDesignAndCreation" /> + <xml-element java-attribute="network" name="network" type="inventory.aai.onap.org.v9.Network" /> + <xml-element java-attribute="aaiInternal" name="aai-internal" type="inventory.aai.onap.org.v9.AaiInternal" /> + </java-attributes> + </java-type> + + <java-type name="Search"> + <xml-root-element name="search" /> + <java-attributes> + <xml-element java-attribute="edgeTagQueryResult" name="edge-tag-query-result" type="inventory.aai.onap.org.v9.EdgeTagQueryResult" /> + <xml-element java-attribute="edgeTagQueryRequest" name="edge-tag-query-request" type="inventory.aai.onap.org.v9.EdgeTagQueryRequest" /> + <xml-element java-attribute="searchResults" name="search-results" type="inventory.aai.onap.org.v9.SearchResults" /> + <xml-element java-attribute="sdnZoneResponse" name="sdn-zone-response" type="inventory.aai.onap.org.v9.SdnZoneResponse" /> + </java-attributes> + </java-type> + + <java-type name="EdgeTagQueryResult"> + <xml-root-element name="edge-tag-query-result" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="taggedInventoryItemList" name="tagged-inventory-item-list" type="inventory.aai.onap.org.v9.TaggedInventoryItemList" /> + </java-attributes> + </java-type> + + <java-type name="TaggedInventoryItemList"> + <xml-root-element name="tagged-inventory-item-list" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="inventoryItem" name="inventory-item" type="inventory.aai.onap.org.v9.InventoryItem" /> + </java-attributes> + </java-type> + + <java-type name="InventoryItem"> + <xml-root-element name="inventory-item" /> + <java-attributes> + <xml-element java-attribute="inventoryItemType" name="inventory-item-type" type="java.lang.String" /> + <xml-element java-attribute="inventoryItemLink" name="inventory-item-link" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="inventoryItemData" name="inventory-item-data" type="inventory.aai.onap.org.v9.InventoryItemData" /> + <xml-element container-type="java.util.ArrayList" java-attribute="taggedInventoryItemList" name="tagged-inventory-item-list" type="inventory.aai.onap.org.v9.TaggedInventoryItemList" /> + </java-attributes> + </java-type> + + <java-type name="InventoryItemData"> + <xml-root-element name="inventory-item-data" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String" /> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="EdgeTagQueryRequest"> + <xml-root-element name="edge-tag-query-request" /> + <java-attributes> + <xml-element java-attribute="edgeTag" name="edge-tag" type="java.lang.String" /> + <xml-element java-attribute="resultDetail" name="result-detail" type="java.lang.String" /> + <xml-element java-attribute="startNodeType" name="start-node-type" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="startNodeFilter" name="start-node-filter" type="inventory.aai.onap.org.v9.StartNodeFilter" /> + <xml-element container-type="java.util.ArrayList" java-attribute="includeNodeFilter" name="include-node-filter" type="inventory.aai.onap.org.v9.IncludeNodeFilter" /> + <xml-element container-type="java.util.ArrayList" java-attribute="secondaryFilter" name="secondary-filter" type="inventory.aai.onap.org.v9.SecondaryFilter" /> + </java-attributes> + </java-type> + + <java-type name="StartNodeFilter"> + <xml-root-element name="start-node-filter" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String" /> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="IncludeNodeFilter"> + <xml-root-element name="include-node-filter" /> + <java-attributes> + <xml-element java-attribute="includeNodeType" name="include-node-type" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="SecondaryFilter"> + <xml-root-element name="secondary-filter" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String" /> + <xml-element java-attribute="filterType" name="filter-type" type="java.lang.String" /> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="SearchResults"> + <xml-root-element name="search-results" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="resultData" name="result-data" type="inventory.aai.onap.org.v9.ResultData" /> + </java-attributes> + </java-type> + + <java-type name="ResultData"> + <xml-root-element name="result-data" /> + <java-attributes> + <xml-element java-attribute="resourceType" name="resource-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The specific type of node in the A&AI graph" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceLink" name="resource-link" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The URL to the specific resource" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + + <java-type name="SdnZoneResponse"> + <xml-root-element name="sdn-zone-response" /> + <java-attributes> + <xml-element java-attribute="oamNetworks" name="oam-networks" type="inventory.aai.onap.org.v9.OamNetworks" /> + <xml-element container-type="java.util.ArrayList" java-attribute="azAndDvsSwitches" name="az-and-dvs-switches" type="inventory.aai.onap.org.v9.AzAndDvsSwitches" /> + </java-attributes> + </java-type> + + <java-type name="AzAndDvsSwitches"> + <xml-root-element name="az-and-dvs-switches" /> + <java-attributes> + <xml-element java-attribute="dvsSwitches" name="dvs-switches" type="inventory.aai.onap.org.v9.DvsSwitches" /> + <xml-element java-attribute="availabilityZone" name="availability-zone" type="inventory.aai.onap.org.v9.AvailabilityZone" /> + </java-attributes> + </java-type> + + <java-type name="Actions"> + <xml-properties> + <xml-property name="description" value="APIs that are more action related than REST (e.g., notify, update)." /> + </xml-properties> + <xml-root-element name="actions" /> + <java-attributes> + <xml-element java-attribute="update" name="update" type="inventory.aai.onap.org.v9.Update" /> + <xml-element java-attribute="notify" name="notify" type="inventory.aai.onap.org.v9.Notify" /> + </java-attributes> + </java-type> + + <java-type name="Update"> + <xml-properties> + <xml-property name="description" value="Serves a PATCH like function. Does not enforce concurrency control. Clear each usage with AAI team." /> + </xml-properties> + <xml-root-element name="update" /> + <java-attributes> + <xml-element java-attribute="updateNodeType" name="update-node-type" required="true" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="updateNodeKey" name="update-node-key" type="inventory.aai.onap.org.v9.UpdateNodeKey" /> + <xml-element java-attribute="updateNodeUri" name="update-node-uri" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="action" name="action" type="inventory.aai.onap.org.v9.Action" /> + </java-attributes> + </java-type> + + <java-type name="Action"> + <xml-root-element name="action" /> + <java-attributes> + <xml-element java-attribute="actionType" name="action-type" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="actionData" name="action-data" type="inventory.aai.onap.org.v9.ActionData" /> + </java-attributes> + </java-type> + + <java-type name="ActionData"> + <xml-root-element name="action-data" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String" /> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="UpdateNodeKey"> + <xml-root-element name="update-node-key" /> + <java-attributes> + <xml-element java-attribute="keyName" name="key-name" type="java.lang.String" /> + <xml-element java-attribute="keyValue" name="key-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="Notify"> + <xml-root-element name="notify" /> + <java-attributes> + <xml-element java-attribute="eventId" name="event-id" required="true" type="java.lang.String" /> + <xml-element java-attribute="nodeType" name="node-type" type="java.lang.String" /> + <xml-element java-attribute="eventTrigger" name="event-trigger" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="keyData" name="key-data" type="inventory.aai.onap.org.v9.KeyData" /> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="KeyData"> + <xml-root-element name="key-data" /> + <java-attributes> + <xml-element java-attribute="keyName" name="key-name" type="java.lang.String" /> + <xml-element java-attribute="keyValue" name="key-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="CloudInfrastructure"> + <xml-properties> + <xml-property name="description" value="Namespace for cloud infrastructure." /> + </xml-properties> + <xml-root-element name="cloud-infrastructure" /> + <java-attributes> + <xml-element java-attribute="complexes" name="complexes" type="inventory.aai.onap.org.v9.Complexes" /> + <xml-element java-attribute="cloudRegions" name="cloud-regions" type="inventory.aai.onap.org.v9.CloudRegions" /> + <xml-element java-attribute="networkProfiles" name="network-profiles" type="inventory.aai.onap.org.v9.NetworkProfiles" /> + <xml-element java-attribute="pservers" name="pservers" type="inventory.aai.onap.org.v9.Pservers" /> + <xml-element java-attribute="virtualDataCenters" name="virtual-data-centers" type="inventory.aai.onap.org.v9.VirtualDataCenters" /> + </java-attributes> + </java-type> + + <java-type name="CloudRegions"> + <xml-root-element name="cloud-regions" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="cloudRegion" name="cloud-region" type="inventory.aai.onap.org.v9.CloudRegion" /> + </java-attributes> + </java-type> + + <java-type name="CloudRegion"> + <xml-root-element name="cloud-region" /> + <java-attributes> + <xml-element java-attribute="cloudOwner" name="cloud-owner" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Identifies the vendor and cloud name, e.g., vendor-cloudname. First part of composite key should be formatted as vendor-cloudname" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudRegionId" name="cloud-region-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Identifier used by the vendor for the region. Second part of composite key" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudType" name="cloud-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the cloud (e.g., openstack)" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ownerDefinedType" name="owner-defined-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Cloud-owner defined type indicator (e.g., DCP, LCP)" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudRegionVersion" name="cloud-region-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Software version employed at the site" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="identityUrl" name="identity-url" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL of the keystone identity service" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cloudZone" name="cloud-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Zone where the cloud is homed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="complexName" name="complex-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="complex name for cloud-region instance" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumeGroups" name="volume-groups" type="inventory.aai.onap.org.v9.VolumeGroups" /> + <xml-element java-attribute="tenants" name="tenants" type="inventory.aai.onap.org.v9.Tenants" /> + <xml-element java-attribute="flavors" name="flavors" type="inventory.aai.onap.org.v9.Flavors" /> + <xml-element java-attribute="groupAssignments" name="group-assignments" type="inventory.aai.onap.org.v9.GroupAssignments" /> + <xml-element java-attribute="snapshots" name="snapshots" type="inventory.aai.onap.org.v9.Snapshots" /> + <xml-element java-attribute="images" name="images" type="inventory.aai.onap.org.v9.Images" /> + <xml-element java-attribute="dvsSwitches" name="dvs-switches" type="inventory.aai.onap.org.v9.DvsSwitches" /> + <xml-element java-attribute="oamNetworks" name="oam-networks" type="inventory.aai.onap.org.v9.OamNetworks" /> + <xml-element java-attribute="availabilityZones" name="availability-zones" type="inventory.aai.onap.org.v9.AvailabilityZones" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="cloud-region designates an installation of a cloud cluster or region or instantiation" /> + <xml-property name="indexedProps" value="cloud-owner,cloud-region-id,cloud-type,owner-defined-type" /> + <xml-property name="nameProps" value="owner-defined-type" /> + <xml-property name="container" value="cloud-regions" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + <java-type name="VolumeGroups"> + <xml-properties> + <xml-property name="description" value="Collection of persistent block-level storage." /> + </xml-properties> + <xml-root-element name="volume-groups" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="volumeGroup" name="volume-group" type="inventory.aai.onap.org.v9.VolumeGroup" /> + </java-attributes> + </java-type> + + <java-type name="VolumeGroup"> + <xml-root-element name="volume-group" /> + <java-attributes> + <xml-element java-attribute="volumeGroupId" name="volume-group-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of volume-group." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumeGroupName" name="volume-group-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the volume group." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this volume-group" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this volume-group" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Persistent block-level storage." /> + <xml-property name="indexedProps" value="volume-group-name,vnf-type,heat-stack-id,volume-group-id" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="volume-groups" /> + </xml-properties> + </java-type> + + <java-type name="RelationshipList"> + <xml-root-element name="relationship-list" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="relationship" name="relationship" type="inventory.aai.onap.org.v9.Relationship" /> + </java-attributes> + </java-type> + + <java-type name="Relationship"> + <xml-root-element name="relationship" /> + <java-attributes> + <xml-element java-attribute="relatedTo" name="related-to" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="A keyword provided by A&AI to indicate type of node." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relatedLink" name="related-link" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to the object in A&AI." /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="relationshipData" name="relationship-data" type="inventory.aai.onap.org.v9.RelationshipData" /> + <xml-element container-type="java.util.ArrayList" java-attribute="relatedToProperty" name="related-to-property" type="inventory.aai.onap.org.v9.RelatedToProperty" /> + </java-attributes> + </java-type> + + <java-type name="RelatedToProperty"> + <xml-root-element name="related-to-property" /> + <java-attributes> + <xml-element java-attribute="propertyKey" name="property-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Key part of a key/value pair" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Value part of a key/value pair" /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + + <java-type name="RelationshipData"> + <xml-root-element name="relationship-data" /> + <java-attributes> + <xml-element java-attribute="relationshipKey" name="relationship-key" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="A keyword provided by A&AI to indicate an attribute." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipValue" name="relationship-value" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Value of the attribute." /> + </xml-properties> + </xml-element> + </java-attributes> + </java-type> + + <java-type name="Complexes"> + <xml-properties> + <xml-property name="description" value="Collection of physical locations that can house cloud-regions." /> + </xml-properties> + <xml-root-element name="complexes" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="complex" name="complex" type="inventory.aai.onap.org.v9.Complex" /> + </java-attributes> + </java-type> + + <java-type name="Complex"> + <xml-root-element name="complex" /> + <java-attributes> + <xml-element java-attribute="physicalLocationId" name="physical-location-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier for physical location, e.g., CLLI" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dataCenterCode" name="data-center-code" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Data center code which can be an alternate way to identify a complex" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="complexName" name="complex-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Gamma complex name for LCP instance." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="identityUrl" name="identity-url" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL of the keystone identity service" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="physicalLocationType" name="physical-location-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type, e.g., central office, data center." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="street1" name="street1" required="true" type="java.lang.String" /> + <xml-element java-attribute="street2" name="street2" type="java.lang.String" /> + <xml-element java-attribute="city" name="city" required="true" type="java.lang.String" /> + <xml-element java-attribute="state" name="state" type="java.lang.String" /> + <xml-element java-attribute="postalCode" name="postal-code" required="true" type="java.lang.String" /> + <xml-element java-attribute="country" name="country" required="true" type="java.lang.String" /> + <xml-element java-attribute="region" name="region" required="true" type="java.lang.String" /> + <xml-element java-attribute="latitude" name="latitude" type="java.lang.String" /> + <xml-element java-attribute="longitude" name="longitude" type="java.lang.String" /> + <xml-element java-attribute="elevation" name="elevation" type="java.lang.String" /> + <xml-element java-attribute="lata" name="lata" type="java.lang.String" /> + <xml-element java-attribute="ctagPools" name="ctag-pools" type="inventory.aai.onap.org.v9.CtagPools" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Collection of physical locations that can house cloud-regions." /> + <xml-property name="indexedProps" value="identity-url,data-center-code,complex-name,physical-location-id" /> + <xml-property name="searchable" value="physical-location-id,data-center-code,complex-name,street1,street2,postal-code" /> + <xml-property name="uniqueProps" value="physical-location-id" /> + <xml-property name="container" value="complexes" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + + <java-type name="CtagPools"> + <xml-root-element name="ctag-pools" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="ctagPool" name="ctag-pool" type="inventory.aai.onap.org.v9.CtagPool" /> + </java-attributes> + </java-type> + + <java-type name="CtagPool"> + <xml-root-element name="ctag-pool" /> + <java-attributes> + <xml-element java-attribute="targetPe" name="target-pe" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="The Target provider edge router" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="availabilityZoneName" name="availability-zone-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name of the availability zone" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ctagPoolPurpose" name="ctag-pool-purpose" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Describes what the intended purpose of this pool is." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ctagValues" name="ctag-values" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Comma separated list of ctags" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="A collection of C tags (vlan tags) grouped for a specific purpose." /> + <xml-property name="indexedProps" value="availability-zone-name" /> + <xml-property name="dependentOn" value="complex" /> + <xml-property name="container" value="ctag-pools" /> + </xml-properties> + </java-type> + + <java-type name="Tenants"> + <xml-properties> + <xml-property name="description" value="Collection of openstack tenants." /> + </xml-properties> + <xml-root-element name="tenants" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="tenant" name="tenant" type="inventory.aai.onap.org.v9.Tenant" /> + </java-attributes> + </java-type> + + <java-type name="Tenant"> + <xml-root-element name="tenant" /> + <java-attributes> + <xml-element java-attribute="tenantId" name="tenant-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id relative to the cloud-region." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="tenantName" name="tenant-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Readable name of tenant" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vservers" name="vservers" type="inventory.aai.onap.org.v9.Vservers" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack tenant" /> + <xml-property name="nameProps" value="tenant-name" /> + <xml-property name="indexedProps" value="tenant-name,tenant-id" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="tenants" /> + </xml-properties> + </java-type> + + <java-type name="Vservers"> + <xml-properties> + <xml-property name="description" value="Collection of virtual Servers, aka virtual machines or VMs." /> + </xml-properties> + <xml-root-element name="vservers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vserver" name="vserver" type="inventory.aai.onap.org.v9.Vserver" /> + </java-attributes> + </java-type> + + <java-type name="Vserver"> + <xml-root-element name="vserver" /> + <java-attributes> + <xml-element java-attribute="vserverId" name="vserver-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier for this vserver relative to its tenant" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vserverName" name="vserver-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of vserver" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vserverName2" name="vserver-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternative name of vserver" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vserverSelflink" name="vserver-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="isClosedLoopDisabled" name="is-closed-loop-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Used to indicate whether closed loop function is enabled on this node" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumes" name="volumes" type="inventory.aai.onap.org.v9.Volumes" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v9.LInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Virtual Servers, aka virtual machine or VM." /> + <xml-property name="nameProps" value="vserver-name" /> + <xml-property name="indexedProps" value="is-closed-loop-disabled,prov-status,vserver-name,vserver-id,in-maint,vserver-name2" /> + <xml-property name="searchable" value="vserver-name,vserver-id,vserver-name2" /> + <xml-property name="dependentOn" value="tenant" /> + <xml-property name="container" value="vservers" /> + </xml-properties> + </java-type> + + <java-type name="LInterfaces"> + <xml-properties> + <xml-property name="description" value="Collection of logical interfaces." /> + </xml-properties> + <xml-root-element name="l-interfaces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lInterface" name="l-interface" type="inventory.aai.onap.org.v9.LInterface" /> + </java-attributes> + </java-type> + + <java-type name="LInterface"> + <xml-root-element name="l-interface" /> + <java-attributes> + <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name given to the interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="E.g., CUSTOMER, UPLINK, etc." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="v6WanLinkIp" name="v6-wan-link-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Questionably placed - v6 ip addr of this interface (is in vr-lan-interface from Mary B." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceId" name="interface-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="macaddr" name="macaddr" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="MAC address for the interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkName" name="network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the network" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Whether A&AI should be managing this interface of not. Could have value like CUSTOMER" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlans" name="vlans" type="inventory.aai.onap.org.v9.Vlans" /> + <xml-element java-attribute="sriovVfs" name="sriov-vfs" type="inventory.aai.onap.org.v9.SriovVfs" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv4AddressList" name="l3-interface-ipv4-address-list" type="inventory.aai.onap.org.v9.L3InterfaceIpv4AddressList" /> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv6AddressList" name="l3-interface-ipv6-address-list" type="inventory.aai.onap.org.v9.L3InterfaceIpv6AddressList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Logical interfaces, e.g., a vnic." /> + <xml-property name="indexedProps" value="macaddr,interface-id,interface-name,network-name" /> + <xml-property name="dependentOn" value="generic-vnf,newvce,vpe,p-interface,vserver,lag-interface" /> + <xml-property name="container" value="l-interfaces" /> + </xml-properties> + </java-type> + + <java-type name="SriovVfs"> + <xml-properties> + <xml-property name="description" value="Collection of SR-IOV Virtual Functions." /> + </xml-properties> + <xml-root-element name="sriov-vfs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sriovVf" name="sriov-vf" type="inventory.aai.onap.org.v9.SriovVf" /> + </java-attributes> + </java-type> + <java-type name="SriovVf"> + <xml-root-element name="sriov-vf" /> + <java-attributes> + <xml-element java-attribute="pciId" name="pci-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="PCI ID used to identify the sriov-vf" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfVlanFilter" name="vf-vlan-filter" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This metadata provides option to specify list of VLAN filters applied on VF to pass the traffic to VM." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfMacFilter" name="vf-mac-filter" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="When MAC filters are specified, VF-agent service configures VFs to do MAC level filtering before the traffic is passed to VM." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfVlanStrip" name="vf-vlan-strip" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="When this field is set to true, VF will configured to strip the outer TAG before the traffic is passed to VM." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfVlanAntiSpoofCheck" name="vf-vlan-anti-spoof-check" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option ensures anti VLAN spoof checks are done at the VF level to comply with security. The disable check will also be honored per the VNF needs for trusted VMs." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfMacAntiSpoofCheck" name="vf-mac-anti-spoof-check" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option ensures anti MAC spoof checks are done at the VF level to comply with security. The disable check will also be honored per the VNF needs for trusted VMs." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfMirrors" name="vf-mirrors" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This option defines the set of Mirror objects which essentially mirrors the traffic from source to set of collector VNF Ports." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfBroadcastAllow" name="vf-broadcast-allow" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, sets the VF in promiscuous mode and allows all broadcast traffic to reach the VM" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfUnknownMulticastAllow" name="vf-unknown-multicast-allow" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, sets the VF in promiscuous mode and allows unknown multicast traffic to reach the VM" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfUnknownUnicastAllow" name="vf-unknown-unicast-allow" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, sets the VF in promiscuous mode and allows unknown unicast traffic to reach the VM" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfInsertStag" name="vf-insert-stag" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="This option, if set to true, instructs to insert outer tag after traffic comes out of VM." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfLinkStatus" name="vf-link-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This option is used to set the link status. Valid values as of 1607 are on, off, and auto." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="SR-IOV Virtual Function (not to be confused with virtual network function)" /> + <xml-property name="indexedProps" value="pci-id,vf-vlan-filter,vf-mac-filter,vf-vlan-strip,neutron-network-id" /> + <xml-property name="dependentOn" value="l-interface" /> + <xml-property name="container" value="sriov-vfs" /> + </xml-properties> + </java-type> + + <java-type name="L3InterfaceIpv4AddressList"> + <xml-root-element name="l3-interface-ipv4-address-list" /> + <java-attributes> + <xml-element java-attribute="l3InterfaceIpv4Address" name="l3-interface-ipv4-address" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="IP address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="l3InterfaceIpv4PrefixLength" name="l3-interface-ipv4-prefix-length" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Prefix length, 32 for single address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isFloating" name="is-floating" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Indicator of fixed or floating address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface that address belongs to" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of subnet that address belongs to" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPv4 Address Range" /> + <xml-property name="indexedProps" value="l3-interface-ipv4-address,vlan-id-inner,neutron-network-id,neutron-subnet-id" /> + <xml-property name="dependentOn" value="vlan,l-interface" /> + </xml-properties> + </java-type> + + <java-type name="Vlans"> + <xml-root-element name="vlans" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vlan" name="vlan" type="inventory.aai.onap.org.v9.Vlan" /> + </java-attributes> + </java-type> + + <java-type name="Vlan"> + <xml-root-element name="vlan" /> + <java-attributes> + <xml-element java-attribute="vlanInterface" name="vlan-interface" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="String that identifies the interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanDescription" name="vlan-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to describe (the service associated with) the vlan" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="backdoorConnection" name="backdoor-connection" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Whether customer is going to use this VLAN for backdoor connection to another customer premise device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnId" name="vpn-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This indicates the customers VPN ID associated with this vlan" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv4AddressList" name="l3-interface-ipv4-address-list" type="inventory.aai.onap.org.v9.L3InterfaceIpv4AddressList" /> + <xml-element container-type="java.util.ArrayList" java-attribute="l3InterfaceIpv6AddressList" name="l3-interface-ipv6-address-list" type="inventory.aai.onap.org.v9.L3InterfaceIpv6AddressList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Definition of vlan" /> + <xml-property name="indexedProps" value="vlan-interface,vlan-id-inner,vpn-id" /> + <xml-property name="uniqueProps" value="vpn-id" /> + <xml-property name="dependentOn" value="l-interface" /> + <xml-property name="container" value="vlans" /> + </xml-properties> + </java-type> + + <java-type name="L3InterfaceIpv6AddressList"> + <xml-root-element name="l3-interface-ipv6-address-list" /> + <java-attributes> + <xml-element java-attribute="l3InterfaceIpv6Address" name="l3-interface-ipv6-address" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="IP address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="l3InterfaceIpv6PrefixLength" name="l3-interface-ipv6-prefix-length" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Prefix length, 128 for single address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Inner VLAN tag" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Outer VLAN tag" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isFloating" name="is-floating" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Indicator of fixed or floating address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of the interface that address belongs to" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of subnet that address belongs to" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPv6 Address Range" /> + <xml-property name="indexedProps" value="l3-interface-ipv6-address,vlan-id-inner,neutron-network-id,neutron-subnet-id" /> + <xml-property name="dependentOn" value="vlan,l-interface" /> + </xml-properties> + </java-type> + + <java-type name="Volumes"> + <xml-properties> + <xml-property name="description" value="Collection of ephemeral Block storage volumes." /> + </xml-properties> + <xml-root-element name="volumes" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="volume" name="volume" type="inventory.aai.onap.org.v9.Volume" /> + </java-attributes> + </java-type> + + <java-type name="Volume"> + <xml-root-element name="volume" /> + <java-attributes> + <xml-element java-attribute="volumeId" name="volume-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of block storage volume relative to the vserver." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="volumeSelflink" name="volume-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Ephemeral Block storage volume." /> + <xml-property name="indexedProps" value="volume-id" /> + <xml-property name="dependentOn" value="vserver" /> + <xml-property name="container" value="volumes" /> + </xml-properties> + </java-type> + + <java-type name="Flavors"> + <xml-properties> + <xml-property name="description" value="Collection of openstack flavors." /> + </xml-properties> + <xml-root-element name="flavors" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="flavor" name="flavor" type="inventory.aai.onap.org.v9.Flavor" /> + </java-attributes> + </java-type> + + <java-type name="Flavor"> + <xml-root-element name="flavor" /> + <java-attributes> + <xml-element java-attribute="flavorId" name="flavor-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Flavor id, expected to be unique across cloud-region." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorName" name="flavor-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Flavor name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorVcpus" name="flavor-vcpus" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Number of CPUs" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorRam" name="flavor-ram" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Amount of memory" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorDisk" name="flavor-disk" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Disk space" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorEphemeral" name="flavor-ephemeral" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Amount of ephemeral disk space" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorSwap" name="flavor-swap" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="amount of swap space allocation" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorIsPublic" name="flavor-is-public" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="whether flavor is available to all users or private to the tenant it was created in." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorSelflink" name="flavor-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="flavorDisabled" name="flavor-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="Boolean as to whether this flavor is no longer enabled" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack flavor." /> + <xml-property name="nameProps" value="flavor-name" /> + <xml-property name="indexedProps" value="flavor-name,flavor-id" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="flavors" /> + </xml-properties> + </java-type> + + <java-type name="Snapshots"> + <xml-properties> + <xml-property name="description" value="Collection of openstack snapshots" /> + </xml-properties> + <xml-root-element name="snapshots" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="snapshot" name="snapshot" type="inventory.aai.onap.org.v9.Snapshot" /> + </java-attributes> + </java-type> + + <java-type name="Snapshot"> + <xml-root-element name="snapshot" /> + <java-attributes> + <xml-element java-attribute="snapshotId" name="snapshot-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Snapshot id, this is the key UUID assoc associated in glance with the snapshots." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotName" name="snapshot-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Snapshot name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotArchitecture" name="snapshot-architecture" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operating system architecture" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotOsDistro" name="snapshot-os-distro" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The common name of the operating system distribution in lowercase" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotOsVersion" name="snapshot-os-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The operating system version as specified by the distributor." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="application" name="application" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The application that the image instantiates." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVendor" name="application-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The vendor of the application." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVersion" name="application-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The version of the application." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="snapshotSelflink" name="snapshot-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="prevSnapshotId" name="prev-snapshot-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This field contains the UUID of the previous snapshot (if any)." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack snapshot" /> + <xml-property name="nameProps" value="snapshot-name" /> + <xml-property name="uniqueProps" value="snapshot-id" /> + <xml-property name="indexedProps" value="application,snapshot-name,application-vendor,snapshot-id,application-version,prev-snapshot-id" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="snapshots" /> + </xml-properties> + </java-type> + + <java-type name="GroupAssignments"> + <xml-properties> + <xml-property name="description" value="Collection of openstack group assignments" /> + </xml-properties> + <xml-root-element name="group-assignments" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="groupAssignment" name="group-assignment" type="inventory.aai.onap.org.v9.GroupAssignment" /> + </java-attributes> + </java-type> + + <java-type name="GroupAssignment"> + <xml-root-element name="group-assignment" /> + <java-attributes> + <xml-element java-attribute="groupId" name="group-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Group id, expected to be unique across cloud-region." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupType" name="group-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group type - the type of group this instance refers to" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupName" name="group-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group name - name assigned to the group" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupDescription" name="group-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group description - description of the group" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack group-assignment used to store exclusivity groups (EG)." /> + <xml-property name="nameProps" value="group-name" /> + <xml-property name="indexedProps" value="group-id,group-type,group-name" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="group-assignments" /> + </xml-properties> + </java-type> + + <java-type name="Images"> + <xml-properties> + <xml-property name="description" value="Collectio of Openstack images." /> + </xml-properties> + <xml-root-element name="images" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="image" name="image" type="inventory.aai.onap.org.v9.Image" /> + </java-attributes> + </java-type> + + <java-type name="Image"> + <xml-root-element name="image" /> + <java-attributes> + <xml-element java-attribute="imageId" name="image-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Image id, expected to be unique across cloud region" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageName" name="image-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Image name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageArchitecture" name="image-architecture" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operating system architecture." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageOsDistro" name="image-os-distro" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The common name of the operating system distribution in lowercase" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageOsVersion" name="image-os-version" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The operating system version as specified by the distributor." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="application" name="application" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The application that the image instantiates." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVendor" name="application-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The vendor of the application." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVersion" name="application-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The version of the application." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="imageSelflink" name="image-selflink" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v9.Metadata" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack image." /> + <xml-property name="nameProps" value="image-name" /> + <xml-property name="indexedProps" value="application,image-name,application-vendor,image-id,application-version" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="images" /> + </xml-properties> + </java-type> + + <java-type name="Metadata"> + <xml-properties> + <xml-property name="description" value="Collection of metadatum (key/value pairs)" /> + </xml-properties> + <xml-root-element name="metadata" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="metadatum" name="metadatum" type="inventory.aai.onap.org.v9.Metadatum" /> + </java-attributes> + </java-type> + + <java-type name="Metadatum"> + <xml-root-element name="metadatum" /> + <java-attributes> + <xml-element java-attribute="metaname" name="metaname" required="true" type="java.lang.String" xml-key="true" /> + <xml-element java-attribute="metaval" name="metaval" required="true" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Key/value pairs" /> + <xml-property name="indexedProps" value="metaname" /> + <xml-property name="dependentOn" value="tenant,image,service-instance,connector,model" /> + <xml-property name="container" value="metadata" /> + </xml-properties> + </java-type> + + <java-type name="DvsSwitches"> + <xml-properties> + <xml-property name="description" value="Collection of digital virtual switch metadata used for vmWare VCEs and VPEs." /> + </xml-properties> + <xml-root-element name="dvs-switches" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="dvsSwitch" name="dvs-switch" type="inventory.aai.onap.org.v9.DvsSwitch" /> + </java-attributes> + </java-type> + + <java-type name="DvsSwitch"> + <xml-root-element name="dvs-switch" /> + <java-attributes> + <xml-element java-attribute="switchName" name="switch-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="DVS switch name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vcenterUrl" name="vcenter-url" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL used to reach the vcenter" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Digital virtual switch metadata, used by SDN-C to configure VCEs. A&AI needs to receive this data from the PO deployment team and administer it using the provisioningTool.sh into A&AI. " /> + <xml-property name="indexedProps" value="vcenter-url,switch-name" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="dvs-switches" /> + </xml-properties> + </java-type> + + <java-type name="NetworkProfiles"> + <xml-properties> + <xml-property name="description" value="Collection of network profiles" /> + </xml-properties> + <xml-root-element name="network-profiles" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="networkProfile" name="network-profile" type="inventory.aai.onap.org.v9.NetworkProfile" /> + </java-attributes> + </java-type> + + <java-type name="NetworkProfile"> + <xml-root-element name="network-profile" /> + <java-attributes> + <xml-element java-attribute="nmProfileName" name="nm-profile-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique name of network profile." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="communityString" name="community-string" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encrypted SNMP community string" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Network profile populated by SDN-GP for SNMP" /> + <xml-property name="indexedProps" value="nm-profile-name" /> + <xml-property name="container" value="network-profiles" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + + <java-type name="Pservers"> + <xml-properties> + <xml-property name="description" value="Collection of compute hosts." /> + </xml-properties> + <xml-root-element name="pservers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pserver" name="pserver" type="inventory.aai.onap.org.v9.Pserver" /> + </java-attributes> + </java-type> + + <java-type name="Pserver"> + <xml-root-element name="pserver" /> + <java-attributes> + <xml-element java-attribute="hostname" name="hostname" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Value from executing hostname on the compute node." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ptniiEquipName" name="ptnii-equip-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="PTNII name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="numberOfCpus" name="number-of-cpus" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Number of cpus" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="diskInGigabytes" name="disk-in-gigabytes" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Disk size, in GBs" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ramInMegabytes" name="ram-in-megabytes" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="RAM size, in MBs" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipType" name="equip-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment type. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipVendor" name="equip-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment vendor. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipModel" name="equip-model" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment model. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="fqdn" name="fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Fully-qualified domain name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pserverSelflink" name="pserver-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used to configure device, also used for troubleshooting and is IP used for traps generated by device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serialNumber" name="serial-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Serial number, may be queried" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pserverId" name="pserver-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of Pserver" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="internetTopology" name="internet-topology" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="internet topology of Pserver" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pserverName2" name="pserver-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="alternative pserver name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="purpose" name="purpose" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="purpose of pserver" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="pInterfaces" name="p-interfaces" type="inventory.aai.onap.org.v9.PInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v9.LagInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Compute host whose hostname must be unique and must exactly match what is sent as a relationship to a vserver." /> + <xml-property name="nameProps" value="pserver-name2" /> + <xml-property name="indexedProps" value="hostname,in-maint,pserver-id,pserver-name2" /> + <xml-property name="searchable" value="hostname,pserver-name2,pserver-id,ipv4-oam-address" /> + <xml-property name="container" value="pservers" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + + <java-type name="PInterfaces"> + <xml-properties> + <xml-property name="description" value="Collection of physical interfaces." /> + </xml-properties> + <xml-root-element name="p-interfaces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pInterface" name="p-interface" type="inventory.aai.onap.org.v9.PInterface" /> + </java-attributes> + </java-type> + + <java-type name="PInterface"> + <xml-root-element name="p-interface" /> + <java-attributes> + <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name that identifies the physical interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portDescription" name="port-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Nature of the services and connectivity on this port." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentIdentifier" name="equipment-identifier" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="CLEI or other specification for p-interface hardware." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role specification for p-interface hardware." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceType" name="interface-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates the physical properties of the interface." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v9.LInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Physical interface (e.g., nic)" /> + <xml-property name="indexedProps" value="interface-name" /> + <xml-property name="dependentOn" value="vpls-pe,pserver,pnf" /> + <xml-property name="container" value="p-interfaces" /> + </xml-properties> + </java-type> + + <java-type name="LagInterfaces"> + <xml-properties> + <xml-property name="description" value="Collection of link aggregate interfaces." /> + </xml-properties> + <xml-root-element name="lag-interfaces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lagInterface" name="lag-interface" type="inventory.aai.onap.org.v9.LagInterface" /> + </java-attributes> + </java-type> + + <java-type name="LagInterface"> + <xml-root-element name="lag-interface" /> + <java-attributes> + <xml-element java-attribute="interfaceName" name="interface-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name that identifies the link aggregate interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v9.LInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Link aggregate interface" /> + <xml-property name="indexedProps" value="interface-name" /> + <xml-property name="dependentOn" value="generic-vnf,pserver,vpe,vpls-pe,pnf" /> + <xml-property name="container" value="lag-interfaces" /> + </xml-properties> + </java-type> + + <java-type name="OamNetworks"> + <xml-properties> + <xml-property name="description" value="Collection of OAM networks, to be deprecated shortly. Do not use for new purposes. " /> + </xml-properties> + <xml-root-element name="oam-networks" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="oamNetwork" name="oam-network" type="inventory.aai.onap.org.v9.OamNetwork" /> + </java-attributes> + </java-type> + + <java-type name="OamNetwork"> + <xml-root-element name="oam-network" /> + <java-attributes> + <xml-element java-attribute="networkUuid" name="network-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID of the network. Unique across a cloud-region" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkName" name="network-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the network." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cvlanTag" name="cvlan-tag" required="true" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="cvlan-id" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddress" name="ipv4-oam-gateway-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for VNF firewall rule so customer cannot send customer traffic over this oam network" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddressPrefixLength" name="ipv4-oam-gateway-address-prefix-length" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Used for VNF firewall rule so customer cannot send customer traffic over this oam network" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="OAM network, to be deprecated shortly. Do not use for new purposes. " /> + <xml-property name="nameProps" value="network-name" /> + <xml-property name="indexedProps" value="cvlan-tag,network-uuid,network-name" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="oam-networks" /> + </xml-properties> + </java-type> + + <java-type name="AvailabilityZones"> + <xml-properties> + <xml-property name="description" value="Collection of availability zones" /> + </xml-properties> + <xml-root-element name="availability-zones" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="availabilityZone" name="availability-zone" type="inventory.aai.onap.org.v9.AvailabilityZone" /> + </java-attributes> + </java-type> + + <java-type name="AvailabilityZone"> + <xml-root-element name="availability-zone" /> + <java-attributes> + <xml-element java-attribute="availabilityZoneName" name="availability-zone-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Name of the availability zone. Unique across a cloud region" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="hypervisorType" name="hypervisor-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of hypervisor. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="State that indicates whether the availability zone should be used, etc. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Availability zone, a collection of compute hosts/pservers" /> + <xml-property name="indexedProps" value="availability-zone-name" /> + <xml-property name="dependentOn" value="cloud-region" /> + <xml-property name="container" value="availability-zones" /> + </xml-properties> + </java-type> + + <java-type name="VirtualDataCenters"> + <xml-properties> + <xml-property name="description" value="Virtual organization of cloud infrastructure elements in a data center context" /> + </xml-properties> + <xml-root-element name="virtual-data-centers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="virtualDataCenter" name="virtual-data-center" type="inventory.aai.onap.org.v9.VirtualDataCenter" /> + </java-attributes> + </java-type> + + <java-type name="VirtualDataCenter"> + <xml-root-element name="virtual-data-center" /> + <java-attributes> + <xml-element java-attribute="vdcId" name="vdc-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of the vdc" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vdcName" name="vdc-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the virtual data center" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Virtual organization of cloud infrastructure elements in a data center context" /> + <xml-property name="nameProps" value="vdc-name" /> + <xml-property name="indexedProps" value="vdc-name,vdc-id" /> + <xml-property name="container" value="virtual-data-centers" /> + <xml-property name="namespace" value="cloud-infrastructure" /> + </xml-properties> + </java-type> + + <java-type name="LicenseManagement"> + <xml-root-element name="license-management" /> + <java-attributes> + <xml-element java-attribute="licenseKeyResources" name="license-key-resources" type="inventory.aai.onap.org.v9.LicenseKeyResources" /> + </java-attributes> + </java-type> + + <java-type name="LicenseKeyResources"> + <xml-root-element name="license-key-resources" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="licenseKeyResource" name="license-key-resource" type="inventory.aai.onap.org.v9.LicenseKeyResource" /> + </java-attributes> + </java-type> + + <java-type name="LicenseKeyResource"> + <xml-root-element name="license-key-resource" /> + <java-attributes> + <xml-element java-attribute="attUuid" name="att-uuid" required="true" type="java.lang.String" xml-key="true" /> + <xml-element java-attribute="assignmentType" name="assignment-type" type="java.lang.String" /> + <xml-element java-attribute="assignmentStatus" name="assignment-status" type="java.lang.String" /> + <xml-element java-attribute="assignmentGroupUuid" name="assignment-group-uuid" required="true" type="java.lang.String" /> + <xml-element java-attribute="assignmentDate" name="assignment-date" type="java.lang.String" /> + <xml-element java-attribute="name" name="name" type="java.lang.String" /> + <xml-element java-attribute="modelUuid" name="model-uuid" type="java.lang.String" /> + <xml-element java-attribute="modelVersion" name="model-version" type="java.lang.String" /> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String" /> + <xml-element java-attribute="licenseKeyFileUrl" name="license-key-file-url" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="supplierReleaseList" name="supplier-release-list" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="nameProps" value="name" /> + <xml-property name="indexedProps" value="assignment-group-uuid,att-uuid,name" /> + <xml-property name="uniqueProps" value="att-uuid" /> + <xml-property name="container" value="license-key-resources" /> + <xml-property name="namespace" value="license-management" /> + </xml-properties> + </java-type> + + <java-type name="Business"> + <xml-properties> + <xml-property name="description" value="Namespace for business related constructs" /> + </xml-properties> + <xml-root-element name="business" /> + <java-attributes> + <xml-element java-attribute="connectors" name="connectors" type="inventory.aai.onap.org.v9.Connectors" /> + <xml-element java-attribute="customers" name="customers" type="inventory.aai.onap.org.v9.Customers" /> + </java-attributes> + </java-type> + + <java-type name="Connectors"> + <xml-properties> + <xml-property name="description" value="Collection of resource instances used to connect a variety of disparate inventory widgets" /> + </xml-properties> + <xml-root-element name="connectors" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="connector" name="connector" type="inventory.aai.onap.org.v9.Connector" /> + </java-attributes> + </java-type> + + <java-type name="Connector"> + <xml-root-element name="connector" /> + <java-attributes> + <xml-element java-attribute="resourceInstanceId" name="resource-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of resource instance." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelId" name="persona-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v9.Metadata" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Collection of resource instances used to connect a variety of disparate inventory widgets" /> + <xml-property name="indexedProps" value="resource-instance-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version" /> + <xml-property name="container" value="connectors" /> + <xml-property name="namespace" value="business" /> + </xml-properties> + </java-type> + + <java-type name="Customers"> + <xml-properties> + <xml-property name="description" value="Collection of customer identifiers to provide linkage back to BSS information." /> + </xml-properties> + <xml-root-element name="customers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="customer" name="customer" type="inventory.aai.onap.org.v9.Customer" /> + </java-attributes> + </java-type> + + <java-type name="Customer"> + <xml-root-element name="customer" /> + <java-attributes> + <xml-element java-attribute="globalCustomerId" name="global-customer-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Global customer id used across ECOMP to uniquely identify customer." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="subscriberName" name="subscriber-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Subscriber name, an alternate way to retrieve a customer." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="subscriberType" name="subscriber-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Subscriber type, a way to provide VID with only the INFRA customers." /> + <xml-property name="defaultValue" value="CUST" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceSubscriptions" name="service-subscriptions" type="inventory.aai.onap.org.v9.ServiceSubscriptions" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="customer identifiers to provide linkage back to BSS information." /> + <xml-property name="nameProps" value="subscriber-name" /> + <xml-property name="indexedProps" value="subscriber-name,global-customer-id,subscriber-type" /> + <xml-property name="searchable" value="subscriber-name,global-customer-id" /> + <xml-property name="uniqueProps" value="global-customer-id,subscriber-name" /> + <xml-property name="alternateKeys1" value="subscriber-name" /> + <xml-property name="container" value="customers" /> + <xml-property name="namespace" value="business" /> + </xml-properties> + </java-type> + + <java-type name="ServiceSubscriptions"> + <xml-properties> + <xml-property name="description" value="Collection of objects that group service instances." /> + </xml-properties> + <xml-root-element name="service-subscriptions" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="serviceSubscription" name="service-subscription" type="inventory.aai.onap.org.v9.ServiceSubscription" /> + </java-attributes> + </java-type> + + <java-type name="ServiceSubscription"> + <xml-root-element name="service-subscription" /> + <java-attributes> + <xml-element java-attribute="serviceType" name="service-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Value defined by orchestration to identify this service across ECOMP." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="tempUbSubAccountId" name="temp-ub-sub-account-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This property will be deleted from A&AI in the near future. Only stop gap solution." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceInstances" name="service-instances" type="inventory.aai.onap.org.v9.ServiceInstances"> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Object that group service instances." /> + <xml-property name="indexedProps" value="service-type" /> + <xml-property name="dependentOn" value="customer" /> + <xml-property name="container" value="service-subscriptions" /> + </xml-properties> + </java-type> + + <java-type name="ServiceInstances"> + <xml-properties> + <xml-property name="description" value="Collection of service instances" /> + </xml-properties> + <xml-root-element name="service-instances" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="serviceInstance" name="service-instance" type="inventory.aai.onap.org.v9.ServiceInstance" /> + </java-attributes> + </java-type> + + <java-type name="ServiceInstance"> + <xml-root-element name="service-instance" /> + <java-attributes> + <xml-element java-attribute="serviceInstanceId" name="service-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Uniquely identifies this instance of a service" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceInstanceName" name="service-instance-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="This field will store a name assigned to the service-instance." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelId" name="persona-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthTotal" name="bandwidth-total" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates the total bandwidth to be used for this service." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthUpWan1" name="bandwidth-up-wan1" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="indicates the upstream bandwidth this service will use on the WAN1 port of the physical device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthDownWan1" name="bandwidth-down-wan1" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="indicates the downstream bandwidth this service will use on the WAN1 port of the physical device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthUpWan2" name="bandwidth-up-wan2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="indicates the upstream bandwidth this service will use on the WAN2 port of the physical device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="bandwidthDownWan2" name="bandwidth-down-wan2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="indicates the downstream bandwidth this service will use on the WAN2 port of the physical device." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vhnPortalUrl" name="vhn-portal-url" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL customers will use to access the vHN Portal." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Operational status of the service-instance." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceInstanceLocationId" name="service-instance-location-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="An identifier that customers assign to the location where this service is being used." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v9.Metadata" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Instance of a service" /> + <xml-property name="indexedProps" value="service-instance-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version,service-instance-name,service-instance-location-id" /> + <xml-property name="nameProps" value="service-instance-name" /> + <xml-property name="searchable" value="service-instance-id" /> + <xml-property name="uniqueProps" value="service-instance-id" /> + <xml-property name="dependentOn" value="service-subscription" /> + <xml-property name="container" value="service-instances" /> + </xml-properties> + </java-type> + + <java-type name="ServiceDesignAndCreation"> + <xml-properties> + <xml-property name="description" value="Namespace for objects managed by ASDC" /> + </xml-properties> + <xml-root-element name="service-design-and-creation" /> + <java-attributes> + <xml-element java-attribute="vnfImages" name="vnf-images" type="inventory.aai.onap.org.v9.VnfImages" /> + <xml-element java-attribute="services" name="services" type="inventory.aai.onap.org.v9.Services" /> + <xml-element java-attribute="serviceCapabilities" name="service-capabilities" type="inventory.aai.onap.org.v9.ServiceCapabilities" /> + <xml-element java-attribute="models" name="models" type="inventory.aai.onap.org.v9.Models" /> + <xml-element java-attribute="namedQueries" name="named-queries" type="inventory.aai.onap.org.v9.NamedQueries" /> + </java-attributes> + </java-type> + + <java-type name="VnfImages"> + <xml-properties> + <xml-property name="description" value="Collection of image objects that pertain to a VNF that doesn't have associated vservers. This is a kludge." /> + </xml-properties> + <xml-root-element name="vnf-images" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vnfImage" name="vnf-image" type="inventory.aai.onap.org.v9.VnfImage" /> + </java-attributes> + </java-type> + + <java-type name="VnfImage"> + <xml-root-element name="vnf-image" /> + <java-attributes> + <xml-element java-attribute="attUuid" name="att-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of this asset" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="application" name="application" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The application that the image instantiates." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVendor" name="application-vendor" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The vendor of the application." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="applicationVersion" name="application-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The version of the application." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="selflink" name="selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Image object that pertain to a VNF that doesn't have associated vservers. This is a kludge." /> + <xml-property name="indexedProps" value="application,att-uuid,application-vendor,application-version" /> + <xml-property name="uniqueProps" value="att-uuid" /> + <xml-property name="container" value="vnf-images" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + </java-type> + + <java-type name="Services"> + <xml-properties> + <xml-property name="description" value="Collection of service model definitions. Likely to be deprecated in favor of models from ASDC." /> + </xml-properties> + <xml-root-element name="services" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="service" name="service" type="inventory.aai.onap.org.v9.Service" /> + </java-attributes> + </java-type> + + <java-type name="Service"> + <xml-root-element name="service" /> + <java-attributes> + <xml-element java-attribute="serviceId" name="service-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="This gets defined by others to provide a unique ID for the service, we accept what is sent." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceDescription" name="service-description" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description of the service" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceSelflink" name="service-selflink" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="URL to endpoint where AAI can get more details" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceVersion" name="service-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="service version" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Stand-in for service model definitions. Likely to be deprecated in favor of models from ASDC." /> + <xml-property name="indexedProps" value="service-description,service-id" /> + <xml-property name="container" value="services" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + </java-type> + + <java-type name="ServiceCapabilities"> + <xml-properties> + <xml-property name="description" value="Collection of service capabilities." /> + </xml-properties> + <xml-root-element name="service-capabilities" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="serviceCapability" name="service-capability" type="inventory.aai.onap.org.v9.ServiceCapability" /> + </java-attributes> + </java-type> + + <java-type name="ServiceCapability"> + <xml-root-element name="service-capability" /> + <java-attributes> + <xml-element java-attribute="serviceType" name="service-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="This gets defined by others to provide a unique ID for the service, we accept what is sent." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Early definition of server/resource pairings, likely to be replaced by models. No new use should be made of this." /> + <xml-property name="indexedProps" value="service-type,vnf-type" /> + <xml-property name="container" value="service-capabilities" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + </java-type> + + <java-type name="Network"> + <xml-properties> + <xml-property name="description" value="Namespace for network inventory resources." /> + </xml-properties> + <xml-root-element name="network" /> + <java-attributes> + <xml-element java-attribute="logicalLinks" name="logical-links" type="inventory.aai.onap.org.v9.LogicalLinks" /> + <xml-element java-attribute="sitePairSets" name="site-pair-sets" type="inventory.aai.onap.org.v9.SitePairSets" /> + <xml-element java-attribute="vpnBindings" name="vpn-bindings" type="inventory.aai.onap.org.v9.VpnBindings" /> + <xml-element java-attribute="vplsPes" name="vpls-pes" type="inventory.aai.onap.org.v9.VplsPes" /> + <xml-element java-attribute="multicastConfigurations" name="multicast-configurations" type="inventory.aai.onap.org.v9.MulticastConfigurations" /> + <xml-element java-attribute="vces" name="vces" type="inventory.aai.onap.org.v9.Vces" /> + <xml-element java-attribute="vpes" name="vpes" type="inventory.aai.onap.org.v9.Vpes" /> + <xml-element java-attribute="vnfcs" name="vnfcs" type="inventory.aai.onap.org.v9.Vnfcs" /> + <xml-element java-attribute="l3Networks" name="l3-networks" type="inventory.aai.onap.org.v9.L3Networks" /> + <xml-element java-attribute="networkPolicies" name="network-policies" type="inventory.aai.onap.org.v9.NetworkPolicies" /> + <xml-element java-attribute="genericVnfs" name="generic-vnfs" type="inventory.aai.onap.org.v9.GenericVnfs" /> + <xml-element java-attribute="lagLinks" name="lag-links" type="inventory.aai.onap.org.v9.LagLinks" /> + <xml-element java-attribute="newvces" name="newvces" type="inventory.aai.onap.org.v9.Newvces" /> + <xml-element java-attribute="pnfs" name="pnfs" type="inventory.aai.onap.org.v9.Pnfs" /> + <xml-element java-attribute="physicalLinks" name="physical-links" type="inventory.aai.onap.org.v9.PhysicalLinks" /> + <xml-element java-attribute="ipsecConfigurations" name="ipsec-configurations" type="inventory.aai.onap.org.v9.IpsecConfigurations" /> + <xml-element java-attribute="routeTableReferences" name="route-table-references" type="inventory.aai.onap.org.v9.RouteTableReferences" /> + </java-attributes> + </java-type> + + <java-type name="LogicalLinks"> + <xml-properties> + <xml-property name="description" value="Collection of logical connections" /> + </xml-properties> + <xml-root-element name="logical-links" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="logicalLink" name="logical-link" type="inventory.aai.onap.org.v9.LogicalLink" /> + </java-attributes> + </java-type> + + <java-type name="LogicalLink"> + <xml-root-element name="logical-link" /> + <java-attributes> + <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="e.g., evc-name, or vnf-nameA_interface-nameA_vnf-nameZ_interface-nameZ" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkType" name="link-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of logical link, e.g., evc" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4, v6, or ds for dual stack (should be att-ip-version)" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="routingProtocol" name="routing-protocol" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="For example, static or BGP" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelId" name="persona-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalStatus" name="operational-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indication of operational status of the logical link." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkRole" name="link-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indication of the network use of the logical link." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkName2" name="link-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alias or alternate name (CLCI or D1 name)." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="linkId" name="link-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the logical-link, SDNC generates this." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Logical links generally connect l-interfaces but are used to express logical connectivity between two points" /> + <xml-property name="indexedProps" value="link-name,persona-model-id,persona-model-version,widget-model-id,widget-model-version,link-id" /> + <xml-property name="uniqueProps" value="link-id" /> + <xml-property name="container" value="logical-links" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="SitePairSets"> + <xml-properties> + <xml-property name="description" value="Collection of sets of instances for probes related to generic-vnf" /> + </xml-properties> + <xml-root-element name="site-pair-sets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sitePairSet" name="site-pair-set" type="inventory.aai.onap.org.v9.SitePairSet" /> + </java-attributes> + </java-type> + + <java-type name="SitePairSet"> + <xml-root-element name="site-pair-set" /> + <java-attributes> + <xml-element java-attribute="sitePairSetId" name="site-pair-set-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of site pair set." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="routingInstances" name="routing-instances" type="inventory.aai.onap.org.v9.RoutingInstances" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Set of instances for probes used to measure service level agreements" /> + <xml-property name="indexedProps" value="site-pair-set-id" /> + <xml-property name="uniqueProps" value="site-pair-set-id" /> + <xml-property name="container" value="site-pair-sets" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="RoutingInstances"> + <xml-properties> + <xml-property name="description" value="set of probes related to generic-vnf routing instance" /> + </xml-properties> + <xml-root-element name="routing-instances" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="routingInstance" name="routing-instance" type="inventory.aai.onap.org.v9.RoutingInstance" /> + </java-attributes> + </java-type> + + <java-type name="RoutingInstance"> + <xml-root-element name="routing-instance" /> + <java-attributes> + <xml-element java-attribute="routingInstanceId" name="routing-instance-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of routing instance" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="rpmOwner" name="rpm-owner" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="rpm owner" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sitePairs" name="site-pairs" type="inventory.aai.onap.org.v9.SitePairs" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="routing-instance-id" /> + <xml-property name="uniqueProps" value="routing-instance-id" /> + <xml-property name="dependentOn" value="site-pair-set" /> + <xml-property name="container" value="routing-instances" /> + </xml-properties> + </java-type> + + <java-type name="SitePairs"> + <xml-properties> + <xml-property name="description" value="probe within a set" /> + </xml-properties> + <xml-root-element name="site-pairs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="sitePair" name="site-pair" type="inventory.aai.onap.org.v9.SitePair" /> + </java-attributes> + </java-type> + + <java-type name="SitePair"> + <xml-root-element name="site-pair" /> + <java-attributes> + <xml-element java-attribute="sitePairId" name="site-pair-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique identifier of probe" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sourceIp" name="source-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prefix address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="destinationIp" name="destination-ip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Prefix address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ip version, v4, v6" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="destinationHostname" name="destination-hostname" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Hostname of the destination equipment to which SLAs are measured against." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="destinationEquipType" name="destination-equip-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The type of destinatination equipment. Could be Router, UCPE, etc." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="classesOfService" name="classes-of-service" type="inventory.aai.onap.org.v9.ClassesOfService" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="site-pair-id" /> + <xml-property name="uniqueProps" value="site-pair-id" /> + <xml-property name="dependentOn" value="routing-instance" /> + <xml-property name="container" value="site-pairs" /> + </xml-properties> + </java-type> + + <java-type name="ClassesOfService"> + <xml-properties> + <xml-property name="description" value="class-of-service of probe" /> + </xml-properties> + <xml-root-element name="classes-of-service" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="classOfService" name="class-of-service" type="inventory.aai.onap.org.v9.ClassOfService" /> + </java-attributes> + </java-type> + + <java-type name="ClassOfService"> + <xml-root-element name="class-of-service" /> + <java-attributes> + <xml-element java-attribute="cos" name="cos" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique identifier of probe" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="probeId" name="probe-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="identifier of probe" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="probeType" name="probe-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="type of probe" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="cos" /> + <xml-property name="dependentOn" value="site-pair" /> + <xml-property name="container" value="classes-of-service" /> + </xml-properties> + </java-type> + + <java-type name="VpnBindings"> + <xml-root-element name="vpn-bindings" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vpnBinding" name="vpn-binding" type="inventory.aai.onap.org.v9.VpnBinding" /> + </java-attributes> + </java-type> + + <java-type name="VpnBinding"> + <xml-root-element name="vpn-binding" /> + <java-attributes> + <xml-element java-attribute="vpnId" name="vpn-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="VPN ID, globally unique within A&AI" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnName" name="vpn-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="VPN Name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="globalRouteTarget" name="global-route-target" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Number used to identify a VPN, globally unique in the network" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpnPlatform" name="vpn-platform" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the platform associated with the VPN example AVPN, Mobility" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList"> + <xml-properties> + <xml-property name="description" value="l3-networks relate to vpn-bindings" /> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="VPN binding" /> + <xml-property name="nameProps" value="vpn-name" /> + <xml-property name="indexedProps" value="vpn-name,vpn-id,global-route-target" /> + <xml-property name="uniqueProps" value="vpn-id" /> + <xml-property name="container" value="vpn-bindings" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="VplsPes"> + <xml-properties> + <xml-property name="description" value="Collection of VPLS Provider Edge routers" /> + </xml-properties> + <xml-root-element name="vpls-pes" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vplsPe" name="vpls-pe" type="inventory.aai.onap.org.v9.VplsPe" /> + </java-attributes> + </java-type> + + <java-type name="VplsPe"> + <xml-root-element name="vpls-pe" /> + <java-attributes> + <xml-element java-attribute="equipmentName" name="equipment-name" required="true" type="java.lang.String" xml-key="true" /> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this VNF by BAU Service Assurance systems." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vpe, also used for troubleshooting and is IP used for traps generated by VPE (v4-loopback0-ip-address)." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value, e.g., VPLS-PE." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Temporary location for stag to get to VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="pInterfaces" name="p-interfaces" type="inventory.aai.onap.org.v9.PInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v9.LagInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="VPLS Provider Edge routers." /> + <xml-property name="indexedProps" value="prov-status,equipment-name" /> + <xml-property name="container" value="vpls-pes" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="MulticastConfigurations"> + <xml-properties> + <xml-property name="description" value="multicast configuration of generic-vnf ip-address" /> + </xml-properties> + <xml-root-element name="multicast-configurations" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="multicastConfiguration" name="multicast-configuration" type="inventory.aai.onap.org.v9.MulticastConfiguration" /> + </java-attributes> + </java-type> + + <java-type name="MulticastConfiguration"> + <xml-root-element name="multicast-configuration" /> + <java-attributes> + <xml-element java-attribute="multicastConfigurationId" name="multicast-configuration-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of multicast configuration." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="multicastProtocol" name="multicast-protocol" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="protocol of multicast configuration" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="rpType" name="rp-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="rp type of multicast configuration" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="multicast-configuration-id" /> + <xml-property name="uniqueProps" value="multicast-configuration-id" /> + <xml-property name="container" value="multicast-configurations" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="Vces"> + <xml-properties> + <xml-property name="description" value="Collection of Virtual Customer Edge Routers, used specifically for Gamma. This object is deprecated." /> + </xml-properties> + <xml-root-element name="vces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vce" name="vce" type="inventory.aai.onap.org.v9.Vce" /> + </java-attributes> + </java-type> + + <java-type name="Vce"> + <xml-root-element name="vce" /> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service from ASDC. Expect this to change as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceZone" name="regional-resource-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Regional way of organizing pservers, source of truth should define values" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="License key" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network role being played by this VNF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vpeId" name="vpe-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique ID of VPE connected to this VCE." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="v6VceWanAddress" name="v6-vce-wan-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Valid v6 IP address for the WAN Link on this router. Implied length of /64." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vce, also used for troubleshooting and is IP used for traps generated by VCE." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Loopback0Address" name="ipv4-loopback0-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Loopback0 address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="entitlementResourceUuid" name="entitlement-resource-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Entitlement resource uuid" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portGroups" name="port-groups" type="inventory.aai.onap.org.v9.PortGroups" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Virtual Customer Edge Router, used specifically for Gamma. This object is deprecated." /> + <xml-property name="nameProps" value="vnf-name" /> + <xml-property name="indexedProps" value="vnf-name,vnf-name2,vnf-type,heat-stack-id,vnf-id,interface-name,regional-resource-zone,vpe-id,prov-status,service-id" /> + <xml-property name="searchable" value="vnf-id,vnf-name,vnf-name2" /> + <xml-property name="uniqueProps" value="vnf-id" /> + <xml-property name="container" value="vces" /> + <xml-property name="namespace" value="network" /> + <xml-property name="extends" value="vnf" /> + </xml-properties> + </java-type> + + <java-type name="PortGroups"> + <xml-root-element name="port-groups" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="portGroup" name="port-group" type="inventory.aai.onap.org.v9.PortGroup" /> + </java-attributes> + </java-type> + + <java-type name="PortGroup"> + <xml-root-element name="port-group" /> + <java-attributes> + <xml-element java-attribute="interfaceId" name="interface-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of the interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of this Interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkName" name="neutron-network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network name of this Interface" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="interfaceRole" name="interface-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role assigned to this Interface, should use values as defined in ECOMP Yang models." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portGroupId" name="port-group-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique ID for port group in vmware" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="portGroupName" name="port-group-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Likely to duplicate value of neutron network name" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="switchName" name="switch-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="DVS or standard switch name (should be non-null for port groups associated with DVS)" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cvlanTags" name="cvlan-tags" type="inventory.aai.onap.org.v9.CvlanTags" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Used to capture the network interfaces of this VCE" /> + <xml-property name="nameProps" value="port-group-name" /> + <xml-property name="indexedProps" value="port-group-id,heat-stack-id,interface-id,interface-name,switch-name" /> + <xml-property name="dependentOn" value="vce" /> + <xml-property name="container" value="port-groups" /> + </xml-properties> + </java-type> + + <java-type name="CvlanTags"> + <xml-root-element name="cvlan-tags" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="cvlanTagEntry" name="cvlan-tag-entry" type="inventory.aai.onap.org.v9.CvlanTagEntry" /> + </java-attributes> + </java-type> + + <java-type name="CvlanTagEntry"> + <xml-root-element name="cvlan-tag-entry" /> + <java-attributes> + <xml-element java-attribute="cvlanTag" name="cvlan-tag" required="true" type="java.lang.Long" xml-key="true"> + <xml-properties> + <xml-property name="description" value="See mis-na-virtualization-platform.yang" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="dependentOn" value="port-group" /> + <xml-property name="indexedProps" value="cvlan-tag" /> + <xml-property name="container" value="cvlan-tags" /> + </xml-properties> + </java-type> + + <java-type name="Vpes"> + <xml-properties> + <xml-property name="description" value="Virtual provider edge router. In 1504, A&AI will populate this object through an M&P and tool provided to operations." /> + </xml-properties> + <xml-root-element name="vpes" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vpe" name="vpe" type="inventory.aai.onap.org.v9.Vpe" /> + </java-attributes> + </java-type> + + <java-type name="Vpe"> + <xml-root-element name="vpe" /> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service from ASDC" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceZone" name="regional-resource-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Regional way of organizing pservers, source of truth should define values" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="License key" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vpe, also used for troubleshooting and is IP used for traps generated by VPE (v4-loopback0-ip-address)." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddressPrefixLength" name="ipv4-oam-gateway-address-prefix-length" type="java.lang.Integer"> + <xml-properties> + <xml-property name="description" value="Prefix length for oam-address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamGatewayAddress" name="ipv4-oam-gateway-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Gateway address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="v4Loopback0IpAddress" name="v4-loopback0-ip-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Loopback0 address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vlanIdOuter" name="vlan-id-outer" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="Temporary location for stag to get to VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="asNumber" name="as-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="as-number of the VPE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="summaryStatus" name="summary-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="details regarding the vpe operation" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="encryptedAccessFlag" name="encrypted-access-flag" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="indicates whether vpe access uses SSH" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v9.LInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v9.LagInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Relationship-list must include related to info for complex." /> + <xml-property name="nameProps" value="vnf-name" /> + <xml-property name="indexedProps" value="vnf-name,vnf-name2,vnf-type,heat-stack-id,vnf-id,regional-resource-zone,prov-status,service-id" /> + <xml-property name="searchable" value="vnf-id,vnf-name,vnf-name2" /> + <xml-property name="uniqueProps" value="vnf-id" /> + <xml-property name="container" value="vpes" /> + <xml-property name="namespace" value="network" /> + <xml-property name="extends" value="vnf" /> + </xml-properties> + </java-type> + + <java-type name="Vnfcs"> + <xml-properties> + <xml-property name="description" value="virtual network components associated with a vserver from application controller." /> + </xml-properties> + <xml-root-element name="vnfcs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vnfc" name="vnfc" type="inventory.aai.onap.org.v9.Vnfc" /> + </java-attributes> + </java-type> + + <java-type name="Vnfc"> + <xml-root-element name="vnfc" /> + <java-attributes> + <xml-element java-attribute="vnfcName" name="vnfc-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of vnfc." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfcFunctionCode" name="vnfc-function-code" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="function code" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfcType" name="vnfc-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="type" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="prov status of this vnfc" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by APP-C" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4OamVip" name="ipaddress-v4-oam-vip" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Oam V4 vip address of this vnfc" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="isClosedLoopDisabled" name="is-closed-loop-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether closed loop function is enabled on this node" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="groupNotation" name="group-notation" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group notation of VNFC" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="vnfc-name,prov-status,vnfc-type,vnfc-function-code,ipaddress-v4-oam-vip,in-maint,is-closed-loop-disabled,group-notation" /> + <xml-property name="container" value="vnfcs" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="L3Networks"> + <xml-root-element name="l3-networks" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="l3Network" name="l3-network" type="inventory.aai.onap.org.v9.L3Network" /> + </java-attributes> + </java-type> + + <java-type name="L3Network"> + <xml-root-element name="l3-network" /> + <java-attributes> + <xml-element java-attribute="networkId" name="network-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Network ID, should be uuid. Unique across A&AI." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkName" name="network-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the network, governed by some naming convention.." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkType" name="network-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the network - who defines these values?" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkRole" name="network-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Role the network plans - who defines these values?" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkTechnology" name="network-technology" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network technology - who defines these values?" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronNetworkId" name="neutron-network-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron network id of this Interface" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="isBoundToVpn" name="is-bound-to-vpn" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Set to true if bound to VPN" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service from ASDC" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkRoleInstance" name="network-role-instance" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="network role instance" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="contrailNetworkFqdn" name="contrail-network-fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contrail FQDN for the network" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelId" name="persona-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="physicalNetworkName" name="physical-network-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name associated with the physical network." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isProviderNetwork" name="is-provider-network" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="boolean indicatating whether or not network is a provider network." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isSharedNetwork" name="is-shared-network" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="boolean indicatating whether or not network is a shared network." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="isExternalNetwork" name="is-external-network" required="true" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="boolean indicatating whether or not network is an external network." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="subnets" name="subnets" type="inventory.aai.onap.org.v9.Subnets" /> + <xml-element java-attribute="ctagAssignments" name="ctag-assignments" type="inventory.aai.onap.org.v9.CtagAssignments" /> + <xml-element java-attribute="segmentationAssignments" name="segmentation-assignments" type="inventory.aai.onap.org.v9.SegmentationAssignments" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" > + <xml-properties> + <xml-property name="description" value="Relates to tenant (or is it a child of tenant), complex, service, vpn-binding" /> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Generic network definition" /> + <xml-property name="nameProps" value="network-name" /> + <xml-property name="indexedProps" value="heat-stack-id,network-uuid,service-id,network-id,network-name,persona-model-id,persona-model-version,widget-model-id,widget-model-version,contrail-network-fqdn" /> + <xml-property name="uniqueProps" value="network-id" /> + <xml-property name="container" value="l3-networks" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="NetworkPolicies"> + <xml-root-element name="network-policies" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="networkPolicy" name="network-policy" type="inventory.aai.onap.org.v9.NetworkPolicy" /> + </java-attributes> + </java-type> + <java-type name="NetworkPolicy"> + <xml-root-element name="network-policy" /> + <java-attributes> + <xml-element java-attribute="networkPolicyId" name="network-policy-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID representing unique key to this instance" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkPolicyFqdn" name="network-policy-fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contrail FQDN for the policy" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID for the openStack Heat instance" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="nameProps" value="network-policy-fqdn" /> + <xml-property name="indexedProps" value="network-policy-id,network-policy-fqdn" /> + <xml-property name="uniqueProps" value="network-policy-id" /> + <xml-property name="container" value="network-policies" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + <java-type name="CtagAssignments"> + <xml-root-element name="ctag-assignments" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="ctagAssignment" name="ctag-assignment" type="inventory.aai.onap.org.v9.CtagAssignment" /> + </java-attributes> + </java-type> + + <java-type name="CtagAssignment"> + <xml-root-element name="ctag-assignment" /> + <java-attributes> + <xml-element java-attribute="vlanIdInner" name="vlan-id-inner" required="true" type="java.lang.Long" xml-key="true"> + <xml-properties> + <xml-property name="description" value="id." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="vlan-id-inner" /> + <xml-property name="dependentOn" value="l3-network" /> + <xml-property name="container" value="ctag-assignments" /> + </xml-properties> + </java-type> + + <java-type name="Subnets"> + <xml-root-element name="subnets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="subnet" name="subnet" type="inventory.aai.onap.org.v9.Subnet" /> + </java-attributes> + </java-type> + + <java-type name="Subnet"> + <xml-root-element name="subnet" /> + <java-attributes> + <xml-element java-attribute="subnetId" name="subnet-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Subnet ID, should be UUID." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="subnetName" name="subnet-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name associated with the subnet." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="neutronSubnetId" name="neutron-subnet-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Neutron id of this subnet" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="gatewayAddress" name="gateway-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="gateway ip address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="networkStartAddress" name="network-start-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="network start address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cidrMask" name="cidr-mask" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="cidr mask" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipVersion" name="ip-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ip version" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="dhcpEnabled" name="dhcp-enabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="dhcp enabled" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dhcpStart" name="dhcp-start" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the start address reserved for use by dhcp" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dhcpEnd" name="dhcp-end" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the last address reserved for use by dhcp" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="indexedProps" value="subnet-id,subnet-name" /> + <xml-property name="nameProps" value="subnet-name" /> + <xml-property name="uniqueProps" value="subnet-id" /> + <xml-property name="dependentOn" value="l3-network" /> + <xml-property name="container" value="subnets" /> + </xml-properties> + </java-type> + + <java-type name="GenericVnfs"> + <xml-properties> + <xml-property name="description" value="Collection of VNFs" /> + </xml-properties> + <xml-root-element name="generic-vnfs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="genericVnf" name="generic-vnf" type="inventory.aai.onap.org.v9.GenericVnf" /> + </java-attributes> + </java-type> + + <java-type name="GenericVnf"> + <xml-root-element name="generic-vnf" /> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceId" name="service-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Unique identifier of service from ASDC" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceZone" name="regional-resource-zone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Regional way of organizing pservers, source of truth should define values" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this resource by Service Assurance systems." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="License key" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, used by MSO." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="identifier of managed by vendor or customer" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure generic-vnf, also used for troubleshooting and is IP used for traps generated by generic-vnf." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Loopback0Address" name="ipv4-loopback0-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4 Loopback0 address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="nmLanV6Address" name="nm-lan-v6-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v6 Loopback address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementV6Address" name="management-v6-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v6 management address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vcpu" name="vcpu" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="number of vcpus ordered for this instance of VNF, used for VNFs with no vservers/flavors" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vcpuUnits" name="vcpu-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="units associated with vcpu, used for VNFs with no vservers/flavors" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vmemory" name="vmemory" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="number of GB of memory ordered for this instance of VNF, used for VNFs with no vservers/flavors" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vmemoryUnits" name="vmemory-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="units associated with vmemory, used for VNFs with no vservers/flavors" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vdisk" name="vdisk" type="java.lang.Long"> + <xml-properties> + <xml-property name="description" value="number of vdisks ordered for this instance of VNF, used for VNFs with no vservers/flavors" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vdiskUnits" name="vdisk-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="units associated with vdisk, used for VNFs with no vservers/flavors" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="isClosedLoopDisabled" name="is-closed-loop-disabled" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether closed loop function is enabled on this node" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="summaryStatus" name="summary-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="details regarding the generic-vnf operation" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="encryptedAccessFlag" name="encrypted-access-flag" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="description" value="indicates whether generic-vnf access uses SSH" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="entitlementAssignmentGroupUuid" name="entitlement-assignment-group-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the Entitlement group used for licensing VNFs" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="entitlementResourceUuid" name="entitlement-resource-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the specific entitlement resource" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseAssignmentGroupUuid" name="license-assignment-group-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the license assignment group" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKeyUuid" name="license-key-uuid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="UUID of the actual license resource" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelId" name="persona-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="asNumber" name="as-number" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="as-number of the VNF" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="regionalResourceSubzone" name="regional-resource-subzone" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="represents sub zone of the rr plane" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v9.LInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v9.LagInterfaces" /> + <xml-element java-attribute="vfModules" name="vf-modules" type="inventory.aai.onap.org.v9.VfModules" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="General purpose VNF" /> + <xml-property name="nameProps" value="vnf-name" /> + <xml-property name="indexedProps" value="is-closed-loop-disabled,vnf-name2,vnf-type,heat-stack-id,in-maint,vnf-name,vnf-id,regional-resource-zone,prov-status,service-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version" /> + <xml-property name="searchable" value="vnf-id,vnf-name,vnf-name2" /> + <xml-property name="uniqueProps" value="vnf-id" /> + <xml-property name="container" value="generic-vnfs" /> + <xml-property name="namespace" value="network" /> + <xml-property name="extends" value="vnf" /> + </xml-properties> + </java-type> + + <java-type name="VfModules"> + <xml-properties> + <xml-property name="description" value="Collection of vf-modules, a deployment unit of VNFCs" /> + </xml-properties> + <xml-root-element name="vf-modules" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vfModule" name="vf-module" type="inventory.aai.onap.org.v9.VfModule" /> + </java-attributes> + </java-type> + + <java-type name="VfModule"> + <xml-root-element name="vf-module" /> + <java-attributes> + <xml-element java-attribute="vfModuleId" name="vf-module-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique ID of vf-module." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vfModuleName" name="vf-module-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of vf-module" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="orchestration status of this vf-module, mastered by MSO" /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="isBaseVfModule" name="is-base-vf-module" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="used to indicate whether or not this object is base vf module" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelId" name="persona-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model id for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="personaModelVersion" name="persona-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC model version for this resource or service model." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelId" name="widget-model-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary widget model. This maps directly to the A&AI widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="widgetModelVersion" name="widget-model-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the ASDC data dictionary version of the widget model.This maps directly to the A&AI version of the widget." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="contrailServiceInstanceFqdn" name="contrail-service-instance-fqdn" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="the Contrail unique ID for a service-instance" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="a deployment unit of VNFCs" /> + <xml-property name="indexedProps" value="vf-module-id,vf-module-name,heat-stack-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version,contrail-service-instance-fqdn" /> + <xml-property name="dependentOn" value="generic-vnf" /> + <xml-property name="container" value="vf-modules" /> + </xml-properties> + </java-type> + + + <java-type name="LagLinks"> + <xml-properties> + <xml-property name="description" value="Collection of link aggregation connections" /> + </xml-properties> + <xml-root-element name="lag-links" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="lagLink" name="lag-link" type="inventory.aai.onap.org.v9.LagLink" /> + </java-attributes> + </java-type> + + <java-type name="LagLink"> + <xml-root-element name="lag-link" /> + <java-attributes> + <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Alphabetical concatenation of lag-interface names" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="LAG links can connect lag-interfaces" /> + <xml-property name="indexedProps" value="link-name" /> + <xml-property name="container" value="lag-links" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="Newvces"> + <xml-properties> + <xml-property name="description" value="This object fills in the gaps from vce that were incorporated into generic-vnf. This object will be retired with vce." /> + </xml-properties> + <xml-root-element name="newvces" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="newvce" name="newvce" type="inventory.aai.onap.org.v9.Newvce" /> + </java-attributes> + </java-type> + + <java-type name="Newvce"> + <xml-root-element name="newvce" /> + <java-attributes> + <xml-element java-attribute="vnfId2" name="vnf-id2" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF, can't use same attribute name right now until we promote this new object" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName" name="vnf-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfName2" name="vnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Alternate name of VNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="vnfType" name="vnf-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="String capturing type of vnf, that was intended to identify the ASDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as ASDC matures." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="provStatus" name="prov-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Trigger for operational monitoring of this VNF by BAU Service Assurance systems." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="operationalState" name="operational-state" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicator for whether the resource is considered operational" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="licenseKey" name="license-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="License key" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4OamAddress" name="ipv4-oam-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Address tail-f uses to configure vpe, also used for troubleshooting and is IP used for traps generated by VPE (v4-loopback0-ip-address)." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipmentRole" name="equipment-role" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Client should send valid enumerated value, e.g., VPE." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipv4Loopback0Address" name="ipv4-loopback0-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4 Loopback0 address" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Orchestration status of this VNF, mastered by MSO." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="heatStackId" name="heat-stack-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Heat stack id corresponding to this instance, managed by MSO" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="msoCatalogKey" name="mso-catalog-key" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Corresponds to the SDN-C catalog id used to configure this VCE" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="lInterfaces" name="l-interfaces" type="inventory.aai.onap.org.v9.LInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="This object fills in the gaps from vce that were incorporated into generic-vnf. This object will be retired with vce." /> + <xml-property name="nameProps" value="vnf-name" /> + <xml-property name="indexedProps" value="vnf-name,vnf-name2,vnf-type,heat-stack-id,prov-status,vnf-id2" /> + <xml-property name="searchable" value="vnf-id2,vnf-name,vnf-name2" /> + <xml-property name="uniqueProps" value="vnf-id2" /> + <xml-property name="container" value="newvces" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="Pnfs"> + <xml-properties> + <xml-property name="description" value="Collection of Physical Network Functions." /> + </xml-properties> + <xml-root-element name="pnfs" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="pnf" name="pnf" type="inventory.aai.onap.org.v9.Pnf" /> + </java-attributes> + </java-type> + + <java-type name="Pnf"> + <xml-root-element name="pnf" /> + <java-attributes> + <xml-element java-attribute="pnfName" name="pnf-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="unique name of Physical Network Function." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pnfName2" name="pnf-name2" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="name of Physical Network Function." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pnfName2Source" name="pnf-name2-source" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="source of name2" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="pnfId" name="pnf-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="id of pnf" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipType" name="equip-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment type. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipVendor" name="equip-vendor" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment vendor. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="equipModel" name="equip-model" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Equipment model. Source of truth should define valid values." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="identifier of managed by vendor or customer" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipaddressV4Oam" name="ipaddress-v4-oam" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ipv4-oam-address with new naming convention for IP addresses" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="swVersion" name="sw-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="sw-version is the version of SW for the hosted application on the PNF." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="orchestrationStatus" name="orchestration-status" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="orchestration-status is the status of orchestration on the PNF." /> + </xml-properties> + </xml-element> + <xml-element default-value="false" required="true" java-attribute="inMaint" name="in-maint" type="java.lang.Boolean"> + <xml-properties> + <xml-property name="defaultValue" value="false"/> + <xml-property name="description" value="Used to indicate whether or not this object is in maintenance mode (maintenance mode = true). This field (in conjunction with prov-status) is used to suppress alarms and vSCL on VNFs/VMs." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="frameId" name="frame-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="ID of the physical frame (relay rack) where pnf is installed." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="pInterfaces" name="p-interfaces" type="inventory.aai.onap.org.v9.PInterfaces" /> + <xml-element java-attribute="lagInterfaces" name="lag-interfaces" type="inventory.aai.onap.org.v9.LagInterfaces" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="PNF represents a physical network function. typically equipment used in the D1 world. in 1607, this will be populated by SDN-C to represent a premises router that a uCPE connects to." /> + <xml-property name="indexedProps" value="pnf-name,orchestration-status" /> + <xml-property name="uniqueProps" value="pnf-name" /> + <xml-property name="container" value="pnfs" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="PhysicalLinks"> + <xml-properties> + <xml-property name="description" value="Collection of physical connections, typically between p-interfaces" /> + </xml-properties> + <xml-root-element name="physical-links" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="physicalLink" name="physical-link" type="inventory.aai.onap.org.v9.PhysicalLink" /> + </java-attributes> + </java-type> + + <java-type name="PhysicalLink"> + <xml-root-element name="physical-link" /> + <java-attributes> + <xml-element java-attribute="linkName" name="link-name" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="e.g., hostnameA_p-connection_nameA_hostnameZ+p_connection-nameZ" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedValue" name="speed-value" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the numeric part of the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="speedUnits" name="speed-units" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Captures the units corresponding to the speed" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="circuitId" name="circuit-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Circuit it" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dualMode" name="dual-mode" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Dual access mode (e.g., primary, secondary" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="managementOption" name="management-option" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="To provide information on who manages this circuit. A&AI or 3rd party transport provider" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="serviceProviderName" name="service-provider-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the service Provider on this link." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Collection of physical connections, typically between p-interfaces" /> + <xml-property name="indexedProps" value="circuit-id,link-name" /> + <xml-property name="alternateKeys1" value="circuit-id" /> + <xml-property name="container" value="physical-links" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="VigServers"> + <xml-root-element name="vig-servers" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="vigServer" name="vig-server" type="inventory.aai.onap.org.v9.VigServer" /> + </java-attributes> + </java-type> + + <java-type name="VigServer"> + <xml-root-element name="vig-server" /> + <java-attributes> + <xml-element java-attribute="vigAddressType" name="vig-address-type" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="indicates whether the VIG is for AVPN or INTERNET" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="ipaddressV4Vig" name="ipaddress-v4-vig" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v4 IP of the vig server" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="ipaddressV6Vig" name="ipaddress-v6-vig" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="v6 IP of the vig server" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="vig-server contains information about a vig server used for IPSec-configuration. Populated by SDN-C from 1607" /> + <xml-property name="indexedProps" value="vig-address-type" /> + <xml-property name="dependentOn" value="ipsec-configuration" /> + <xml-property name="container" value="vig-servers" /> + </xml-properties> + </java-type> + + <java-type name="IpsecConfigurations"> + <xml-root-element name="ipsec-configurations" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="ipsecConfiguration" name="ipsec-configuration" type="inventory.aai.onap.org.v9.IpsecConfiguration" /> + </java-attributes> + </java-type> + + <java-type name="IpsecConfiguration"> + <xml-root-element name="ipsec-configuration" /> + <java-attributes> + <xml-element java-attribute="ipsecConfigurationId" name="ipsec-configuration-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="UUID of this configuration" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedVigAddressType" name="requested-vig-address-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicate the type of VIG server like AVPN, INTERNET, BOTH" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedEncryptionStrength" name="requested-encryption-strength" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encryption values like 3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedDmzType" name="requested-dmz-type" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Vendor can offer a shared DMZ or a DMZ specific to a customer" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sharedDmzNetworkAddress" name="shared-dmz-network-address" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Network address of shared DMZ" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="requestedCustomerName" name="requested-customer-name" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="If the DMZ is a custom DMZ, this field will indicate the customer information" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikeVersion" name="ike-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="can be 1 or 2" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1Authentication" name="ikev1-authentication" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Contains values like md5, sha1, sha256, sha384" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1Encryption" name="ikev1-encryption" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encyption values like 3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1DhGroup" name="ikev1-dh-group" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Diffie-Hellman group like DH-GROUP2, DH-GROUP5, DH-GROUP14" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1AmGroupId" name="ikev1-am-group-id" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Group name defined in VIG for clients using aggressive mode" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1AmPassword" name="ikev1-am-password" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="pre-shared key for the above group name " /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ikev1SaLifetime" name="ikev1-sa-lifetime" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Lifetime for IKEv1 SA" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecAuthentication" name="ipsec-authentication" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="md5, sha1, sha256, sha384" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecEncryption" name="ipsec-encryption" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="3des-cbc, des-cbc, aes-128-cbc, aes-192-cbc, aes-265-cbc" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecSaLifetime" name="ipsec-sa-lifetime" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Life time for IPSec SA" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="ipsecPfs" name="ipsec-pfs" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="enable PFS or not" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="xauthUserId" name="xauth-userid" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="user ID for xAuth, sm-user,ucpeHostName,nmteHostName" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="xauthUserPassword" name="xauth-user-password" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Encrypted using the Juniper $9$ algorithm" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dpdInterval" name="dpd-interval" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="The time between DPD probe" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="dpdFrequency" name="dpd-frequency" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Maximum number of DPD before claiming the tunnel is down" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + <xml-element java-attribute="vigServers" name="vig-servers" type="inventory.aai.onap.org.v9.VigServers" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="IPSec configuration node will contain various configuration data for the NMTE VNF. This node will have an edge to the generic-vnf (vnf type = TE). Starting 1607, this data will be populated by SDN-C" /> + <xml-property name="indexedProps" value="ipsec-configuration-id" /> + <xml-property name="uniqueProps" value="ipsec-configuration-id" /> + <xml-property name="container" value="ipsec-configurations" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + + <java-type name="NotificationEvent"> + <xml-root-element name="notification-event" /> + <java-attributes> + <xml-element java-attribute="cambriaPartition" name="cambria.partition" type="java.lang.String" /> + <xml-element java-attribute="eventHeader" name="event-header" type="inventory.aai.onap.org.v9.NotificationEventHeader" /> + <xml-any-element java-attribute="entity" /> + </java-attributes> + </java-type> + <java-type name="NotificationEventHeader"> + <xml-root-element name="notification-event-header" /> + <java-attributes> + <xml-element java-attribute="id" name="id" type="java.lang.String" /> + <xml-element java-attribute="timestamp" name="timestamp" type="java.lang.String" /> + <xml-element java-attribute="sourceName" name="source-name" type="java.lang.String" /> + <xml-element java-attribute="domain" name="domain" type="java.lang.String" /> + <xml-element java-attribute="sequenceNumber" name="sequence-number" type="java.lang.String" /> + <xml-element java-attribute="severity" name="severity" type="java.lang.String" /> + <xml-element java-attribute="eventType" name="event-type" type="java.lang.String" /> + <xml-element java-attribute="version" name="version" type="java.lang.String" /> + <xml-element java-attribute="action" name="action" type="java.lang.String" /> + <xml-element java-attribute="entityType" name="entity-type" type="java.lang.String" /> + <xml-element java-attribute="topEntityType" name="top-entity-type" type="java.lang.String" /> + <xml-element java-attribute="entityLink" name="entity-link" type="java.lang.String" /> + <xml-element java-attribute="status" name="status" type="java.lang.String" /> + </java-attributes> + </java-type> + <java-type name="AaiInternal"> + <xml-root-element name="aai-internal" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="reservedPropNames" name="reserved-prop-names" type="inventory.aai.onap.org.v9.ReservedPropNames" /> + <xml-element container-type="java.util.ArrayList" java-attribute="edgePropNames" name="edge-prop-names" type="inventory.aai.onap.org.v9.EdgePropNames" /> + </java-attributes> + </java-type> + <java-type name="ReservedPropNames"> + <xml-properties> + <xml-property name="description" value="Internal map to define some reserved properties of a vertex" /> + <xml-property name="uniqueProps" value="aai-unique-key" /> + <xml-property name="indexedProps" value="aai-unique-key,source-of-truth,aai-node-type" /> + </xml-properties> + <xml-root-element name="reserved-prop-names" /> + <java-attributes> + <xml-element java-attribute="lastModSourceOfTruth" name="last-mod-source-of-truth" type="java.lang.String" /> + <xml-element java-attribute="aaiNodeType" name="aai-node-type" type="java.lang.String" /> + <xml-element java-attribute="aaiCreatedTs" name="aai-created-ts" type="java.lang.Long" /> + <xml-element java-attribute="aaiUniqueKey" name="aai-unique-key" type="java.lang.String" /> + <xml-element java-attribute="aaiLastModTs" name="aai-last-mod-ts" type="java.lang.Long" /> + <xml-element java-attribute="sourceOfTruth" name="source-of-truth" type="java.lang.String" /> + </java-attributes> + </java-type> + <java-type name="EdgePropNames"> + <!-- NOTE that the names of these properties are not consistent and are in mixed case and hyphen case for now --> + <xml-properties> + <xml-property name="description" value="Internal map to define the properties of an edge and interpret the map EdgeRules" /> + <xml-property name="edgeInfo" value="edgeLabel,direction,multiplicityRule,isParent,usesResource,hasDelTarget,SVC-INFRA,SVC-INFRA-REV" /> + </xml-properties> + <xml-root-element name="edge-prop-names" /> + <java-attributes> + <xml-element java-attribute="edgeLabel" name="edgeLabel" type="java.lang.String" /> + <xml-element java-attribute="direction" name="direction" type="java.lang.String" /> + <xml-element java-attribute="multiplicityRule" name="multiplicityRule" type="java.lang.String" /> + <xml-element java-attribute="isParent" name="isParent" type="java.lang.Boolean" /> + <xml-element java-attribute="usesResource" name="usesResource" type="java.lang.Boolean" /> + <xml-element java-attribute="hasDelTarget" name="hasDelTarget" type="java.lang.Boolean" /> + <xml-element java-attribute="SVC-INFRA" name="SVC-INFRA" type="java.lang.String" /> + <xml-element java-attribute="SVC-INFRA-REV" name="SVC-INFRA-REV" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="Models"> + <xml-properties> + <xml-property name="description" value="Collection of subgraph definitions provided by ASDC to describe the inventory assets and their connections related to ASDC models" /> + </xml-properties> + <xml-root-element name="models" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="model" name="model" type="inventory.aai.onap.org.v9.Model" /> + </java-attributes> + </java-type> + + <java-type name="Model"> + <xml-properties> + <xml-property name="description" value="Subgraph definition provided by ASDC to describe an inventory asset and its connections related to ASDC models" /> + <xml-property name="nameProps" value="model-name,model-type" /> + <xml-property name="indexedProps" value="model-name-version-id,model-type,model-name,model-id,model-version" /> + <xml-property name="alternateKeys1" value="model-id,model-version" /> + <xml-property name="uniqueProps" value="model-name-version-id" /> + <xml-property name="container" value="models" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + <xml-root-element name="model" /> + <java-attributes> + <xml-element java-attribute="modelNameVersionId" name="model-name-version-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique identifier corresponding to one version of a model in ASDC" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelType" name="model-type" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Type of the model, e.g., service, resource, widget, etc." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelName" name="model-name" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Name of the model, which can change from version to version." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelId" name="model-id" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Invariant unique ID which does not change from version to version" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelVersion" name="model-version" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Version" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelDescription" name="model-description" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Description" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelElements" name="model-elements" type="inventory.aai.onap.org.v9.ModelElements" /> + <xml-element java-attribute="metadata" name="metadata" type="inventory.aai.onap.org.v9.Metadata" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="ModelElements"> + <xml-root-element name="model-elements" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="modelElement" name="model-element" type="inventory.aai.onap.org.v9.ModelElement" /> + </java-attributes> + </java-type> + + <java-type name="ModelElement"> + <xml-properties> + <xml-property name="description" value="Defines how other models combine to make up a higher-level model." /> + <xml-property name="uniqueProps" value="model-element-uuid" /> + <xml-property name="indexedProps" value="model-element-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="model-elements" /> + </xml-properties> + <xml-root-element name="model-element" /> + <java-attributes> + <xml-element java-attribute="modelElementUuid" name="model-element-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="newDataDelFlag" name="new-data-del-flag" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Indicates whether this element was created as part of instantiation from this model" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="cardinality" name="cardinality" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="How many of this type of element are required/allowed" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="linkagePoints" name="linkage-point" type="java.lang.String"> + <xml-element-wrapper name="linkage-points" /> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Used for optimistic concurrency. Must be empty on create, valid on update and delete." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelElements" name="model-elements" type="inventory.aai.onap.org.v9.ModelElements"> + <xml-properties> + <xml-property name="description" value="Defines how other models combine to make up a higher-level model" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="modelConstraints" name="model-constraints" type="inventory.aai.onap.org.v9.ModelConstraints"> + <xml-properties> + <xml-property name="description" value="Describes new constraints on this model element that are not part of that model's definition" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="ModelConstraints"> + <xml-root-element name="model-constraints" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="modelConstraint" name="model-constraint" type="inventory.aai.onap.org.v9.ModelConstraint" /> + </java-attributes> + </java-type> + + <java-type name="ModelConstraint"> + <xml-properties> + <xml-property name="description" value="This is how we would capture constraints defining allowed sets of elements." /> + <xml-property name="uniqueProps" value="model-constraint-uuid" /> + <xml-property name="indexedProps" value="model-constraint-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="model-constraints" /> + </xml-properties> + <xml-root-element name="model-constraint" /> + <java-attributes> + <xml-element java-attribute="modelConstraintUuid" name="model-constraint-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="constrainedElementSetUuidToReplace" name="constrained-element-set-uuid-to-replace" required="true" type="java.lang.String" /> + <xml-element java-attribute="constrainedElementSets" name="constrained-element-sets" type="inventory.aai.onap.org.v9.ConstrainedElementSets" /> + </java-attributes> + </java-type> + + <java-type name="ConstrainedElementSets"> + <xml-root-element name="constrained-element-sets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="constrainedElementSet" name="constrained-element-set" type="inventory.aai.onap.org.v9.ConstrainedElementSet" /> + </java-attributes> + </java-type> + + <java-type name="ConstrainedElementSet"> + <xml-properties> + <xml-property name="description" value="This is how we would capture constraints defining allowed sets of elements." /> + <xml-property name="uniqueProps" value="constrained-element-set-uuid" /> + <xml-property name="indexedProps" value="constrained-element-set-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="constrained-element-sets" /> + </xml-properties> + <xml-root-element name="constrained-element-set" /> + <java-attributes> + <xml-element java-attribute="constrainedElementSetUuid" name="constrained-element-set-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="constraintType" name="constraint-type" required="true" type="java.lang.String" /> + <xml-element java-attribute="checkType" name="check-type" required="true" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String" /> + <xml-element java-attribute="elementChoiceSets" name="element-choice-sets" type="inventory.aai.onap.org.v9.ElementChoiceSets" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="ElementChoiceSets"> + <xml-root-element name="element-choice-sets" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="elementChoiceSet" name="element-choice-set" type="inventory.aai.onap.org.v9.ElementChoiceSet" /> + </java-attributes> + </java-type> + + <java-type name="ElementChoiceSet"> + <xml-properties> + <xml-property name="description" value="This is how we would capture constraints defining allowed sets of elements." /> + <xml-property name="uniqueProps" value="element-choice-set-uuid" /> + <xml-property name="indexedProps" value="element-choice-set-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="element-choice-sets" /> + </xml-properties> + <xml-root-element name="element-choice-set" /> + <java-attributes> + <xml-element java-attribute="elementChoiceSetUuid" name="element-choice-set-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="elementChoiceSetName" name="element-choice-set-name" required="true" type="java.lang.String" /> + <xml-element java-attribute="cardinality" name="cardinality" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String" /> + <xml-element java-attribute="modelElements" name="model-elements" type="inventory.aai.onap.org.v9.ModelElements" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="NamedQueries"> + <xml-root-element name="named-queries" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="namedQuery" name="named-query" type="inventory.aai.onap.org.v9.NamedQuery" /> + </java-attributes> + </java-type> + + <java-type name="NamedQuery"> + <xml-properties> + <xml-property name="description" value="TBD" /> + <xml-property name="nameProps" value="named-query-name" /> + <xml-property name="uniqueProps" value="named-query-uuid" /> + <xml-property name="indexedProps" value="named-query-uuid,named-query-name" /> + <xml-property name="container" value="named-queries" /> + <xml-property name="namespace" value="service-design-and-creation" /> + </xml-properties> + <xml-root-element name="named-query" /> + <java-attributes> + <xml-element java-attribute="namedQueryUuid" name="named-query-uuid" required="true" type="java.lang.String" xml-key="true" /> + <xml-element java-attribute="namedQueryName" name="named-query-name" required="true" type="java.lang.String" /> + <xml-element java-attribute="namedQueryVersion" name="named-query-version" required="true" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="requiredInputParams" name="required-input-param" type="java.lang.String"> + <xml-element-wrapper name="required-input-params" /> + </xml-element> + <xml-element java-attribute="description" name="description" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String" /> + <xml-element java-attribute="namedQueryElements" name="named-query-elements" type="inventory.aai.onap.org.v9.NamedQueryElements" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="NamedQueryElements"> + <xml-root-element name="named-query-elements" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="namedQueryElement" name="named-query-element" type="inventory.aai.onap.org.v9.NamedQueryElement" /> + </java-attributes> + </java-type> + + <java-type name="NamedQueryElement"> + <xml-properties> + <xml-property name="description" value="TBD" /> + <xml-property name="uniqueProps" value="named-query-element-uuid" /> + <xml-property name="indexedProps" value="named-query-element-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="named-query-elements" /> + </xml-properties> + <xml-root-element name="named-query-element" /> + <java-attributes> + <xml-element java-attribute="namedQueryElementUuid" name="named-query-element-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element container-type="java.util.ArrayList" java-attribute="propertyCollectList" name="property-collect-list" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String" /> + <xml-element java-attribute="propertyLimitDesc" name="property-limit-desc" type="java.lang.String" /> + <xml-element java-attribute="doNotOutput" name="do-not-output" type="java.lang.String" /> + <xml-element java-attribute="namedQueryElements" name="named-query-elements" type="inventory.aai.onap.org.v9.NamedQueryElements" /> + <xml-element java-attribute="relatedLookups" name="related-lookups" type="inventory.aai.onap.org.v9.RelatedLookups" /> + <xml-element java-attribute="propertyConstraints" name="property-constraints" type="inventory.aai.onap.org.v9.PropertyConstraints" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="RelatedLookups"> + <xml-root-element name="related-lookups" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="relatedLookup" name="related-lookup" type="inventory.aai.onap.org.v9.RelatedLookup" /> + </java-attributes> + </java-type> + + <java-type name="RelatedLookup"> + <xml-properties> + <xml-property name="description" value="TBD" /> + <xml-property name="uniqueProps" value="related-lookup-uuid" /> + <xml-property name="indexedProps" value="related-lookup-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="related-lookups" /> + </xml-properties> + <xml-root-element name="related-lookup" /> + <java-attributes> + <xml-element java-attribute="relatedLookupUuid" name="related-lookup-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="sourceNodeType" name="source-node-type" required="true" type="java.lang.String" /> + <xml-element java-attribute="sourceNodeProperty" name="source-node-property" required="true" type="java.lang.String" /> + <xml-element java-attribute="targetNodeType" name="target-node-type" required="true" type="java.lang.String" /> + <xml-element java-attribute="targetNodeProperty" name="target-node-property" required="true" type="java.lang.String" /> + <xml-element container-type="java.util.ArrayList" java-attribute="propertyCollectList" name="property-collect-list" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String" /> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + </java-type> + + <java-type name="PropertyConstraints"> + <xml-root-element name="property-constraints" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="propertyConstraint" name="property-constraint" type="inventory.aai.onap.org.v9.PropertyConstraint" /> + </java-attributes> + </java-type> + + <java-type name="PropertyConstraint"> + <xml-properties> + <xml-property name="description" value="TBD" /> + <xml-property name="uniqueProps" value="property-constraint-uuid" /> + <xml-property name="indexedProps" value="property-constraint-uuid" /> + <xml-property name="allowDirectRead" value="true" /> + <xml-property name="allowDirectWrite" value="false" /> + <xml-property name="container" value="property-constraints" /> + </xml-properties> + <xml-root-element name="property-constraint" /> + <java-attributes> + <xml-element java-attribute="propertyConstraintUuid" name="property-constraint-uuid" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="autoGenerateUuid" value="true" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="constraintType" name="constraint-type" required="true" type="java.lang.String" /> + <xml-element java-attribute="property-name" name="property-name" required="true" type="java.lang.String" /> + <xml-element java-attribute="property-value" name="property-value" required="true" type="java.lang.String" /> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="ModelAndNamedQuerySearch"> + <xml-properties> + <xml-property name="description" value="ModelAndNamedQuerySearch holds query-parameters and instance-properties for performing a named-query or model query" /> + </xml-properties> + <xml-root-element name="model-and-named-query-search" /> + <java-attributes> + <xml-element java-attribute="queryParameters" name="query-parameters" type="inventory.aai.onap.org.v9.QueryParameters" /> + <xml-element java-attribute="instanceFilters" name="instance-filters" type="inventory.aai.onap.org.v9.InstanceFilters" /> + <xml-element java-attribute="topNodeType" name="top-node-type" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="QueryParameters"> + <xml-properties> + <xml-property name="description" value="QueryParameters for performing a named-query or model query" /> + </xml-properties> + <xml-root-element name="query-parameters" /> + <java-attributes> + <xml-element java-attribute="namedQuery" name="named-query" type="inventory.aai.onap.org.v9.NamedQuery" /> + <xml-element java-attribute="model" name="model" type="inventory.aai.onap.org.v9.Model" /> + </java-attributes> + </java-type> + + <java-type name="InstanceFilters"> + <xml-properties> + <xml-property name="description" value="InstanceFilters for performing a named-query or model query" /> + </xml-properties> + <xml-root-element name="instance-filters" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="instanceFilter" name="instance-filter" type="inventory.aai.onap.org.v9.InstanceFilter" /> + </java-attributes> + </java-type> + + <java-type name="InstanceFilter"> + <xml-properties> + <xml-property name="description" value="InstanceFilter for performing a named-query or model query" /> + <xml-property name="container" value="instance-filters" /> + </xml-properties> + <xml-root-element name="instance-filter" /> + <java-attributes> + <xml-any-element container-type="java.util.ArrayList" java-attribute="any" lax="true" name="any" /> + </java-attributes> + </java-type> + + <java-type name="Properties"> + <xml-properties> + <xml-property name="description" value="Property holder for query properties or instance properties" /> + </xml-properties> + <xml-root-element name="properties" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String" /> + <xml-element java-attribute="propertyValue" name="property-value" type="java.lang.String" /> + </java-attributes> + </java-type> + + <java-type name="ResponseList"> + <xml-properties> + <xml-property name="description" value="Response container for the results of a named-query or model query" /> + </xml-properties> + <xml-root-element name="response-list" /> + <java-attributes> + <xml-element java-attribute="inventoryResponseItems" name="inventory-response-items" type="inventory.aai.onap.org.v9.InventoryResponseItems" /> + </java-attributes> + </java-type> + + <java-type name="InventoryResponseItems"> + <xml-properties> + <xml-property name="description" value="Container for inventory items in response list" /> + <xml-property name="container" value="response-list" /> + </xml-properties> + <xml-root-element name="inventory-response-items" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="inventoryResponseItem" name="inventory-response-item" type="inventory.aai.onap.org.v9.InventoryResponseItem" /> + </java-attributes> + </java-type> + + <java-type name="InventoryResponseItem"> + <xml-properties> + <xml-property name="description" value="Inventory item for response list" /> + <xml-property name="container" value="inventory-response-items" /> + </xml-properties> + <xml-root-element name="inventory-response-item" /> + <java-attributes> + <xml-element java-attribute="modelName" name="model-name" type="java.lang.String" /> + <xml-any-element java-attribute="item" /> + <xml-element java-attribute="extraProperties" name="extra-properties" type="inventory.aai.onap.org.v9.ExtraProperties" /> + <xml-element java-attribute="inventoryResponseItems" name="inventory-response-items" type="inventory.aai.onap.org.v9.InventoryResponseItems" /> + </java-attributes> + </java-type> + + <java-type name="ExtraProperties"> + <xml-properties> + <xml-property name="description" value="Extra properties for inventory item for response list" /> + </xml-properties> + <xml-root-element name="extra-properties" /> + <java-attributes> + <xml-any-element container-type="java.util.ArrayList" java-attribute="extraProperty" name="extra-property" type="inventory.aai.onap.org.v9.ExtraProperty" /> + </java-attributes> + </java-type> + + <java-type name="ExtraProperty"> + <xml-root-element name="extra-property" /> + <java-attributes> + <xml-element java-attribute="propertyName" name="property-name" type="java.lang.String" /> + <xml-any-element java-attribute="propertyValue" lax="true" name="property-value" /> + </java-attributes> + </java-type> + + <java-type name="RouteTableReferences"> + <xml-properties> + <xml-property name="description" value="Collection of openstack route table references" /> + </xml-properties> + <xml-root-element name="route-table-references" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="routeTableReference" name="route-table-reference" type="inventory.aai.onap.org.v9.RouteTableReference" /> + </java-attributes> + </java-type> + + <java-type name="RouteTableReference"> + <xml-root-element name="route-table-reference" /> + <java-attributes> + <xml-element java-attribute="routeTableReferenceId" name="route-table-reference-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Route Table Reference id, UUID assigned to this instance." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="routeTableReferenceFqdn" name="route-table-reference-fqdn" required="true" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="FQDN entry in the route table." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + + <xml-properties> + <xml-property name="description" value="Openstack route table reference." /> + <xml-property name="nameProps" value="route-table-reference-fqdn" /> + <xml-property name="uniqueProps" value="route-table-reference-id" /> + <xml-property name="indexedProps" value="route-table-reference-id,route-table-reference-fqdn" /> + <xml-property name="container" value="route-table-references" /> + <xml-property name="namespace" value="network" /> + </xml-properties> + </java-type> + + <java-type name="SegmentationAssignments"> + <xml-properties> + <xml-property name="description" value="Collection of openstack segmentation assignments" /> + </xml-properties> + <xml-root-element name="segmentation-assignments" /> + <java-attributes> + <xml-element container-type="java.util.ArrayList" java-attribute="segmentationAssignment" name="segmentation-assignment" type="inventory.aai.onap.org.v9.SegmentationAssignment" /> + </java-attributes> + </java-type> + + <java-type name="SegmentationAssignment"> + <xml-root-element name="segmentation-assignment" /> + <java-attributes> + <xml-element java-attribute="segmentationId" name="segmentation-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Route Table Reference id, UUID assigned to this instance." /> + </xml-properties> + </xml-element> + <xml-element java-attribute="resourceVersion" name="resource-version" type="java.lang.String"> + <xml-properties> + <xml-property name="description" value="Concurrency value" /> + </xml-properties> + </xml-element> + <xml-element java-attribute="relationshipList" name="relationship-list" type="inventory.aai.onap.org.v9.RelationshipList" /> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Openstack segmentation assignment." /> + <xml-property name="indexedProps" value="segmentation-id" /> + <xml-property name="dependentOn" value="l3-network" /> + <xml-property name="container" value="segmentation-assignments" /> + </xml-properties> + </java-type> + <java-type name="Vnf"> + <xml-root-element name="vnf"/> + <java-attributes> + <xml-element java-attribute="vnfId" name="vnf-id" required="true" type="java.lang.String" xml-key="true"> + <xml-properties> + <xml-property name="description" value="Unique id of VNF. This is unique across the graph." /> + </xml-properties> + </xml-element> + </java-attributes> + <xml-properties> + <xml-property name="description" value="Abstract vnf class" /> + <xml-property name="indexedProps" value="vnf-id" /> + <xml-property name="uniqueProps" value="vnf-id" /> + <xml-property name="inheritors" value="vce,vpe,generic-vnf" /> + <xml-property name="abstract" value="true" /> + </xml-properties> + </java-type> + </java-types> +</xml-bindings>
\ No newline at end of file diff --git a/src/test/resources/oxm-reader/single/aai_oxm_vnonDigit.xml b/src/test/resources/oxm-reader/single/aai_oxm_vnonDigit.xml new file mode 100644 index 0000000..ffab598 --- /dev/null +++ b/src/test/resources/oxm-reader/single/aai_oxm_vnonDigit.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- +============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===================================================== +--> +<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v9" xml-mapping-metadata-complete="true"> + <xml-schema element-form-default="QUALIFIED"> + <xml-ns namespace-uri="http://org.openecomp.aai.inventory/v9" /> + </xml-schema> +</xml-bindings>
\ No newline at end of file diff --git a/src/test/resources/oxm-reader/single/test_v10_edges.json b/src/test/resources/oxm-reader/single/test_v10_edges.json new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/test/resources/oxm-reader/single/test_v10_edges.json diff --git a/src/test/resources/rest-config/aai-environment.properties b/src/test/resources/rest-config/aai-environment.properties new file mode 100644 index 0000000..988ae90 --- /dev/null +++ b/src/test/resources/rest-config/aai-environment.properties @@ -0,0 +1,29 @@ +# ============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===================================================== + +# Used by org.onap.aai.validation.config.TestRestConfig +host=localhost +port=8080 +httpProtocol=https +trustStorePath=/dir1/dir2/trustStorePath +trustStorePassword.x=70c87528c88dcd9f9c2558d30e817868 +keyStorePath=/dir1/dir2/keyStorePath +keyStorePassword.x=70c87528c88dcd9f9c2558d30e817868 +keyManagerFactoryAlgorithm=AES +keyStoreType=jks +securityProtocol=TLS +connectionTimeout=100 +readTimeout=200 diff --git a/src/test/resources/rest-config/test-validation-service-beans.xml b/src/test/resources/rest-config/test-validation-service-beans.xml new file mode 100644 index 0000000..487bfe9 --- /dev/null +++ b/src/test/resources/rest-config/test-validation-service-beans.xml @@ -0,0 +1,29 @@ +<?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===================================================== +--> +<!-- Used by org.onap.aai.validation.config.TestRestConfig --> +<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.xsd"> + + <context:property-placeholder location="classpath:rest-config/aai-environment.properties" ignore-unresolvable="true" /> + + <bean id="restConfig" class="org.onap.aai.validation.config.RestConfig" /> + +</beans> diff --git a/src/test/resources/rule-driven-validator/results/expected/generic-vnf-create-event.exp.json b/src/test/resources/rule-driven-validator/results/expected/generic-vnf-create-event.exp.json new file mode 100644 index 0000000..ef0848a --- /dev/null +++ b/src/test/resources/rule-driven-validator/results/expected/generic-vnf-create-event.exp.json @@ -0,0 +1,35 @@ +{ + "validationId": "", + "validationTimestamp": "", + "entityId": { + "vnf-id": "e5365951-9d90-4853-afae-c34a0707e3b6" + }, + "entityType": "generic-vnf", + "entityLink": "network/generic-vnfs/generic-vnf/e5365951-9d90-4853-afae-c34a0707e3b6", + "resourceVersion": "1476736914", + "entity":"fkdlfkdl", + "violations": [ + { + "violationId": "f47ce3b89d92659086e986f674cec4a7bed54601b8007aac69c6157101973b90", + "category": "INVALID_VALUE", + "severity": "CRITICAL", + "violationType": "Rule", + "validationRule": "prov-status", + "violationDetails": { + "prov-status": null + }, + "errorMessage": "Invalid prov-status value. Must be PREPROV, NVTPROV, PROV, CAPPED, DECOM, or RETIRED" + }, + { + "violationId": "227d68c5fb944636cc9b8a08e8fcefadf13bfd1ba2c40547d664b7150f1ebc14", + "category": "INVALID_VALUE", + "severity": "MINOR", + "violationType": "Rule", + "validationRule": "valid_ipv4_addr", + "violationDetails": { + "ipv4-oam-address": "" + }, + "errorMessage": "Invalid value - attribute is not a valid IPv4 address" + } + ] +}
\ No newline at end of file diff --git a/src/test/resources/rule-driven-validator/results/expected/gizmo-pserver-create-event-invalid-ipaddress.exp.json b/src/test/resources/rule-driven-validator/results/expected/gizmo-pserver-create-event-invalid-ipaddress.exp.json new file mode 100644 index 0000000..b6b851c --- /dev/null +++ b/src/test/resources/rule-driven-validator/results/expected/gizmo-pserver-create-event-invalid-ipaddress.exp.json @@ -0,0 +1,24 @@ +{ + "validationId":"5d37dd63-8289-4e0c-8da0-9007c1de4e39", + "validationTimestamp":"20180220T173524Z", + "entityId":{ + "hostname":"myhost" + }, + "entityType":"pserver", + "entityLink":"", + "resourceVersion":"1477013499", + "violations":[ + { + "violationId":"f0c12d0f91779de43034ca5be323d0e0b076d228f49a998a910127af0da0009b", + "modelName":null, + "category":"INVALID_VALUE", + "severity":"MINOR", + "violationType":"Rule", + "validationRule":"valid_ipv4_addr", + "violationDetails":{ + "vertex.properties.ipv4-oam-address":"1.2.3." + }, + "errorMessage":"Invalid value - attribute is not a valid IPv4 address" + } + ] +}
\ No newline at end of file diff --git a/src/test/resources/rule-driven-validator/results/expected/gizmo-pserver-create-event.exp.json b/src/test/resources/rule-driven-validator/results/expected/gizmo-pserver-create-event.exp.json new file mode 100644 index 0000000..256a488 --- /dev/null +++ b/src/test/resources/rule-driven-validator/results/expected/gizmo-pserver-create-event.exp.json @@ -0,0 +1,13 @@ +{ + "validationId":"f7c28a16-2bdf-40a9-9414-ad430e2550c8", + "validationTimestamp":"20180220T172745Z", + "entityId":{ + "hostname":"myhost" + }, + "entityType":"pserver", + "entityLink":"", + "resourceVersion":"1477013499", + "violations":[ + + ] +}
\ No newline at end of file diff --git a/src/test/resources/rule-driven-validator/results/expected/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-BAD.exp.json b/src/test/resources/rule-driven-validator/results/expected/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-BAD.exp.json new file mode 100644 index 0000000..a8a4ae2 --- /dev/null +++ b/src/test/resources/rule-driven-validator/results/expected/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-BAD.exp.json @@ -0,0 +1,128 @@ +{ + "validationId": "VALIDATIONID", + "validationTimestamp": "TIMESTAMP", + "entityId": { + "vserver-id": "c385bb3e-6ebd-4898-bc92-792e0ac2db50" + }, + "entityType": "vserver", + "entityLink": "cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666", + "resourceVersion": "1475160142", + "violations": [ + { + "violationId": "3855354af5e3da4383dd39beac0c814e5125e0afa3bf0332f9289aa6178db5d6", + "category": "INVALID_VALUE", + "severity": "CRITICAL", + "violationType": "Rule", + "validationRule": "prov-status", + "violationDetails": { + "prov-status": "ACTIVE" + }, + "errorMessage": "Invalid prov-status value. Must be PREPROV, NVTPROV, PROV, CAPPED, DECOM, or RETIRED" + }, + { + "violationId": "2adb3dbf7ab2acb68033608ab5641962a953f720a76a7fe8c143792851ca0901", + "category": "INVALID_NAME", + "severity": "MINOR", + "violationType": "Rule", + "validationRule": "vserver related to TRINITY image and generic-vnf.vnf-name matches naming convention", + "violationDetails": { + "relationship-list.relationship[*]": [ + { + "related-to": "generic-vnf", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/network/generic-vnfs/generic-vnf/ctpx12345v/", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "ctpx12345v" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "ctpx12345v" + } + ] + }, + { + "related-to": "vf-module", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/network/generic-vnfs/generic-vnf/ctpx12345v/vf-modules/vf-module/ctpx12345v/", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "ctpx12345v" + }, + { + "relationship-key": "vf-module.vf-module-id", + "relationship-value": "ctpx12345v" + } + ] + }, + { + "related-to": "image", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/images/image/TRINITY-IMAGE/", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "image.image-id", + "relationship-value": "TRINITY-IMAGE" + } + ], + "related-to-property": [ + { + "property-key": "image.image-name", + "property-value": "TRINITY IMAGE" + } + ] + }, + { + "related-to": "pserver", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/pservers/pserver/TRINITY-PSERVER/", + "relationship-data": [ + { + "relationship-key": "pserver.hostname", + "relationship-value": "TRINITY-PSERVER" + } + ], + "related-to-property": [ + { + "property-key": "pserver.pserver-name2" + } + ] + }, + { + "related-to": "flavor", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/flavors/flavor/TRINITY-Flavor/", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "flavor.flavor-id", + "relationship-value": "TRINITY-Flavor" + } + ], + "related-to-property": [ + { + "property-key": "flavor.flavor-name", + "property-value": "TRINITY Flavor" + } + ] + } + ] + }, + "errorMessage": "Invalid name - if vserver is related to an image named TRINITY, then the related generic-vnf name must match xxxxnnnnv (where x = character and n = number)" + } + ] +}
\ No newline at end of file diff --git a/src/test/resources/rule-driven-validator/results/expected/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-GOOD.exp.json b/src/test/resources/rule-driven-validator/results/expected/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-GOOD.exp.json new file mode 100644 index 0000000..6e63d7f --- /dev/null +++ b/src/test/resources/rule-driven-validator/results/expected/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-GOOD.exp.json @@ -0,0 +1,23 @@ +{ + "validationId": "VALIDATIONID", + "validationTimestamp": "TIMESTAMP", + "entityId": { + "vserver-id": "c385bb3e-6ebd-4898-bc92-792e0ac2db50" + }, + "entityType": "vserver", + "entityLink": "cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666", + "resourceVersion": "1475160142", + "violations": [ + { + "violationId": "3855354af5e3da4383dd39beac0c814e5125e0afa3bf0332f9289aa6178db5d6", + "category": "INVALID_VALUE", + "severity": "CRITICAL", + "violationType": "Rule", + "validationRule": "prov-status", + "violationDetails": { + "prov-status": "ACTIVE" + }, + "errorMessage": "Invalid prov-status value. Must be PREPROV, NVTPROV, PROV, CAPPED, DECOM, or RETIRED" + } + ] +}
\ No newline at end of file diff --git a/src/test/resources/rule-driven-validator/results/expected/vserver-create-event.exp.json b/src/test/resources/rule-driven-validator/results/expected/vserver-create-event.exp.json new file mode 100644 index 0000000..7042c13 --- /dev/null +++ b/src/test/resources/rule-driven-validator/results/expected/vserver-create-event.exp.json @@ -0,0 +1,208 @@ +{ + "validationId": "VALIDATIONID", + "validationTimestamp": "TIMESTAMP", + "entityId": { + "vserver-id": "example-vserver-id-val-34666" + }, + "entityType": "vserver", + "entityLink": "cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666", + "resourceVersion": "1464193654", + "violations": [ + { + "violationId": "312ed832aed6adfff008732d5d3c4e03d46195ea38f2c305c4e58c9779e4721f", + "category": "INVALID_VALUE", + "severity": "CRITICAL", + "violationType": "Rule", + "validationRule": "prov-status", + "violationDetails": { + "prov-status": "INVALID" + }, + "errorMessage": "Invalid prov-status value. Must be PREPROV, NVTPROV, PROV, CAPPED, DECOM, or RETIRED" + }, + { + "violationId": "819a20606acf8eefa64ea06ddb1041edebdec7eb18c5695860eda5e3d1729460", + "modelName": null, + "category": "INVALID_NAME", + "severity": "MINOR", + "violationType": "Rule", + "validationRule": "vserver related to TRINITY image and generic-vnf.vnf-name matches naming convention", + "violationDetails": { + "relationship-list.relationship[*]": [ + { + "related-to": "generic-vnf", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/network/generic-vnfs/generic-vnf/bmsx0001v-1661/", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "bmsx0001v-1661" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "bmsx000x" + } + ] + }, + { + "related-to": "image", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/images/image/ee49d429-283d-4f79-9c58-e11cc38d8856/", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "image.image-id", + "relationship-value": "ee49d429-283d-4f79-9c58-e11cc38d8856" + } + ], + "related-to-property": [ + { + "property-key": "image.image-name", + "property-value": "TRINITY" + } + ] + }, + { + "related-to": "pserver", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/pservers/pserver/dpa2r03c007/", + "relationship-data": [ + { + "relationship-key": "pserver.hostname", + "relationship-value": "dpa2r03c007" + } + ], + "related-to-property": [ + { + "property-key": "pserver.pserver-name2" + } + ] + }, + { + "related-to": "flavor", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/flavors/flavor/5288f576-d9c6-46fc-9dcb-f6946a2b3597/", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "flavor.flavor-id", + "relationship-value": "5288f576-d9c6-46fc-9dcb-f6946a2b3597" + } + ], + "related-to-property": [ + { + "property-key": "flavor.flavor-name", + "property-value": "l5.xLarge" + } + ] + } + ] + }, + "errorMessage": "Invalid name - if vserver is related to an image named TRINITY, then the related generic-vnf name must match xxxxnnnnv (where x = character and n = number)" + }, + { + "violationId": "50819193f02c57e6878573dbe4d8d43942ee0b20cb539aed817c067072733f6e", + "modelName": null, + "category": "INVALID_NAME", + "severity": "MINOR", + "violationType": "Rule", + "validationRule": "vserver is related to a TRINITY image and vserver-name matches naming convention", + "violationDetails": { + "relationship-list.relationship[*]": [ + { + "related-to": "generic-vnf", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/network/generic-vnfs/generic-vnf/bmsx0001v-1661/", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "bmsx0001v-1661" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "bmsx000x" + } + ] + }, + { + "related-to": "image", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/images/image/ee49d429-283d-4f79-9c58-e11cc38d8856/", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "image.image-id", + "relationship-value": "ee49d429-283d-4f79-9c58-e11cc38d8856" + } + ], + "related-to-property": [ + { + "property-key": "image.image-name", + "property-value": "TRINITY" + } + ] + }, + { + "related-to": "pserver", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/pservers/pserver/dpa2r03c007/", + "relationship-data": [ + { + "relationship-key": "pserver.hostname", + "relationship-value": "dpa2r03c007" + } + ], + "related-to-property": [ + { + "property-key": "pserver.pserver-name2" + } + ] + }, + { + "related-to": "flavor", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/flavors/flavor/5288f576-d9c6-46fc-9dcb-f6946a2b3597/", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "flavor.flavor-id", + "relationship-value": "5288f576-d9c6-46fc-9dcb-f6946a2b3597" + } + ], + "related-to-property": [ + { + "property-key": "flavor.flavor-name", + "property-value": "l5.xLarge" + } + ] + } + ], + "vserver-name": "example-vserver-name-val-34666" + }, + "errorMessage": "Invalid name - if vserver is related to an image named TRINITY, then the vserver name must match xxxxnnnnvmnnn (where x = character and n = number)" + } + ] +}
\ No newline at end of file diff --git a/src/test/resources/rule-driven-validator/results/expected/vserver-update-AAI-EVENT-devINT1.exp.json b/src/test/resources/rule-driven-validator/results/expected/vserver-update-AAI-EVENT-devINT1.exp.json new file mode 100644 index 0000000..4cf7264 --- /dev/null +++ b/src/test/resources/rule-driven-validator/results/expected/vserver-update-AAI-EVENT-devINT1.exp.json @@ -0,0 +1,38 @@ +{ + "validationId": "VALIDATIONID", + "validationTimestamp": "TIMESTAMP", + "entityId": { + "vserver-id": "fd280243-cd5c-424e-b629-533cabe2a164" + }, + "entityType": "vserver", + "entityLink": "cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/d52b9dea5d0f4e5d90be3590ac8c78a9/vservers/vserver/fd280243-cd5c-424e-b629-533cabe2a164", + "resourceVersion": "1476735222", + "violations": [ + { + "violationId": "af7226e6b786fb8ad20e1ef088c1b04fd0408093405ca51559f001607ab758e0", + "category": "INVALID_VALUE", + "severity": "CRITICAL", + "violationType": "Rule", + "validationRule": "prov-status", + "violationDetails": { + "prov-status": null + }, + "errorMessage": "Invalid prov-status value. Must be PREPROV, NVTPROV, PROV, CAPPED, DECOM, or RETIRED" + }, + { + "violationId": "daf1c3d071651c081f05f913e0fe2ba4750d2a1fa1699d60a7693126615c4a07", + "category": "MISSING_REL", + "severity": "MINOR", + "violationType": "Rule", + "validationRule": "vserver is related to a vnf (vce or newvce or vpe or generic-vnf)", + "violationDetails": { + "relationship-list.relationship[*].related-to": [ + "image", + "pserver", + "flavor" + ] + }, + "errorMessage": "Missing relationship - a vserver must be related to a vnf (vce or newvce or vpe or generic-vnf)" + } + ] +}
\ No newline at end of file diff --git a/src/test/resources/rule-driven-validator/rules/aai-event/common_rules.groovy b/src/test/resources/rule-driven-validator/rules/aai-event/common_rules.groovy new file mode 100644 index 0000000..70980fe --- /dev/null +++ b/src/test/resources/rule-driven-validator/rules/aai-event/common_rules.groovy @@ -0,0 +1,69 @@ +/* + * ============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===================================================== + */ + +rule { + name 'prov-status' + category 'INVALID_VALUE' + description 'prov-status value restricted to one of PREPROV, NVTPROV, PROV, CAPPED, DECOM, RETIRED' + errorText 'Invalid prov-status value. Must be PREPROV, NVTPROV, PROV, CAPPED, DECOM, or RETIRED' + severity 'CRITICAL' + attributes 'status' + validate '''switch (status) { + case "PREPROV": + case "NVTPROV": + case "PROV": + case "CAPPED": + case "DECOM": + case "RETIRED": + return true + default: return false + }''' +} + +// The following are used by both vce and newvce + +rule { + name 'vnf-name' + category 'INVALID_NAME' + description 'Invalid naming convention' + errorText 'Invalid name - attribute does not match xxxxxnnnvbc (where x = alphanumeric and n = numeric)' + severity 'MINOR' + attributes 'name' + validate 'name != null && name.matches("[a-z,0-9]{5}[0-9]{3}vbc")' +} + +rule { + name 'vnf-type' + category 'INVALID_VALUE' + description 'Invalid value' + errorText 'Invalid value - attribute must equal esx-vce' + severity 'MINOR' + attributes 'name' + validate 'name != null && name.matches("esx-vce")' +} + +rule { + name 'heat-stack-id equals first 11 bytes of vnf-name' + category 'INVALID_VALUE' + description 'The value of heat-stack-id must equal the first 11 bytes of vnf-name' + errorText 'Invalid value - the value of heat-stack-id must equal the first 11 bytes of vnf-name' + severity 'MINOR' + attributes 'heatstackid', 'vnfname' + validate '''def firstEleven = { str -> str ? str.take(11) : null } + heatstackid.equals(firstEleven(vnfname))''' +} diff --git a/src/test/resources/rule-driven-validator/rules/aai-event/entity-complex.groovy b/src/test/resources/rule-driven-validator/rules/aai-event/entity-complex.groovy new file mode 100644 index 0000000..48d2f26 --- /dev/null +++ b/src/test/resources/rule-driven-validator/rules/aai-event/entity-complex.groovy @@ -0,0 +1,146 @@ +/* + * ============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===================================================== + */ + +entity { + type 'complex' + validation { + useRule { + name 'CLLI' + attributes 'physical-location-id' + } + useRule { + name 'not AAI default' + attributes 'street1' + } + useRule { + name 'not AAI default' + attributes 'city' + } + useRule { + name 'not AAI default' + attributes 'state' + } + useRule { + name 'not AAI default' + attributes 'postal-code' + } + useRule { + name 'not AAI default' + attributes 'region' + } + useRule { + name 'not AAI default' + attributes 'country' + } + useRule { + name 'critical not AAI default' + attributes 'physical-location-type' + } + useRule { + name 'length five or null' + attributes 'complex-name' + } + useRule {name 'complex is related to availability zone' } + useRule {name 'complex is related to 1 oam-network' } + useRule { + name 'if a customer is related to an oam-network then oam-network.network-name must match naming convention' + attributes 'relationship-list.relationship[*]' + } + } +} + +rule { + name 'CLLI' + category 'FIELD_LENGTH' + description 'Field must be 8 or 11 characters long' + errorText 'Invalid length - field must be 8 or 11 characters long' + severity 'CRITICAL' + attributes 'field' + validate 'field.size() == 8 || field.size() == 11' +} + +rule { + name 'not AAI default' + category 'FIELD_LENGTH' + description 'Invalid length - field must not be AAIDEFAULT or null' + errorText 'Invalid Value - must not be AAIDEFAULT or null' + severity 'MINOR' + attributes 'field' + validate 'field != null && field.size() > 0 && !field.equalsIgnoreCase("AAIDEFAULT")' +} + +rule { + name 'length five or null' + category 'FIELD_LENGTH' + description 'Field must be 5 characters long or null' + errorText 'Invalid Length - field must be 5 characters long or null' + severity 'MINOR' + attributes 'field' + validate 'field == null || field.size() == 5' +} + +rule { + name 'critical not AAI default' + category 'INVALID_VALUE' + description 'Field must not be AAIDEFAULT or null' + errorText 'Invalid Value - must not be AAIDEFAULT or null' + severity 'CRITICAL' + attributes 'field' + validate 'field != null && field.size() > 0 && !field.equalsIgnoreCase("AAIDEFAULT")' +} + +rule { + name 'complex is related to availability zone' + category 'MISSING_REL' + description 'Validates that a complex is related to an availability zone' + errorText 'Missing relationship - a complex must be related to an availability zone' + severity 'CRITICAL' + attributes 'relationship-list.relationship[*].related-to' + validate 'related-to != null && related-to.contains("availability-zone")' +} + +rule { + name 'complex is related to 1 oam-network' + category 'MISSING_REL' + description 'Validates that a complex is related to 1 oam-network (and not more than 1 oam-network)' + errorText 'Missing relationship - complex must be related to 1 oam-network' + severity 'MAJOR' + attributes 'relationship-list.relationship[*].related-to' + validate 'related-to != null && related-to.count("oam-network") == 1' +} + +rule { + name 'if a customer is related to an oam-network then oam-network.network-name must match naming convention' + category 'INVALID_NAME' + description 'validates that if a customer is related to an oam-network then oam-network.network-name must match naming convention' + errorText 'Invalid name - if a customer is related to an oam-network then network-name must start with VLAN' + severity 'MINOR' + attributes 'relationships' + validate ''' + def getStringProperty = { jsonObject, propertyName -> jsonObject.get(propertyName).getAsString() } + + relatedToOamNetwork = relationships.findAll { getStringProperty(it, "related-to") == "oam-network" } + + networkNameIsValid = relationships.findAll { getStringProperty(it, "related-to") == "oam-network" } + .collect { it."related-to-property".get(0) } + .findAll { getStringProperty(it, "property-key") == "oam-network.network-name" } + .find { getStringProperty(it, "property-value").startsWith("VLAN") } + + return !relatedToOamNetwork || networkNameIsValid + ''' +} diff --git a/src/test/resources/rule-driven-validator/rules/aai-event/entity-newvce.groovy b/src/test/resources/rule-driven-validator/rules/aai-event/entity-newvce.groovy new file mode 100644 index 0000000..dce812a --- /dev/null +++ b/src/test/resources/rule-driven-validator/rules/aai-event/entity-newvce.groovy @@ -0,0 +1,43 @@ +/* + * ============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===================================================== + */ + +entity { + type 'newvce' + validation { + useRule { + name 'prov-status' + attributes 'prov-status' + } + useRule { + name 'vnf-name' + attributes 'vnf-name' + } + useRule { + name 'vnf-type' + attributes 'vnf-type' + } + useRule { + name 'valid_ipv4_addr' + attributes 'ipv4-oam-address' + } + useRule { + name 'heat-stack-id equals first 11 bytes of vnf-name' + attributes 'heat-stack-id', 'vnf-name' + } + } +} diff --git a/src/test/resources/rule-driven-validator/rules/aai-event/generic-vnf-rules.groovy b/src/test/resources/rule-driven-validator/rules/aai-event/generic-vnf-rules.groovy new file mode 100644 index 0000000..d890c36 --- /dev/null +++ b/src/test/resources/rule-driven-validator/rules/aai-event/generic-vnf-rules.groovy @@ -0,0 +1,56 @@ +/* + * ============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===================================================== + */ + +entity { + type 'generic-vnf' + validation { + useRule { + name 'prov-status' + attributes 'prov-status' + } + useRule { + name 'valid_ipv4_addr' + attributes 'ipv4-oam-address' + } + useRule { + name 'ipv4_addr_present' + attributes 'equipment-role', 'l-interfaces.l-interface[*].l3-interface-ipv4-address-list' + } + } +} + +rule { + name 'valid_ipv4_addr' + category 'INVALID_VALUE' + description 'Validate an IPv4 address' + errorText 'Invalid value - attribute is not a valid IPv4 address' + severity 'MINOR' + attributes 'ipaddr' + validate 'ipaddr != null && ipaddr.matches("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])")' +} + +// If generic-vnf.equipment-role="UCPE" and there is an l-interface - then there must be an IPV4 address related to the l-interface +rule { + name 'ipv4_addr_present' + category 'MISSING_REL' + description 'Validates that ICPE equipment has a related IPv4 address' + errorText 'UCPE l-interface missing the IPv4 relationship' + severity 'MINOR' + attributes 'equipment', 'ipv4' + validate 'equipment != "UCPE" || ipv4 != null' +} diff --git a/src/test/resources/rule-driven-validator/rules/aai-event/rule-vserver-all_others.groovy b/src/test/resources/rule-driven-validator/rules/aai-event/rule-vserver-all_others.groovy new file mode 100644 index 0000000..d922df9 --- /dev/null +++ b/src/test/resources/rule-driven-validator/rules/aai-event/rule-vserver-all_others.groovy @@ -0,0 +1,118 @@ +/* + * ============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===================================================== + */ + +rule { + name 'vserver is related to a vnf (vce or newvce or vpe or generic-vnf)' + category 'MISSING_REL' + description 'Validates that a vserver is related to a vnf (vce or newvce or vpe or generic-vnf)' + errorText 'Missing relationship - a vserver must be related to a vnf (vce or newvce or vpe or generic-vnf)' + severity 'MINOR' + attributes 'related-to' + validate 'related-to != null && (related-to.contains("vce") || related-to.contains("newvce") || related-to.contains("vpe") || related-to.contains("generic-vnf"))' +} + +rule { + name 'vserver is related to 1 pserver' + category 'MISSING_REL' + description 'Validates that a vserver is related to 1 pserver (and not more than 1 pserver)' + errorText 'Missing relationship - vserver must be related to 1 pserver' + severity 'MINOR' + attributes 'relationship-list.relationship[*].related-to' + validate 'related-to == null || related-to.count("pserver") == 1' +} + +rule { + name 'vserver is related to 0 or 1 image' + category 'MISSING_REL' + description 'Validates that a vserver is either not related to an image or related to only 1 image' + errorText 'Missing relationship - vserver must be related to 0 or 1 image' + severity 'MINOR' + attributes 'relationship-list.relationship[*].related-to' + validate 'related-to == null || related-to.count("image") <= 1' +} + +rule { + name 'vserver is related to 0 or 1 flavor' + category 'MISSING_REL' + description 'Validates that a vserver is either not related to a flavor or related to only 1 flavor' + errorText 'Missing relationship - vserver must be related to 0 or 1 flavor' + severity 'MINOR' + attributes 'relationship-list.relationship[*].related-to' + validate 'related-to == null || related-to.count("flavor") <= 1' +} + +rule { + name 'vserver is related to vpe and vserver-name matches naming convention' + category 'INVALID_NAME' + description 'Validates that if a vserver is related to a vpe then vserver-name must contain me6' + errorText 'Invalid name - if vserver is related to vpe then vserver-name must contain me6' + severity 'MINOR' + attributes 'relationship-list.relationship[*].related-to', 'vserver-name' + validate '!related-to.contains("vpe") || vserver-name =~ "me6"' +} + +rule { + name 'vserver is related to vce and vserver-name matches naming convention' + category 'INVALID_NAME' + description 'Validates that if a vserver is related to a vce then vserver-name must match naming convention' + errorText 'Invalid name - if vserver is related to vce then vserver-name must match xxxxxxxxvbcnnceb (where x = alphanumeric and n = numeric)' + severity 'MINOR' + attributes 'relationship-list.relationship[*].related-to', 'vserver-name' + validate '!related-to.contains("vce") || vserver-name =~ "[a-z0-9]{8}vbc[0-9]{2}ceb"' +} + +rule { + name 'vserver is related to a TRINITY image and vserver-name matches naming convention' + category 'INVALID_NAME' + description 'Validates that if vserver is related to an image named TRINITY, then the vserver name matches naming convention' + errorText 'Invalid name - if vserver is related to an image named TRINITY, then the vserver name must match xxxxnnnnvmnnn (where x = character and n = number)' + severity 'MINOR' + attributes 'relationships', 'vservername' + validate ''' + def getStringProperty = { jsonObject, propertyName -> jsonObject.get(propertyName)?.getAsString() } + + relatedToTrinity = relationships.findAll { getStringProperty(it, "related-to") == "image" } + .findAll { it."related-to-property" != null } + .collect { it."related-to-property".get(0) } + .findAll { getStringProperty(it, "property-key") == "image.image-name" } + .find { getStringProperty(it, "property-value").startsWith("TRINITY") } + + // If (and only if) related to TRINITY then check the vserver name + return !relatedToTrinity || vservername != null && vservername ==~ "[a-z]{4}[0-9]{4}vm[0-9]{3}" + ''' +} + +rule { + name 'availability-zone must be related to a service-capability and service-capability.service-type matches naming convention' + category 'INVALID_NAME' + description 'Validates that an availability-zone is related to a service-capability and service-capability.service-type matches naming convention' + errorText 'Invalid name - availability-zone must be related to a service-capability and service-capability.service-type must be set to SDN-ETHERNET-INTERNET' + severity 'CRITICAL' + attributes 'relationships' + validate ''' + def getStringProperty = { jsonObject, propertyName -> jsonObject.get(propertyName)?.getAsString() } + + if (!relationships.find { getStringProperty(it, "related-to") == "service-capability" }) { return true } + + return relationships.findAll { getStringProperty(it, "related-to") == "service-capability" } + .findAll { it."related-to-property" != null } + .collect { it."relationship-data".get(0) } + .findAll { getStringProperty(it, "relationship-key") == "service-capability.service-type" } + .find { getStringProperty(it, "relationship-value") == "SDN-ETHERNET-INTERNET" } + ''' +} diff --git a/src/test/resources/rule-driven-validator/rules/aai-event/rule-vserver-related-generic-vnf.groovy b/src/test/resources/rule-driven-validator/rules/aai-event/rule-vserver-related-generic-vnf.groovy new file mode 100644 index 0000000..feeffa8 --- /dev/null +++ b/src/test/resources/rule-driven-validator/rules/aai-event/rule-vserver-related-generic-vnf.groovy @@ -0,0 +1,42 @@ +/* + * ============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===================================================== + */ + +rule { + name 'vserver related to TRINITY image and generic-vnf.vnf-name matches naming convention' + category 'INVALID_NAME' + description 'Validates that if vserver is related to an image named TRINITY, then the related generic-vnf name matches naming convention' + errorText 'Invalid name - if vserver is related to an image named TRINITY, then the related generic-vnf name must match xxxxnnnnv (where x = character and n = number)' + severity 'MINOR' + attributes 'relationships' + validate ''' + def getStringProperty = { jsonObject, propertyName -> jsonObject.get(propertyName).getAsString() } + + vnf_name = relationships.findAll { getStringProperty(it, "related-to") == "generic-vnf" } + .collect { it."related-to-property".get(0) } + .find { getStringProperty(it, "property-key") == "generic-vnf.vnf-name" } + .findResult { getStringProperty(it, "property-value") } + + relatedToTrinity = relationships.findAll { getStringProperty(it, "related-to") == "image" } + .collect { it."related-to-property".get(0) } + .findAll { getStringProperty(it, "property-key") == "image.image-name" } + .find { getStringProperty(it, "property-value").startsWith("TRINITY") } + + // If (and only if) related to TRINITY then check the generic-vnf name + return !relatedToTrinity || vnf_name?.matches("[a-z]{4}[0-9]{4}v") + ''' +}
\ No newline at end of file diff --git a/src/test/resources/rule-driven-validator/rules/aai-event/vserver-rules.groovy b/src/test/resources/rule-driven-validator/rules/aai-event/vserver-rules.groovy new file mode 100644 index 0000000..d379e17 --- /dev/null +++ b/src/test/resources/rule-driven-validator/rules/aai-event/vserver-rules.groovy @@ -0,0 +1,44 @@ +/* + * ============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===================================================== + */ + +entity { + type 'vserver' + validation { + useRule { + name 'prov-status' + attributes 'prov-status' + } + useRule {name 'vserver is related to 0 or 1 image' } + useRule {name 'vserver is related to 0 or 1 flavor' } + useRule {name 'vserver is related to 1 pserver' } + useRule {name 'vserver is related to vpe and vserver-name matches naming convention' } + useRule {name 'vserver is related to vce and vserver-name matches naming convention' } + useRule { + name 'vserver related to TRINITY image and generic-vnf.vnf-name matches naming convention' + attributes 'relationship-list.relationship[*]' + } + useRule { + name 'vserver is related to a TRINITY image and vserver-name matches naming convention' + attributes 'relationship-list.relationship[*]', 'vserver-name' + } + useRule { + name 'vserver is related to a vnf (vce or newvce or vpe or generic-vnf)' + attributes 'relationship-list.relationship[*].related-to' + } + } +} diff --git a/src/test/resources/rule-driven-validator/rules/gizmo-event/common_rules.groovy b/src/test/resources/rule-driven-validator/rules/gizmo-event/common_rules.groovy new file mode 100644 index 0000000..b30816e --- /dev/null +++ b/src/test/resources/rule-driven-validator/rules/gizmo-event/common_rules.groovy @@ -0,0 +1,27 @@ +/* + * ============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===================================================== + */ + +rule { + name 'valid_ipv4_addr' + category 'INVALID_VALUE' + description 'Validate an IPv4 address' + errorText 'Invalid value - attribute is not a valid IPv4 address' + severity 'MINOR' + attributes 'ipaddr' + validate 'ipaddr != null && ipaddr.matches("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])")' +} diff --git a/src/test/resources/rule-driven-validator/rules/gizmo-event/pserver-rules.groovy b/src/test/resources/rule-driven-validator/rules/gizmo-event/pserver-rules.groovy new file mode 100644 index 0000000..79b3cc2 --- /dev/null +++ b/src/test/resources/rule-driven-validator/rules/gizmo-event/pserver-rules.groovy @@ -0,0 +1,27 @@ +/* + * ============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===================================================== + */ + +entity { + type 'pserver' + validation { + useRule { + name 'valid_ipv4_addr' + attributes 'vertex.properties.ipv4-oam-address' + } + } +} diff --git a/src/test/resources/rule-driven-validator/test-rule-driven-validator-beans.xml b/src/test/resources/rule-driven-validator/test-rule-driven-validator-beans.xml new file mode 100644 index 0000000..b087680 --- /dev/null +++ b/src/test/resources/rule-driven-validator/test-rule-driven-validator-beans.xml @@ -0,0 +1,55 @@ +<?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: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.xsd"> + + <import resource="../oxm-reader/oxm-reader-beans.xml" /> + + <!-- PROPERTY FILES --> + <context:property-placeholder location="classpath:event-reader.properties" ignore-unresolvable="true" /> + + <!-- CONFIG BEANS --> + <bean id="eventReaderConfig" class="org.onap.aai.validation.config.EventReaderConfig" /> + + <!-- READER BEANS --> + <bean id="jsonReader" class="org.onap.aai.validation.reader.JsonReader" /> + + <bean id="eventReader" class="org.onap.aai.validation.reader.EventReader"> + <constructor-arg ref="eventReaderConfig" /> + <constructor-arg ref="jsonReader" /> + <constructor-arg ref="oxmReader" /> + </bean> + + <bean id="rulesConfigurationPath" class="java.nio.file.Paths" factory-method="get"> + <constructor-arg value="src/test/resources/rule-driven-validator/rules/" /> + <constructor-arg><array /></constructor-arg> + </bean> + + <bean id="ruleDrivenValidator" class="org.onap.aai.validation.ruledriven.RuleDrivenValidator"> + <constructor-arg ref="rulesConfigurationPath" /> + <constructor-arg ref="oxmReader" /> + <constructor-arg ref="eventReader" /> + <constructor-arg name="ruleIndexingConfig"> + <null /> + </constructor-arg> + </bean> + +</beans> diff --git a/src/test/resources/rule-driven-validator/test_events/generic-vnf-create-event.json b/src/test/resources/rule-driven-validator/test_events/generic-vnf-create-event.json new file mode 100644 index 0000000..e1e5618 --- /dev/null +++ b/src/test/resources/rule-driven-validator/test_events/generic-vnf-create-event.json @@ -0,0 +1,46 @@ +{ + "cambria.partition": "AAI", + "entity": { + "resource-version": "1476736914", + "equipment-role": "UCPE", + "ipv4-oam-address": "", + "is-closed-loop-disabled": false, + "vnf-name": "USETEJORLFL0154UJTE08", + "vnf-type": "TE", + "nm-lan-v6-address": "2001:1890:e00e:fffe::943", + "vnf-id": "e5365951-9d90-4853-afae-c34a0707e3b6", + "in-maint": false, + "ipv4-loopback0-address": "", + "management-option": "ATT", + "orchestration-status": "created", + "service-id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4", + "management-v6-address": "", + "relationship-list": { + "relationship": [{ + "relationship-data":[{ + "relationship-key": "service-instance.service-instance-id", + "relationship-value": "USETEJORLFL0154UJZZ01" + }], + "related-to-property": [{ + "property-key": "service-instance.service-instance-name" + }], + "related-link": "https://aai-app-e2e.test.onap.org:8443/aai/v8/business/customers/customer/300DLE/service-subscriptions/service-subscription/uCPE-VMS/service-instances/service-instance/USETEJORLFL0154UJZZ01/", + "related-to": "service-instance" + }] + } + }, + "event-header": { + "timestamp": "20161017-20:41:55:044", + "id": "20161017204155-be84d9c2-909c-427c-9ad5-0bdcdb498a06", + "action": "CREATE", + "domain": "e2e1", + "source-name": "SDNC", + "entity-link": "https://aai-app.test.onap.org:8443/aai/v8/network/generic-vnfs/generic-vnf/e5365951-9d90-4853-afae-c34a0707e3b6", + "entity-type": "generic-vnf", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "top-entity-type": "generic-vnf", + "version": "v8" + } +} diff --git a/src/test/resources/rule-driven-validator/test_events/gizmo-pserver-create-event-invalid-ipaddress.json b/src/test/resources/rule-driven-validator/test_events/gizmo-pserver-create-event-invalid-ipaddress.json new file mode 100644 index 0000000..0be90fe --- /dev/null +++ b/src/test/resources/rule-driven-validator/test_events/gizmo-pserver-create-event-invalid-ipaddress.json @@ -0,0 +1,33 @@ +{ + "cambria.partition":"AAI", + "entity":{ + "timestamp":1514927928167, + "operation":"CREATE", + "vertex":{ + "properties":{ + "ipv4-oam-address":"1.2.3.", + "resource-version":"1477013499", + "purpose":"my-purpose", + "fqdn":"myhost.onap.net", + "in-maint":false, + "equip-model":"DL380p-nd", + "equip-vendor":"HP", + "equip-type":"server", + "hostname":"myhost", + "ptnii-equip-name":"e-name" + }, + "key":"", + "type":"pserver", + "schema-version":"vX" + }, + "transaction-id":"c0a81fa7-5ef4-49cd-ab39-e42c53c9b9a4", + "database-transaction-id":"b3e2853e-f643-47a3-a0c3-cb54cc997ad3" + }, + "event-header":{ + "timestamp":"1514927928167", + "id":"c0a81fa7-5ef4-49cd-ab39-e42c53c9b9a4", + "source-name":"GIZMO", + "entity-type":"pserver", + "event-type":"GIZMO-EVENT" + } +}
\ No newline at end of file diff --git a/src/test/resources/rule-driven-validator/test_events/gizmo-pserver-create-event.json b/src/test/resources/rule-driven-validator/test_events/gizmo-pserver-create-event.json new file mode 100644 index 0000000..2ba5550 --- /dev/null +++ b/src/test/resources/rule-driven-validator/test_events/gizmo-pserver-create-event.json @@ -0,0 +1,33 @@ +{ + "cambria.partition":"AAI", + "entity":{ + "timestamp":1514927928167, + "operation":"CREATE", + "vertex":{ + "properties":{ + "ipv4-oam-address":"1.2.3.4", + "resource-version":"1477013499", + "purpose":"my-purpose", + "fqdn":"myhost.onap.net", + "in-maint":false, + "equip-model":"DL380p-nd", + "equip-vendor":"HP", + "equip-type":"server", + "hostname":"myhost", + "ptnii-equip-name":"e-name" + }, + "key":"", + "type":"pserver", + "schema-version":"vX" + }, + "transaction-id":"c0a81fa7-5ef4-49cd-ab39-e42c53c9b9a4", + "database-transaction-id":"b3e2853e-f643-47a3-a0c3-cb54cc997ad3" + }, + "event-header":{ + "timestamp":"1514927928167", + "id":"c0a81fa7-5ef4-49cd-ab39-e42c53c9b9a4", + "source-name":"GIZMO", + "entity-type":"pserver", + "event-type":"GIZMO-EVENT" + } +}
\ No newline at end of file diff --git a/src/test/resources/rule-driven-validator/test_events/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-BAD.json b/src/test/resources/rule-driven-validator/test_events/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-BAD.json new file mode 100644 index 0000000..b5c0a31 --- /dev/null +++ b/src/test/resources/rule-driven-validator/test_events/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-BAD.json @@ -0,0 +1,144 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v7", + "action": "CREATE", + "entity-type": "vserver", + "top-entity-type": "cloud-region", + "entity-link": "https://dummy-host.onap.org:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666" + }, + "entity": { + "cloud-owner": "region1", + "cloud-region-id": "AAIregion1", + "tenants": { + "tenant": [{ + "tenant-id": "example-tenant-id-val-88551", + "tenant-name": "example-tenant-name-val-88551", + "vservers": { + "vserver": [{ + "vserver-id": "c385bb3e-6ebd-4898-bc92-792e0ac2db50", + "vserver-name": "bems0001vm001", + "vserver-name2": "bems0001vm001bem001-1452", + "prov-status": "ACTIVE", + "vserver-selflink": "TRINITY vserverLink", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1475160142", + "relationship-list": { + "relationship": [{ + "related-to": "generic-vnf", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/network/generic-vnfs/generic-vnf/ctpx12345v/", + "relationship-data": [{ + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "ctpx12345v" + }], + "related-to-property": [{ + "property-key": "generic-vnf.vnf-name", + "property-value": "ctpx12345v" + }] + }, + { + "related-to": "vf-module", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/network/generic-vnfs/generic-vnf/ctpx12345v/vf-modules/vf-module/ctpx12345v/", + "relationship-data": [{ + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "ctpx12345v" + }, + { + "relationship-key": "vf-module.vf-module-id", + "relationship-value": "ctpx12345v" + }] + }, + { + "related-to": "image", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/images/image/TRINITY-IMAGE/", + "relationship-data": [{ + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "image.image-id", + "relationship-value": "TRINITY-IMAGE" + }], + "related-to-property": [{ + "property-key": "image.image-name", + "property-value": "TRINITY IMAGE" + }] + }, + { + "related-to": "pserver", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/pservers/pserver/TRINITY-PSERVER/", + "relationship-data": [{ + "relationship-key": "pserver.hostname", + "relationship-value": "TRINITY-PSERVER" + }], + "related-to-property": [{ + "property-key": "pserver.pserver-name2" + }] + }, + { + "related-to": "flavor", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/flavors/flavor/TRINITY-Flavor/", + "relationship-data": [{ + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "flavor.flavor-id", + "relationship-value": "TRINITY-Flavor" + }], + "related-to-property": [{ + "property-key": "flavor.flavor-name", + "property-value": "TRINITY Flavor" + }] + }] + }, + "l-interfaces": { + "l-interface": [{ + "interface-name": "BSFT-EMS-VMVNIC1", + "resource-version": "1455590484", + "l3-interface-ipv4-address-list": [{ + "l3-interface-ipv4-address": "130.3.148.14", + "l3-interface-ipv4-prefix-length": 32, + "resource-version": "1455590484", + "relationship-list": { + "relationship": [{ + "related-to": "subnet", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/network/l3-networks/l3-network/AIC_SBG_NSDNet_Trinity_OAMP_3900-1234-1/subnets/subnet/AIC_SBG_NSDNet_Trinity_OAMP_3900-1234-1-ipv4/", + "relationship-data": [{ + "relationship-key": "l3-network.network-id", + "relationship-value": "AIC_SBG_NSDNet_Trinity_OAMP_3900-1234-1" + }, + { + "relationship-key": "subnet.subnet-id", + "relationship-value": "AIC_SBG_NSDNet_Trinity_OAMP_3900-1234-1-ipv4" + }], + "related-to-property": [{ + "property-key": "subnet.subnet-name" + }] + }] + } + }] + }] + } + }] + } + }] + } + } +} diff --git a/src/test/resources/rule-driven-validator/test_events/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-GOOD.json b/src/test/resources/rule-driven-validator/test_events/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-GOOD.json new file mode 100644 index 0000000..962210a --- /dev/null +++ b/src/test/resources/rule-driven-validator/test_events/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-GOOD.json @@ -0,0 +1,144 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v7", + "action": "CREATE", + "entity-type": "vserver", + "top-entity-type": "cloud-region", + "entity-link": "https://dummy-host.test.onap.org:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666" + }, + "entity": { + "cloud-owner": "region1", + "cloud-region-id": "AAIregion1", + "tenants": { + "tenant": [{ + "tenant-id": "example-tenant-id-val-88551", + "tenant-name": "example-tenant-name-val-88551", + "vservers": { + "vserver": [{ + "vserver-id": "c385bb3e-6ebd-4898-bc92-792e0ac2db50", + "vserver-name": "bems0001vm001", + "vserver-name2": "bems0001vm001bem001-1452", + "prov-status": "ACTIVE", + "vserver-selflink": "TRINITY vserverLink", + "in-maint": false, + "is-closed-loop-disabled": false, + "resource-version": "1475160142", + "relationship-list": { + "relationship": [{ + "related-to": "generic-vnf", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/network/generic-vnfs/generic-vnf/ctpx0001v/", + "relationship-data": [{ + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "ctpx0001v" + }], + "related-to-property": [{ + "property-key": "generic-vnf.vnf-name", + "property-value": "ctpx0001v" + }] + }, + { + "related-to": "vf-module", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/network/generic-vnfs/generic-vnf/ctpx0001v/vf-modules/vf-module/ctpx0001v/", + "relationship-data": [{ + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "ctpx0001v" + }, + { + "relationship-key": "vf-module.vf-module-id", + "relationship-value": "ctpx0001v" + }] + }, + { + "related-to": "image", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/images/image/TRINITY-IMAGE/", + "relationship-data": [{ + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "image.image-id", + "relationship-value": "TRINITY-IMAGE" + }], + "related-to-property": [{ + "property-key": "image.image-name", + "property-value": "TRINITY IMAGE" + }] + }, + { + "related-to": "pserver", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/pservers/pserver/TRINITY-PSERVER/", + "relationship-data": [{ + "relationship-key": "pserver.hostname", + "relationship-value": "TRINITY-PSERVER" + }], + "related-to-property": [{ + "property-key": "pserver.pserver-name2" + }] + }, + { + "related-to": "flavor", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/flavors/flavor/TRINITY-Flavor/", + "relationship-data": [{ + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "flavor.flavor-id", + "relationship-value": "TRINITY-Flavor" + }], + "related-to-property": [{ + "property-key": "flavor.flavor-name", + "property-value": "TRINITY Flavor" + }] + }] + }, + "l-interfaces": { + "l-interface": [{ + "interface-name": "BSFT-EMS-VMVNIC1", + "resource-version": "1455590484", + "l3-interface-ipv4-address-list": [{ + "l3-interface-ipv4-address": "130.3.148.14", + "l3-interface-ipv4-prefix-length": 32, + "resource-version": "1455590484", + "relationship-list": { + "relationship": [{ + "related-to": "subnet", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/network/l3-networks/l3-network/VendorCloud_Trinity_OAMP_3900-1234-1/subnets/subnet/VendorCloud_Trinity_OAMP_3900-1234-1-ipv4/", + "relationship-data": [{ + "relationship-key": "l3-network.network-id", + "relationship-value": "VendorCloud_Trinity_OAMP_3900-1234-1" + }, + { + "relationship-key": "subnet.subnet-id", + "relationship-value": "VendorCloud_Trinity_OAMP_3900-1234-1-ipv4" + }], + "related-to-property": [{ + "property-key": "subnet.subnet-name" + }] + }] + } + }] + }] + } + }] + } + }] + } + } +} diff --git a/src/test/resources/rule-driven-validator/test_events/vserver-create-event.json b/src/test/resources/rule-driven-validator/test_events/vserver-create-event.json new file mode 100644 index 0000000..85bcdf3 --- /dev/null +++ b/src/test/resources/rule-driven-validator/test_events/vserver-create-event.json @@ -0,0 +1,243 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v7", + "action": "CREATE", + "entity-type": "vserver", + "top-entity-type": "cloud-region", + "entity-link": "https://dummy-host.test.onap.org:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666" + }, + "entity": { + "cloud-owner": "region1", + "cloud-region-id": "AAIregion1", + "tenants": { + "tenant": [ + { + "tenant-id": "example-tenant-id-val-88551", + "tenant-name": "example-tenant-name-val-88551", + "vservers": { + "vserver": [ + { + "vserver-id": "example-vserver-id-val-34666", + "vserver-name": "example-vserver-name-val-34666", + "vserver-name2": "example-vserver-name2-val-34666", + "prov-status": "INVALID", + "vserver-selflink": "example-vserver-selflink-val-34666", + "in-maint": true, + "is-closed-loop-disabled": true, + "resource-version": "1464193654", + "volumes": { + "volume": [ + { + "volume-id": "example-volume-id-val-79195", + "volume-selflink": "example-volume-selflink-val-79195", + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + }, + "relationship-list": { + "relationship": [ + { + "related-to": "generic-vnf", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/network/generic-vnfs/generic-vnf/bmsx0001v-1661/", + "relationship-data": [ + { + "relationship-key": "generic-vnf.vnf-id", + "relationship-value": "bmsx0001v-1661" + } + ], + "related-to-property": [ + { + "property-key": "generic-vnf.vnf-name", + "property-value": "bmsx000x" + } + ] + }, + { + "related-to": "image", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/images/image/ee49d429-283d-4f79-9c58-e11cc38d8856/", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "image.image-id", + "relationship-value": "ee49d429-283d-4f79-9c58-e11cc38d8856" + } + ], + "related-to-property": [ + { + "property-key": "image.image-name", + "property-value": "TRINITY" + } + ] + }, + { + "related-to": "pserver", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/pservers/pserver/dpa2r03c007/", + "relationship-data": [ + { + "relationship-key": "pserver.hostname", + "relationship-value": "dpa2r03c007" + } + ], + "related-to-property": [ + { + "property-key": "pserver.pserver-name2" + } + ] + }, + { + "related-to": "flavor", + "related-link": "https://dummy-host.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/flavors/flavor/5288f576-d9c6-46fc-9dcb-f6946a2b3597/", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "flavor.flavor-id", + "relationship-value": "5288f576-d9c6-46fc-9dcb-f6946a2b3597" + } + ], + "related-to-property": [ + { + "property-key": "flavor.flavor-name", + "property-value": "l5.xLarge" + } + ] + } + ] + }, + "l-interfaces": { + "l-interface": [ + { + "interface-name": "example-interface-name-val-25679", + "interface-role": "example-interface-role-val-25679", + "v6-wan-link-ip": "example-v6-wan-link-ip-val-25679", + "selflink": "example-selflink-val-25679", + "interface-id": "example-interface-id-val-25679", + "macaddr": "example-macaddr-val-25679", + "network-name": "example-network-name-val-25679", + "resource-version": "1464193654", + "vlans": { + "vlan": [ + { + "vlan-interface": "example-vlan-interface-val-28675", + "vlan-id-inner": 22278797, + "vlan-id-outer": 22278797, + "resource-version": "1464193654", + "speed-value": "example-speed-value-val-28675", + "speed-units": "example-speed-units-val-28675", + "vlan-description": "example-vlan-description-val-28675", + "relationship-list": { + + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-39271", + "l3-interface-ipv4-prefix-length": 78868308, + "vlan-id-inner": 78868308, + "vlan-id-outer": 78868308, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-4005", + "l3-interface-ipv6-prefix-length": 78340763, + "vlan-id-inner": 78340763, + "vlan-id-outer": 78340763, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + } + ] + }, + "sriov-vfs": { + "sriov-vf": [ + { + "pci-id": "example-pci-id-val-85354", + "vf-vlan-filter": "example-vf-vlan-filter-val-85354", + "vf-mac-filter": "example-vf-mac-filter-val-85354", + "vf-vlan-strip": true, + "vf-vlan-anti-spoof-check": true, + "vf-mac-anti-spoof-check": true, + "vf-mirrors": "example-vf-mirrors-val-85354", + "vf-broadcast-allow": true, + "vf-unknown-multicast-allow": true, + "vf-unknown-unicast-allow": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + }, + "relationship-list": { + + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-21446", + "l3-interface-ipv4-prefix-length": 71127022, + "vlan-id-inner": 71127022, + "vlan-id-outer": 71127022, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-88071", + "l3-interface-ipv6-prefix-length": 55080281, + "vlan-id-inner": 55080281, + "vlan-id-outer": 55080281, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + } + ] + } + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/src/test/resources/rule-driven-validator/test_events/vserver-update-AAI-EVENT-devINT1.json b/src/test/resources/rule-driven-validator/test_events/vserver-update-AAI-EVENT-devINT1.json new file mode 100644 index 0000000..92bec16 --- /dev/null +++ b/src/test/resources/rule-driven-validator/test_events/vserver-update-AAI-EVENT-devINT1.json @@ -0,0 +1,108 @@ +{ + "cambria.partition": "AAI", + "entity": { + "cloud-region-id": "AAIregion1", + "cloud-owner": "region1", + "tenants": { + "tenant": [{ + "vservers": { + "vserver": [{ + "resource-version": "1476735222", + "is-closed-loop-disabled": false, + "vserver-selflink": "http://compute.test.onap.org:8774/v2/d52b9dea5d0f4e5d90be3590ac8c78a9/servers/fd280243-cd5c-424e-b629-533cabe2a164", + "vserver-name": "vm-54", + "vserver-id": "fd280243-cd5c-424e-b629-533cabe2a164", + "in-maint": false, + "vserver-name2": "VM_54", + "l-interfaces": { + "l-interface": [{ + "resource-version": "1452288058", + "macaddr": "02:fd:59:37:be:3c", + "selflink": "http://network.test.onap.org:9696/v2.0/ports/fd5937be-3ca4-4db0-89c9-e210bf8bf31f", + "interface-id": "fd5937be-3ca4-4db0-89c9-e210bf8bf31f", + "l3-interface-ipv4-address-list": [{ + "resource-version": "1452288058", + "l3-interface-ipv4-address": "192.168.112.56", + "neutron-network-id": "a2e5433f-38c7-420e-9c06-134ee893de3f", + "neutron-subnet-id": "b58a5b21-1f3b-42b8-93a6-109b2a700fdb", + "is-floating": false, + "l3-interface-ipv4-prefix-length": 24 + }], + "interface-name": "fd5937be-3ca4-4db0-89c9-e210bf8bf31f", + "network-name": "CinderVolumeNetwork" + }] + }, + "relationship-list": { + "relationship": [{ + "relationship-data": [{ + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "image.image-id", + "relationship-value": "fc2b5df5-0e28-4c05-9e8c-75cebbd537e5" + }], + "related-to-property": [{ + "property-value": "TestVM", + "property-key": "image.image-name" + }], + "related-link": "https://aai-app-e2e.test.onap.org:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/images/image/fc2b5df5-0e28-4c05-9e8c-75cebbd537e5/", + "related-to": "image" + }, + { + "relationship-data": [{ + "relationship-key": "pserver.hostname", + "relationship-value": "dummy-host.test.onap.org" + }], + "related-to-property": [{ + "property-key": "pserver.pserver-name2" + }], + "related-link": "https://aai-app-e2e.test.onap.org:8443/aai/v7/cloud-infrastructure/pservers/pserver/dummy-host.test.onap.org/", + "related-to": "pserver" + }, + { + "relationship-data": [{ + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "region1" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "AAIregion1" + }, + { + "relationship-key": "flavor.flavor-id", + "relationship-value": "31" + }], + "related-to-property": [{ + "property-value": "m1.small", + "property-key": "flavor.flavor-name" + }], + "related-link": "https://aai-app-e2e.test.onap.org:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/flavors/flavor/31/", + "related-to": "flavor" + }] + } + }] + }, + "tenant-id": "d52b9dea5d0f4e5d90be3590ac8c78a9" + }] + } + }, + "event-header": { + "timestamp": "20161017-20:13:45:472", + "id": "20161017201345-af157723-3835-4619-b6d8-dc16c19308bb", + "action": "UPDATE", + "domain": "devINT1", + "source-name": "RO", + "entity-link": "https://aai-app.test.onap.org:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/d52b9dea5d0f4e5d90be3590ac8c78a9/vservers/vserver/fd280243-cd5c-424e-b629-533cabe2a164", + "entity-type": "vserver", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "top-entity-type": "cloud-region", + "version": "v8" + } +} diff --git a/src/test/resources/topic-admin-config/test-validation-service-beans.xml b/src/test/resources/topic-admin-config/test-validation-service-beans.xml new file mode 100644 index 0000000..caf63c3 --- /dev/null +++ b/src/test/resources/topic-admin-config/test-validation-service-beans.xml @@ -0,0 +1,28 @@ +<?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: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.xsd"> + + <context:property-placeholder location="classpath:topic-admin-config/validation-service.properties" /> + + <bean id="topicAdminConfig" class="org.onap.aai.validation.config.TopicAdminConfig" /> + +</beans>
\ No newline at end of file diff --git a/src/test/resources/topic-admin-config/validation-service.properties b/src/test/resources/topic-admin-config/validation-service.properties new file mode 100644 index 0000000..01b02dd --- /dev/null +++ b/src/test/resources/topic-admin-config/validation-service.properties @@ -0,0 +1,20 @@ +# ============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===================================================== + +topic.publish.enable=true +topic.publish.retries=3 +topic.consume.enable=true +topic.consume.polling.interval.seconds=3
\ No newline at end of file diff --git a/src/test/resources/topic-config/test-topic-config-beans.xml b/src/test/resources/topic-config/test-topic-config-beans.xml new file mode 100644 index 0000000..0466f81 --- /dev/null +++ b/src/test/resources/topic-config/test-topic-config-beans.xml @@ -0,0 +1,49 @@ +<?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 diff --git a/src/test/resources/topic-config/test-validation-service-beans.xml b/src/test/resources/topic-config/test-validation-service-beans.xml new file mode 100644 index 0000000..9d880a3 --- /dev/null +++ b/src/test/resources/topic-config/test-validation-service-beans.xml @@ -0,0 +1,25 @@ +<?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"> + + <import resource="test-topic-config-beans.xml" /> + +</beans>
\ No newline at end of file diff --git a/src/test/resources/topic-config/topic-aai-data-export.properties b/src/test/resources/topic-config/topic-aai-data-export.properties new file mode 100644 index 0000000..af182ca --- /dev/null +++ b/src/test/resources/topic-config/topic-aai-data-export.properties @@ -0,0 +1,23 @@ +# ============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===================================================== + +aai-data-export.name=aai-data-export +aai-data-export.host=export-dummy-host +aai-data-export.username=export-dummy-username +aai-data-export.password=export-dummy-password +aai-data-export.consumer.group=export-dummy-consumer-group +aai-data-export.consumer.id=export-dummy-consumer-id +aai-data-export.transport.type=export-dummy-transport-type
\ No newline at end of file diff --git a/src/test/resources/topic-config/topic-aai-data-integrity.properties b/src/test/resources/topic-config/topic-aai-data-integrity.properties new file mode 100644 index 0000000..f5a5839 --- /dev/null +++ b/src/test/resources/topic-config/topic-aai-data-integrity.properties @@ -0,0 +1,22 @@ +# ============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===================================================== + +aai-data-integrity.name=aai-data-integrity +aai-data-integrity.host=integrity-dummy-host +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 diff --git a/src/test/resources/topic-config/topic-aai-event.properties b/src/test/resources/topic-config/topic-aai-event.properties new file mode 100644 index 0000000..2779f13 --- /dev/null +++ b/src/test/resources/topic-config/topic-aai-event.properties @@ -0,0 +1,23 @@ +# ============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===================================================== + +aai-event.name=aai-event +aai-event.host=event-dummy-host +aai-event.username=event-dummy-username +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 diff --git a/src/test/resources/validation-controller-config/test-validation-service-beans.xml b/src/test/resources/validation-controller-config/test-validation-service-beans.xml new file mode 100644 index 0000000..b6f8099 --- /dev/null +++ b/src/test/resources/validation-controller-config/test-validation-service-beans.xml @@ -0,0 +1,29 @@ +<?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: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.xsd"> + + <context:property-placeholder location="classpath:validation-controller-config/validation-controller-config.properties" /> + + <bean id="validationControllerConfig" class="org.onap.aai.validation.config.ValidationControllerConfig" /> + +</beans>
\ No newline at end of file diff --git a/src/test/resources/validation-controller-config/validation-controller-config.properties b/src/test/resources/validation-controller-config/validation-controller-config.properties new file mode 100644 index 0000000..d30008f --- /dev/null +++ b/src/test/resources/validation-controller-config/validation-controller-config.properties @@ -0,0 +1,21 @@ +# ============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===================================================== + +event.domain=devINT1 +event.action.exclude=DELETE +event.type.rule=AAI-EVENT,AAI-DATA-EXPORT-API +event.type.model=AAI-DATA-EXPORT-NQ +event.type.end=END-EVENT
\ No newline at end of file diff --git a/src/test/resources/validation-result/test-validation-service-beans.xml b/src/test/resources/validation-result/test-validation-service-beans.xml new file mode 100644 index 0000000..9a67d0a --- /dev/null +++ b/src/test/resources/validation-result/test-validation-service-beans.xml @@ -0,0 +1,38 @@ +<?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: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.xsd"> + + <import resource="../oxm-reader/oxm-reader-beans.xml" /> + + <context:property-placeholder location="classpath:event-reader.properties" /> + + <bean id="eventReaderConfig" class="org.onap.aai.validation.config.EventReaderConfig" /> + + <bean id="jsonReader" class="org.onap.aai.validation.reader.JsonReader" /> + + <bean id="eventReader" class="org.onap.aai.validation.reader.EventReader"> + <constructor-arg ref="eventReaderConfig" /> + <constructor-arg ref="jsonReader" /> + <constructor-arg ref="oxmReader" /> + </bean> +</beans> diff --git a/src/test/resources/validation-result/vserver-create-event.json b/src/test/resources/validation-result/vserver-create-event.json new file mode 100644 index 0000000..21e4da8 --- /dev/null +++ b/src/test/resources/validation-result/vserver-create-event.json @@ -0,0 +1,163 @@ +{ + "cambria.partition": "AAI", + "event-header": { + "id": "20160525162737-61c49d41-5338-4755-af54-06cee9fe4acf", + "timestamp": "20160525-16:27:37:353", + "source-name": "RO", + "domain": "devINT1", + "sequence-number": "0", + "severity": "NORMAL", + "event-type": "AAI-EVENT", + "version": "v7", + "action": "CREATE", + "entity-type": "vserver", + "top-entity-type": "cloud-region", + "entity-link": "https://dummy-host.onap.org:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/region1/AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666" + }, + "entity": { + "cloud-owner": "region1", + "cloud-region-id": "AAIregion1", + "tenants": { + "tenant": [ + { + "tenant-id": "example-tenant-id-val-88551", + "tenant-name": "example-tenant-name-val-88551", + "vservers": { + "vserver": [ + { + "vserver-id": "example-vserver-id-val-34666", + "vserver-name": "example-vserver-name-val-34666", + "vserver-name2": "example-vserver-name2-val-34666", + "prov-status": "PREPROV", + "vserver-selflink": "example-vserver-selflink-val-34666", + "in-maint": true, + "is-closed-loop-disabled": true, + "resource-version": "1464193654", + "volumes": { + "volume": [ + { + "volume-id": "example-volume-id-val-79195", + "volume-selflink": "example-volume-selflink-val-79195", + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + }, + "relationship-list": { + + }, + "l-interfaces": { + "l-interface": [ + { + "interface-name": "example-interface-name-val-25679", + "interface-role": "example-interface-role-val-25679", + "v6-wan-link-ip": "example-v6-wan-link-ip-val-25679", + "selflink": "example-selflink-val-25679", + "interface-id": "example-interface-id-val-25679", + "macaddr": "example-macaddr-val-25679", + "network-name": "example-network-name-val-25679", + "resource-version": "1464193654", + "vlans": { + "vlan": [ + { + "vlan-interface": "example-vlan-interface-val-28675", + "vlan-id-inner": 22278797, + "vlan-id-outer": 22278797, + "resource-version": "1464193654", + "speed-value": "example-speed-value-val-28675", + "speed-units": "example-speed-units-val-28675", + "vlan-description": "example-vlan-description-val-28675", + "relationship-list": { + + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-39271", + "l3-interface-ipv4-prefix-length": 78868308, + "vlan-id-inner": 78868308, + "vlan-id-outer": 78868308, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-4005", + "l3-interface-ipv6-prefix-length": 78340763, + "vlan-id-inner": 78340763, + "vlan-id-outer": 78340763, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + } + ] + }, + "sriov-vfs": { + "sriov-vf": [ + { + "pci-id": "example-pci-id-val-85354", + "vf-vlan-filter": "example-vf-vlan-filter-val-85354", + "vf-mac-filter": "example-vf-mac-filter-val-85354", + "vf-vlan-strip": true, + "vf-vlan-anti-spoof-check": true, + "vf-mac-anti-spoof-check": true, + "vf-mirrors": "example-vf-mirrors-val-85354", + "vf-broadcast-allow": true, + "vf-unknown-multicast-allow": true, + "vf-unknown-unicast-allow": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + }, + "relationship-list": { + + }, + "l3-interface-ipv4-address-list": [ + { + "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-21446", + "l3-interface-ipv4-prefix-length": 71127022, + "vlan-id-inner": 71127022, + "vlan-id-outer": 71127022, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ], + "l3-interface-ipv6-address-list": [ + { + "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-88071", + "l3-interface-ipv6-prefix-length": 55080281, + "vlan-id-inner": 55080281, + "vlan-id-outer": 55080281, + "is-floating": true, + "resource-version": "1464193654", + "relationship-list": { + + } + } + ] + } + ] + } + } + ] + } + } + ] + } + } +}
\ No newline at end of file diff --git a/src/test/resources/validation-service.properties b/src/test/resources/validation-service.properties new file mode 100644 index 0000000..9321c41 --- /dev/null +++ b/src/test/resources/validation-service.properties @@ -0,0 +1,27 @@ +# ============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===================================================== + +topic.publish.enable=true +topic.publish.retries=3 +topic.consume.enable=true +topic.consume.polling.interval.seconds=7 + +event.domain=devINT1 +event.action.exclude=DELETE +event.type.rule=AAI-EVENT,AAI-DATA-EXPORT-API,GIZMO-EVENT,SPIKE-EVENT,EMPTY-RULESET-EVENT +event.type.model=AAI-DATA-EXPORT-NQ + +model.cache.expirySeconds=3
\ No newline at end of file |