summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/bin/start.sh53
-rw-r--r--src/main/docker/Dockerfile53
-rw-r--r--src/main/docker/readme.txt20
-rw-r--r--src/main/java/org/onap/aai/auth/AAIAuthException.java34
-rw-r--r--src/main/java/org/onap/aai/auth/AAIMicroServiceAuth.java103
-rw-r--r--src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java269
-rw-r--r--src/main/java/org/onap/aai/auth/FileWatcher.java58
-rw-r--r--src/main/java/org/onap/aai/validation/ValidationServiceApplication.java57
-rw-r--r--src/main/java/org/onap/aai/validation/Validator.java45
-rw-r--r--src/main/java/org/onap/aai/validation/config/EventReaderConfig.java163
-rw-r--r--src/main/java/org/onap/aai/validation/config/ModelConfig.java39
-rw-r--r--src/main/java/org/onap/aai/validation/config/PropertiesConfig.java41
-rw-r--r--src/main/java/org/onap/aai/validation/config/RestConfig.java225
-rw-r--r--src/main/java/org/onap/aai/validation/config/RuleIndexingConfig.java73
-rw-r--r--src/main/java/org/onap/aai/validation/config/TopicAdminConfig.java103
-rw-r--r--src/main/java/org/onap/aai/validation/config/TopicConfig.java243
-rw-r--r--src/main/java/org/onap/aai/validation/config/TopicPropertiesConfig.java75
-rw-r--r--src/main/java/org/onap/aai/validation/config/ValidationControllerConfig.java82
-rw-r--r--src/main/java/org/onap/aai/validation/config/ValidationServiceAuthConfig.java46
-rw-r--r--src/main/java/org/onap/aai/validation/controller/ValidationController.java380
-rw-r--r--src/main/java/org/onap/aai/validation/data/client/RestClient.java121
-rw-r--r--src/main/java/org/onap/aai/validation/exception/BaseValidationServiceException.java66
-rw-r--r--src/main/java/org/onap/aai/validation/exception/ValidationServiceError.java103
-rw-r--r--src/main/java/org/onap/aai/validation/exception/ValidationServiceException.java78
-rw-r--r--src/main/java/org/onap/aai/validation/factory/DMaaPEventPublisherFactory.java34
-rw-r--r--src/main/java/org/onap/aai/validation/logging/ApplicationMsgs.java74
-rw-r--r--src/main/java/org/onap/aai/validation/logging/LogHelper.java548
-rw-r--r--src/main/java/org/onap/aai/validation/modeldriven/ModelCacheManager.java182
-rw-r--r--src/main/java/org/onap/aai/validation/modeldriven/ModelId.java86
-rw-r--r--src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/Filter.java75
-rw-r--r--src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/ModelInstanceMapper.java89
-rw-r--r--src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/ModelInstanceMappingReader.java69
-rw-r--r--src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/ValueConfiguration.java124
-rw-r--r--src/main/java/org/onap/aai/validation/modeldriven/parser/XMLModelParser.java152
-rw-r--r--src/main/java/org/onap/aai/validation/modeldriven/validator/InstanceReader.java316
-rw-r--r--src/main/java/org/onap/aai/validation/modeldriven/validator/ModelDrivenValidator.java306
-rw-r--r--src/main/java/org/onap/aai/validation/modeldriven/validator/ModelReader.java236
-rw-r--r--src/main/java/org/onap/aai/validation/modeldriven/validator/ViolationInfo.java88
-rw-r--r--src/main/java/org/onap/aai/validation/publisher/MessagePublisher.java47
-rw-r--r--src/main/java/org/onap/aai/validation/publisher/ValidationEventPublisher.java164
-rw-r--r--src/main/java/org/onap/aai/validation/reader/EntityReader.java61
-rw-r--r--src/main/java/org/onap/aai/validation/reader/EventEntityReader.java118
-rw-r--r--src/main/java/org/onap/aai/validation/reader/EventReader.java215
-rw-r--r--src/main/java/org/onap/aai/validation/reader/InstanceEntityReader.java75
-rw-r--r--src/main/java/org/onap/aai/validation/reader/JsonReader.java186
-rw-r--r--src/main/java/org/onap/aai/validation/reader/OxmConfigTranslator.java100
-rw-r--r--src/main/java/org/onap/aai/validation/reader/OxmReader.java99
-rw-r--r--src/main/java/org/onap/aai/validation/reader/data/AttributeValues.java139
-rw-r--r--src/main/java/org/onap/aai/validation/reader/data/Entity.java135
-rw-r--r--src/main/java/org/onap/aai/validation/reader/data/EntityId.java91
-rw-r--r--src/main/java/org/onap/aai/validation/result/ValidationResult.java244
-rw-r--r--src/main/java/org/onap/aai/validation/result/Violation.java418
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/RuleDrivenValidator.java278
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/RuleManager.java91
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/configuration/EntitySection.java101
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/configuration/GroovyConfigurationException.java103
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/configuration/RuleSection.java200
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/configuration/RulesConfigurationLoader.groovy309
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/configuration/SettingsSection.java48
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/configuration/build/ContentBuilder.java198
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/configuration/build/EntityBuilder.java70
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/configuration/build/RuleBuilder.java59
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/configuration/build/UseRuleBuilder.java46
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/configuration/build/ValidationBuilder.java78
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/rule/GroovyRule.java323
-rw-r--r--src/main/java/org/onap/aai/validation/ruledriven/rule/Rule.java81
-rw-r--r--src/main/java/org/onap/aai/validation/services/EventPollingService.java121
-rw-r--r--src/main/java/org/onap/aai/validation/services/InfoService.java57
-rw-r--r--src/main/java/org/onap/aai/validation/services/RequestHeaders.java53
-rw-r--r--src/main/java/org/onap/aai/validation/services/ValidateService.java77
-rw-r--r--src/main/java/org/onap/aai/validation/services/ValidateServiceImpl.java160
-rw-r--r--src/main/java/org/onap/aai/validation/servlet/StartupServlet.java95
-rw-r--r--src/main/java/org/onap/aai/validation/util/GsonUtil.java124
-rw-r--r--src/main/java/org/onap/aai/validation/util/JsonUtil.java94
-rw-r--r--src/main/java/org/onap/aai/validation/util/StringUtils.java100
-rw-r--r--src/main/resources/application.properties44
-rw-r--r--src/main/resources/event-reader.properties31
-rw-r--r--src/main/resources/logback.xml179
-rw-r--r--src/main/resources/validation-service-beans.xml204
-rw-r--r--src/main/resources/validation-service-logging-resources.properties178
-rw-r--r--src/test/java/org/onap/aai/validation/auth/MicroServiceAuthTest.java227
-rw-r--r--src/test/java/org/onap/aai/validation/config/TestRestConfig.java79
-rw-r--r--src/test/java/org/onap/aai/validation/config/TestTopicAdminConfig.java60
-rw-r--r--src/test/java/org/onap/aai/validation/config/TestTopicConfig.java107
-rw-r--r--src/test/java/org/onap/aai/validation/config/TestValidationControllerConfig.java69
-rw-r--r--src/test/java/org/onap/aai/validation/controller/TestValidationController.java391
-rw-r--r--src/test/java/org/onap/aai/validation/data/client/TestRestClient.java74
-rw-r--r--src/test/java/org/onap/aai/validation/logging/LogReader.java101
-rw-r--r--src/test/java/org/onap/aai/validation/logging/TestApplicationLogger.java245
-rw-r--r--src/test/java/org/onap/aai/validation/modeldriven/TestModelId.java95
-rw-r--r--src/test/java/org/onap/aai/validation/modeldriven/configuration/mapping/TestFilter.java55
-rw-r--r--src/test/java/org/onap/aai/validation/modeldriven/configuration/mapping/TestModelInstanceMapper.java71
-rw-r--r--src/test/java/org/onap/aai/validation/modeldriven/configuration/mapping/TestValueConfiguration.java70
-rw-r--r--src/test/java/org/onap/aai/validation/modeldriven/parser/TestXMLModelParser.java96
-rw-r--r--src/test/java/org/onap/aai/validation/modeldriven/validator/TestInstanceReader.java236
-rw-r--r--src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelDrivenValidator.java291
-rw-r--r--src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelReader.java261
-rw-r--r--src/test/java/org/onap/aai/validation/publisher/MockEventPublisher.java72
-rw-r--r--src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java102
-rw-r--r--src/test/java/org/onap/aai/validation/reader/TestEventReader.java270
-rw-r--r--src/test/java/org/onap/aai/validation/reader/TestJsonReader.java95
-rw-r--r--src/test/java/org/onap/aai/validation/reader/TestOxmConfigTranslator.java111
-rw-r--r--src/test/java/org/onap/aai/validation/reader/TestOxmReader.java63
-rw-r--r--src/test/java/org/onap/aai/validation/request/TestRequestHeaders.java143
-rw-r--r--src/test/java/org/onap/aai/validation/result/TestValidationResult.java444
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/configuration/ConfigFileBuilder.java104
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/configuration/ConfigurationExceptionMatcher.java73
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/configuration/TestConfigFileBuilder.java59
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/configuration/TestRulesConfigurationReader.java448
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/mock/TestDefaultRules.java148
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/rule/RuleHelper.java36
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/rule/RuleTester.java47
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/rule/TestConfigurationLoader.java190
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/rule/TestRuleExecution.java494
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/rule/TestRuleValidation.java229
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/validator/TestRuleDrivenValidator.java125
-rw-r--r--src/test/java/org/onap/aai/validation/services/TestInfoService.java140
-rw-r--r--src/test/java/org/onap/aai/validation/services/TestValidateServiceImpl.java115
-rw-r--r--src/test/java/org/onap/aai/validation/test/util/RandomString.java40
-rw-r--r--src/test/java/org/onap/aai/validation/test/util/TestEntity.java88
-rw-r--r--src/test/java/org/onap/aai/validation/test/util/TestUtil.java52
-rw-r--r--src/test/java/org/onap/aai/validation/test/util/ValidationResultIsEqual.java58
-rw-r--r--src/test/java/org/onap/aai/validation/util/TestStringUtils.java170
-rw-r--r--src/test/resources/aai-environment.properties31
-rw-r--r--src/test/resources/auth/auth_policy.json55
-rw-r--r--src/test/resources/event-reader/generic-vnf-create-event.json75
-rw-r--r--src/test/resources/event-reader/invalid-event-1.json165
-rw-r--r--src/test/resources/event-reader/invalid-event-2.json165
-rw-r--r--src/test/resources/event-reader/invalid-event-3.json75
-rw-r--r--src/test/resources/event-reader/invalid-event-4.json150
-rw-r--r--src/test/resources/event-reader/invalid-event-5.json165
-rw-r--r--src/test/resources/event-reader/test-validation-service-beans.xml38
-rw-r--r--src/test/resources/event-reader/vserver-create-event.json165
-rw-r--r--src/test/resources/info-service/test-validation-service-beans.xml120
-rw-r--r--src/test/resources/json-reader/sample.json13
-rw-r--r--src/test/resources/logback.xml180
-rw-r--r--src/test/resources/model-instance-mapping.json_conf28
-rw-r--r--src/test/resources/model-validation/instance-reader/connector-attributes.json399
-rw-r--r--src/test/resources/model-validation/instance-reader/connector-model-name.json84
-rw-r--r--src/test/resources/model-validation/instance-reader/connector-sibling-inventory-items.json118
-rw-r--r--src/test/resources/model-validation/instance-reader/connector.json82
-rw-r--r--src/test/resources/model-validation/instance-reader/expected-generic-vnf.json36
-rw-r--r--src/test/resources/model-validation/instance-reader/expected-logical-link.json51
-rw-r--r--src/test/resources/model-validation/instance-reader/expected-pserver.json28
-rw-r--r--src/test/resources/model-validation/instance-reader/expected-virtual-data-center-model-name.json66
-rw-r--r--src/test/resources/model-validation/instance-reader/expected-virtual-data-center.json65
-rw-r--r--src/test/resources/model-validation/instance-reader/model-instance-mapping-attributes.json_conf12
-rw-r--r--src/test/resources/model-validation/instance-reader/model-instance-mapping-root-missing.json_conf16
-rw-r--r--src/test/resources/model-validation/instance-reader/model-instance-mapping-root-unknown.json_conf17
-rw-r--r--src/test/resources/model-validation/instance-reader/model-instance-mapping.json_conf17
-rw-r--r--src/test/resources/model-validation/instance-reader/test-validation-service-beans.xml35
-rw-r--r--src/test/resources/model-validation/instance-validator/aai-environment.properties31
-rw-r--r--src/test/resources/model-validation/instance-validator/all-models.xml1370
-rw-r--r--src/test/resources/model-validation/instance-validator/connector-instance-errors.json113
-rw-r--r--src/test/resources/model-validation/instance-validator/connector-instance-multiple-missing-attrs.json50
-rw-r--r--src/test/resources/model-validation/instance-validator/connector-instance-multiple-unexpected-attrs.json72
-rw-r--r--src/test/resources/model-validation/instance-validator/connector-instance-no-model-id.json111
-rw-r--r--src/test/resources/model-validation/instance-validator/connector-instance-success.json62
-rw-r--r--src/test/resources/model-validation/instance-validator/connector-instance-unknown-model-id.json113
-rw-r--r--src/test/resources/model-validation/instance-validator/connector-instance.json113
-rw-r--r--src/test/resources/model-validation/instance-validator/connector-widget-id.xml79
-rw-r--r--src/test/resources/model-validation/instance-validator/model-instance-mapping.json_conf28
-rw-r--r--src/test/resources/model-validation/instance-validator/test-validation-service-beans.xml116
-rw-r--r--src/test/resources/model-validation/instance-validator/validation-service.properties29
-rw-r--r--src/test/resources/model-validation/model-parser/all-models.xml1370
-rw-r--r--src/test/resources/model-validation/model-reader/aai-environment.properties30
-rw-r--r--src/test/resources/model-validation/model-reader/all-models.xml1370
-rw-r--r--src/test/resources/model-validation/model-reader/connector-widget-id-no-children-1.xml51
-rw-r--r--src/test/resources/model-validation/model-reader/connector-widget-id-no-children-2.xml79
-rw-r--r--src/test/resources/model-validation/model-reader/connector-widget-id.xml107
-rw-r--r--src/test/resources/model-validation/model-reader/logical-link-widget-id.xml181
-rw-r--r--src/test/resources/model-validation/model-reader/model-instance-mapping-attributes-1.json11
-rw-r--r--src/test/resources/model-validation/model-reader/model-instance-mapping-attributes-2.json11
-rw-r--r--src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-1.json18
-rw-r--r--src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-2.json18
-rw-r--r--src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-3.json17
-rw-r--r--src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-4.json18
-rw-r--r--src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-5.json17
-rw-r--r--src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-filter-6.json14
-rw-r--r--src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-root-1.json18
-rw-r--r--src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-root-2.json17
-rw-r--r--src/test/resources/model-validation/model-reader/model-instance-mapping-relationships-with-id.json18
-rw-r--r--src/test/resources/model-validation/model-reader/model-instance-mapping-relationships.json18
-rw-r--r--src/test/resources/model-validation/model-reader/test-validation-service-beans.xml52
-rw-r--r--src/test/resources/model-validation/model-reader/validation-service.properties29
-rw-r--r--src/test/resources/model-validation/model-reader/virtual-data-center-widget-id.xml72
-rw-r--r--src/test/resources/oxm-reader/multiple/test_business_v10.xml47
-rw-r--r--src/test/resources/oxm-reader/multiple/test_business_v13.xml42
-rw-r--r--src/test/resources/oxm-reader/multiple/test_network_v10.xml48
-rw-r--r--src/test/resources/oxm-reader/multiple/test_network_v13.xml73
-rw-r--r--src/test/resources/oxm-reader/oxm-reader-beans.xml40
-rw-r--r--src/test/resources/oxm-reader/schemaIngest.properties20
-rw-r--r--src/test/resources/oxm-reader/single/aai_oxm_v0.xml23
-rw-r--r--src/test/resources/oxm-reader/single/aai_oxm_v10.xml6569
-rw-r--r--src/test/resources/oxm-reader/single/aai_oxm_v8.xml4362
-rw-r--r--src/test/resources/oxm-reader/single/aai_oxm_v9.xml4772
-rw-r--r--src/test/resources/oxm-reader/single/aai_oxm_vnonDigit.xml23
-rw-r--r--src/test/resources/oxm-reader/single/test_v10_edges.json0
-rw-r--r--src/test/resources/rest-config/aai-environment.properties29
-rw-r--r--src/test/resources/rest-config/test-validation-service-beans.xml29
-rw-r--r--src/test/resources/rule-driven-validator/results/expected/generic-vnf-create-event.exp.json35
-rw-r--r--src/test/resources/rule-driven-validator/results/expected/gizmo-pserver-create-event-invalid-ipaddress.exp.json24
-rw-r--r--src/test/resources/rule-driven-validator/results/expected/gizmo-pserver-create-event.exp.json13
-rw-r--r--src/test/resources/rule-driven-validator/results/expected/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-BAD.exp.json128
-rw-r--r--src/test/resources/rule-driven-validator/results/expected/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-GOOD.exp.json23
-rw-r--r--src/test/resources/rule-driven-validator/results/expected/vserver-create-event.exp.json208
-rw-r--r--src/test/resources/rule-driven-validator/results/expected/vserver-update-AAI-EVENT-devINT1.exp.json38
-rw-r--r--src/test/resources/rule-driven-validator/rules/aai-event/common_rules.groovy69
-rw-r--r--src/test/resources/rule-driven-validator/rules/aai-event/entity-complex.groovy146
-rw-r--r--src/test/resources/rule-driven-validator/rules/aai-event/entity-newvce.groovy43
-rw-r--r--src/test/resources/rule-driven-validator/rules/aai-event/generic-vnf-rules.groovy56
-rw-r--r--src/test/resources/rule-driven-validator/rules/aai-event/rule-vserver-all_others.groovy118
-rw-r--r--src/test/resources/rule-driven-validator/rules/aai-event/rule-vserver-related-generic-vnf.groovy42
-rw-r--r--src/test/resources/rule-driven-validator/rules/aai-event/vserver-rules.groovy44
-rw-r--r--src/test/resources/rule-driven-validator/rules/gizmo-event/common_rules.groovy27
-rw-r--r--src/test/resources/rule-driven-validator/rules/gizmo-event/pserver-rules.groovy27
-rw-r--r--src/test/resources/rule-driven-validator/test-rule-driven-validator-beans.xml55
-rw-r--r--src/test/resources/rule-driven-validator/test_events/generic-vnf-create-event.json46
-rw-r--r--src/test/resources/rule-driven-validator/test_events/gizmo-pserver-create-event-invalid-ipaddress.json33
-rw-r--r--src/test/resources/rule-driven-validator/test_events/gizmo-pserver-create-event.json33
-rw-r--r--src/test/resources/rule-driven-validator/test_events/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-BAD.json144
-rw-r--r--src/test/resources/rule-driven-validator/test_events/vserver-create-AAI-EVENT-devINT1-TRINITY-VNF-NAME-GOOD.json144
-rw-r--r--src/test/resources/rule-driven-validator/test_events/vserver-create-event.json243
-rw-r--r--src/test/resources/rule-driven-validator/test_events/vserver-update-AAI-EVENT-devINT1.json108
-rw-r--r--src/test/resources/topic-admin-config/test-validation-service-beans.xml28
-rw-r--r--src/test/resources/topic-admin-config/validation-service.properties20
-rw-r--r--src/test/resources/topic-config/test-topic-config-beans.xml49
-rw-r--r--src/test/resources/topic-config/test-validation-service-beans.xml25
-rw-r--r--src/test/resources/topic-config/topic-aai-data-export.properties23
-rw-r--r--src/test/resources/topic-config/topic-aai-data-integrity.properties22
-rw-r--r--src/test/resources/topic-config/topic-aai-event.properties23
-rw-r--r--src/test/resources/validation-controller-config/test-validation-service-beans.xml29
-rw-r--r--src/test/resources/validation-controller-config/validation-controller-config.properties21
-rw-r--r--src/test/resources/validation-result/test-validation-service-beans.xml38
-rw-r--r--src/test/resources/validation-result/vserver-create-event.json163
-rw-r--r--src/test/resources/validation-service.properties27
236 files changed, 43613 insertions, 0 deletions
diff --git a/src/main/bin/start.sh b/src/main/bin/start.sh
new file mode 100644
index 0000000..5ba69d7
--- /dev/null
+++ b/src/main/bin/start.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+# ============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=====================================================
+
+# APP_HOME is required for EELF logging.
+# This path is referenced in the file logback.xml.
+APP_HOME="${APP_HOME-/opt/app/validation-service}"
+
+JARFILE="$APP_HOME/validation-service.jar"
+LOGBACK_FILE=logback.xml
+
+# CONFIG_HOME is used as the base folder for relative paths, e.g. in the file aai-environment.properties
+if [ -z "$CONFIG_HOME" ]; then
+ echo "CONFIG_HOME must be set in order to start up the process"
+ echo "E.g. CONFIG_HOME=${APP_HOME}/config"
+ exit 1
+fi
+
+# Some properties are repeated here for debugging purposes.
+PROPS="-DAPP_HOME=$APP_HOME"
+PROPS="${PROPS} -DCONFIG_HOME=${CONFIG_HOME}"
+PROPS="${PROPS} -Dcom.att.eelf.logging.path=${APP_HOME}"
+PROPS="${PROPS} -Dcom.att.eelf.logging.file=${LOGBACK_FILE}"
+PROPS="${PROPS} -Dlogback.configurationFile=${APP_HOME}/${LOGBACK_FILE}"
+JVM_MAX_HEAP=${MAX_HEAP:-1024}
+
+if [ -z "${java_runtime_arguments}" ]; then
+ java_runtime_arguments="-Xms75m -Xmx${JVM_MAX_HEAP}m \
+ -Dcom.sun.management.jmxremote \
+ -Dcom.sun.management.jmxremote.authenticate=false \
+ -Dcom.sun.management.jmxremote.ssl=false \
+ -Dcom.sun.management.jmxremote.local.only=false \
+ -Dcom.sun.management.jmxremote.port=1099 \
+ -Dcom.sun.management.jmxremote.rmi.port=1099 \
+ -Djava.rmi.server.hostname=127.0.0.1"
+fi
+
+echo "java $java_runtime_arguments $PROPS -jar $JARFILE"
+java $java_runtime_arguments $PROPS -jar $JARFILE
+
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile
new file mode 100644
index 0000000..7f84abc
--- /dev/null
+++ b/src/main/docker/Dockerfile
@@ -0,0 +1,53 @@
+# ============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=====================================================
+FROM ubuntu:14.04
+
+ARG MICRO_HOME=/opt/app/validation-service
+ARG BIN_HOME=$MICRO_HOME/bin
+ARG LOG_HOME=$MICRO_HOME/logs/AAI-VS
+ARG JAR_FILE=validation-service.jar
+
+RUN apt-get update
+
+# Install and set up Java 8
+RUN apt-get update && apt-get install -y software-properties-common
+## sudo -E is required to preserve the environment. If you remove that line, it will most like freeze at this step
+RUN sudo -E add-apt-repository ppa:openjdk-r/ppa && apt-get update && apt-get install -y openjdk-8-jdk
+## Set up JAVA_HOME for docker command-line
+ENV JAVA_HOME usr/lib/jvm/java-8-openjdk-amd64
+RUN export JAVA_HOME
+
+# Build up the deployment folder structure
+RUN mkdir -p $MICRO_HOME
+COPY ${JAR_FILE} $MICRO_HOME/
+COPY classes/logback.xml $MICRO_HOME/
+COPY bundleconfig/ $MICRO_HOME/bundleconfig/
+RUN mkdir -p $BIN_HOME
+COPY *.sh $BIN_HOME
+RUN chmod 755 $BIN_HOME/*
+RUN mkdir -p $LOG_HOME
+RUN ln -s $MICRO_HOME/logs /logs
+
+# Create the aai user
+RUN mkdir /opt/aaihome && \
+ groupadd -g 492381 aaiadmin && \
+ useradd -r -u 341790 -g 492381 -ms /bin/bash -d /opt/aaihome/aaiadmin aaiadmin && \
+ chown -R aaiadmin:aaiadmin $MICRO_HOME
+USER aaiadmin
+
+EXPOSE 9501 9501
+
+CMD ["/opt/app/validation-service/bin/start.sh"]
diff --git a/src/main/docker/readme.txt b/src/main/docker/readme.txt
new file mode 100644
index 0000000..220a65b
--- /dev/null
+++ b/src/main/docker/readme.txt
@@ -0,0 +1,20 @@
+Brief steps on creating docker image manually.
+==============================================
+
+1. build validation-service using
+ mvn clean install [-DskipTests]
+
+2. Build Docker image
+ sudo docker build -t onap/validation-service target
+
+3. Run docker image
+ sudo docker run -it -p 9501:9501 -v <path to appconfig dir>:/opt/app/validation-service/appconfig -v /etc/hosts:/etc/hosts onap/validation-service
+ eg. sudo docker run -it -p 9501:9501 -v /home/AAI/docker/validation/appconfig-local:/opt/app/validation-service/appconfig -v /etc/hosts:/etc/hosts onap/validation-service
+
+Troubleshooting
+---------------
+
+To run the docker image as an interactive bash shell
+ sudo docker run -it -p 9501:9501 -v /home/AAI/docker/validation/appconfig-local:/opt/app/validation-service/appconfig -v /etc/hosts:/etc/hosts onap/validation-service bash -il
+
+ This will take you to a bash shell on the running docker container. cd to /opt/app/validation-service to check configurations or run it manually.
diff --git a/src/main/java/org/onap/aai/auth/AAIAuthException.java b/src/main/java/org/onap/aai/auth/AAIAuthException.java
new file mode 100644
index 0000000..5bbfc11
--- /dev/null
+++ b/src/main/java/org/onap/aai/auth/AAIAuthException.java
@@ -0,0 +1,34 @@
+/*
+ * ============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.auth;
+
+public class AAIAuthException extends Exception {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ public AAIAuthException(String string) {
+ super(string);
+ }
+
+ public AAIAuthException(String string, Exception e) {
+ super(string, e);
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/auth/AAIMicroServiceAuth.java b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuth.java
new file mode 100644
index 0000000..fc40e0b
--- /dev/null
+++ b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuth.java
@@ -0,0 +1,103 @@
+/*
+ * ============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.auth;
+
+import java.security.cert.X509Certificate;
+import javax.inject.Inject;
+import javax.security.auth.x500.X500Principal;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Cookie;
+import org.onap.aai.validation.config.ValidationServiceAuthConfig;
+import org.onap.aai.validation.logging.LogHelper;
+
+public class AAIMicroServiceAuth {
+
+ private static LogHelper applicationLogger = LogHelper.INSTANCE;
+
+ private ValidationServiceAuthConfig validationServiceAuthConfig;
+
+ @Inject
+ public AAIMicroServiceAuth(final ValidationServiceAuthConfig validationServiceAuthConfig) throws AAIAuthException {
+ this.validationServiceAuthConfig = validationServiceAuthConfig;
+ if (!validationServiceAuthConfig.isAuthenticationDisable()) {
+ AAIMicroServiceAuthCore.init(validationServiceAuthConfig.getAuthPolicyFile());
+ }
+ }
+
+ public boolean authBasic(String username, String authFunction) throws AAIAuthException {
+ return AAIMicroServiceAuthCore.authorize(username, authFunction);
+ }
+
+ public String authUser(String authUser, String authFunction) throws AAIAuthException {
+ StringBuilder username = new StringBuilder();
+
+ username.append(authUser);
+ if (!authBasic(username.toString(), authFunction)) {
+ return "AAI_9101";
+
+ }
+ return "OK";
+ }
+
+ public boolean authCookie(Cookie cookie, String authFunction, StringBuilder username) throws AAIAuthException {
+ if (cookie == null) {
+ return false;
+ }
+ applicationLogger.debug("Got one:" + cookie);
+
+ return AAIMicroServiceAuthCore.authorize(username.toString(), authFunction);
+ }
+
+ public boolean validateRequest(HttpServletRequest req, String action, String apiPath) throws AAIAuthException {
+
+ applicationLogger.debug("validateRequest: " + apiPath);
+ applicationLogger.debug("validationServiceConfig.isAuthenticationDisable(): "
+ + validationServiceAuthConfig.isAuthenticationDisable());
+
+ if (validationServiceAuthConfig.isAuthenticationDisable()) {
+ return true;
+ }
+ String[] ps = apiPath.split("/");
+ String authPolicyFunctionName = ps[0];
+ if (ps.length > 1) {
+ if (ps[0].matches("v\\d+")) {
+ authPolicyFunctionName = ps[1];
+ } else {
+ authPolicyFunctionName = ps[0];
+ }
+ }
+
+ String cipherSuite = (String) req.getAttribute("javax.servlet.request.cipher_suite");
+ String authUser = null;
+ if (cipherSuite != null) {
+ X509Certificate[] certChain = (X509Certificate[]) req.getAttribute("javax.servlet.request.X509Certificate");
+ if (certChain != null) {
+ X509Certificate clientCert = certChain[0];
+ X500Principal subjectDN = clientCert.getSubjectX500Principal();
+ authUser = subjectDN.toString();
+ }
+ }
+
+ if (authUser == null) {
+ return false;
+ }
+
+ String status = authUser(authUser.toLowerCase(), action + ":" + authPolicyFunctionName);
+ return "OK".equals(status);
+ }
+}
diff --git a/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java
new file mode 100644
index 0000000..25273fc
--- /dev/null
+++ b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java
@@ -0,0 +1,269 @@
+/*
+ * ============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.auth;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.TimeUnit;
+import org.onap.aai.validation.logging.ApplicationMsgs;
+import org.onap.aai.validation.logging.LogHelper;
+
+/**
+ * Authentication and authorization by user and role.
+ */
+public class AAIMicroServiceAuthCore {
+
+ private static LogHelper applicationLogger = LogHelper.INSTANCE;
+
+ public static final String APPCONFIG_DIR = (System.getProperty("CONFIG_HOME") == null)
+ ? Paths.get(System.getProperty("APP_HOME"), "appconfig").toString() : System.getProperty("CONFIG_HOME");
+
+ private static Path appConfigAuthDir = Paths.get(APPCONFIG_DIR, "auth");
+ private static Path defaultAuthFileName = appConfigAuthDir.resolve("auth_policy.json");
+
+ private static boolean usersInitialized = false;
+ private static HashMap<String, AAIAuthUser> users;
+ private static boolean timerSet = false;
+ private static String policyAuthFileName;
+
+ public enum HTTP_METHODS {
+ GET,
+ PUT,
+ DELETE,
+ HEAD,
+ POST
+ }
+
+ // Don't instantiate
+ private AAIMicroServiceAuthCore() {}
+
+ public static String getDefaultAuthFileName() {
+ return defaultAuthFileName.toString();
+ }
+
+ public static void setDefaultAuthFileName(String defaultAuthFileName) {
+ AAIMicroServiceAuthCore.defaultAuthFileName = Paths.get(defaultAuthFileName);
+ }
+
+ public static synchronized void init(String authPolicyFile) throws AAIAuthException {
+
+ try {
+ policyAuthFileName = AAIMicroServiceAuthCore.getConfigFile(authPolicyFile);
+ } catch (IOException e) {
+ applicationLogger.debug("Exception while retrieving policy file.");
+ applicationLogger.error(ApplicationMsgs.PROCESS_REQUEST_ERROR, e);
+ throw new AAIAuthException(e.getMessage());
+ }
+ if (policyAuthFileName == null) {
+ throw new AAIAuthException("Auth policy file could not be found");
+ }
+ AAIMicroServiceAuthCore.reloadUsers();
+
+ TimerTask task = new FileWatcher(new File(policyAuthFileName)) {
+ @Override
+ protected void onChange(File file) {
+ // here we implement the onChange
+ applicationLogger.debug("File " + file.getName() + " has been changed!");
+ try {
+ AAIMicroServiceAuthCore.reloadUsers();
+ } catch (AAIAuthException e) {
+ applicationLogger.error(ApplicationMsgs.PROCESS_REQUEST_ERROR, e);
+ }
+ applicationLogger.debug("File " + file.getName() + " has been reloaded!");
+ }
+ };
+
+ if (!timerSet) {
+ timerSet = true;
+ Timer timer = new Timer();
+ long period = TimeUnit.SECONDS.toMillis(1);
+ timer.schedule(task, new Date(), period);
+ applicationLogger.debug("Config Watcher Interval = " + period);
+ }
+ }
+
+ public static String getConfigFile(String authPolicyFile) throws IOException {
+ File authFile = new File(authPolicyFile);
+ if (authFile.exists()) {
+ return authFile.getCanonicalPath();
+ }
+ authFile = appConfigAuthDir.resolve(authPolicyFile).toFile();
+ if (authFile.exists()) {
+ return authFile.getCanonicalPath();
+ }
+ if (getDefaultAuthFileName() != null) {
+ authFile = new File(getDefaultAuthFileName());
+ if (authFile.exists()) {
+ return getDefaultAuthFileName();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @throws AAIAuthException
+ */
+ public static synchronized void reloadUsers() throws AAIAuthException {
+ users = new HashMap<>();
+ ObjectMapper mapper = new ObjectMapper();
+
+ try {
+ applicationLogger.debug("Reading from " + policyAuthFileName);
+ JsonNode rootNode = mapper.readTree(new File(policyAuthFileName));
+ JsonNode rolesNode = rootNode.path("roles");
+
+ for (JsonNode roleNode : rolesNode) {
+ String roleName = roleNode.path("name").asText();
+ AAIAuthRole r = new AAIAuthRole();
+ JsonNode usersNode = roleNode.path("users");
+ JsonNode functionsNode = roleNode.path("functions");
+ for (JsonNode functionNode : functionsNode) {
+ addFunctionToRole(r, roleName, functionNode);
+ }
+ for (JsonNode userNode : usersNode) {
+ String name = userNode.path("username").asText().toLowerCase();
+ AAIAuthUser user;
+ if (users.containsKey(name)) {
+ user = users.get(name);
+ } else {
+ user = new AAIAuthUser();
+ }
+
+ applicationLogger.debug("Assigning " + roleName + " to user " + name);
+ user.addRole(roleName, r);
+ users.put(name, user);
+ }
+ }
+ } catch (FileNotFoundException e) {
+ throw new AAIAuthException("Auth policy file could not be found", e);
+ } catch (JsonProcessingException e) {
+ throw new AAIAuthException("Error processing Auth policy file ", e);
+ } catch (IOException e) {
+ throw new AAIAuthException("Error reading Auth policy file", e);
+ }
+
+ usersInitialized = true;
+ }
+
+ /**
+ * @param role
+ * @param roleName
+ * @param functionNode
+ */
+ private static void addFunctionToRole(AAIAuthRole role, String roleName, JsonNode functionNode) {
+ String functionName = functionNode.path("name").asText();
+ JsonNode methodsNode = functionNode.path("methods");
+
+ if (methodsNode.size() == 0) {
+ for (HTTP_METHODS method : HTTP_METHODS.values()) {
+ String fullFunctionName = method.toString() + ":" + functionName;
+ applicationLogger.debug("Installing (all methods) " + fullFunctionName + " on role " + roleName);
+ role.addAllowedFunction(fullFunctionName);
+ }
+ } else {
+ for (JsonNode methodNode : methodsNode) {
+ String methodName = methodNode.path("name").asText();
+ String fullFunctionName = methodName + ":" + functionName;
+ applicationLogger.debug("Installing function " + fullFunctionName + " on role " + roleName);
+ role.addAllowedFunction(fullFunctionName);
+ }
+ }
+ }
+
+ public static class AAIAuthUser {
+ private HashMap<String, AAIAuthRole> roles;
+
+ public AAIAuthUser() {
+ this.roles = new HashMap<>();
+ }
+
+ public void addRole(String roleName, AAIAuthRole r) {
+ this.roles.put(roleName, r);
+ }
+
+ public boolean checkAllowed(String checkFunc) {
+ for (Entry<String, AAIAuthRole> role_entry : roles.entrySet()) {
+ AAIAuthRole role = role_entry.getValue();
+ if (role.hasAllowedFunction(checkFunc)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ }
+
+ public static class AAIAuthRole {
+ private List<String> allowedFunctions;
+
+ public AAIAuthRole() {
+ this.allowedFunctions = new ArrayList<>();
+ }
+
+ public void addAllowedFunction(String func) {
+ this.allowedFunctions.add(func);
+ }
+
+ public void delAllowedFunction(String delFunc) {
+ if (this.allowedFunctions.contains(delFunc)) {
+ this.allowedFunctions.remove(delFunc);
+ }
+ }
+
+ public boolean hasAllowedFunction(String functionName) {
+ return allowedFunctions.contains(functionName) ? true : false;
+ }
+ }
+
+ public static boolean authorize(String username, String authFunction) throws AAIAuthException {
+ if (!usersInitialized || users == null) {
+ throw new AAIAuthException("Auth module not initialized");
+ }
+
+ if (users.containsKey(username)) {
+ if (users.get(username).checkAllowed(authFunction)) {
+ logAuthenticationResult(username, authFunction, "AUTH ACCEPTED");
+ return true;
+ } else {
+ logAuthenticationResult(username, authFunction, "AUTH FAILED");
+ return false;
+ }
+ } else {
+ logAuthenticationResult(username, authFunction, "User not found");
+ return false;
+ }
+ }
+
+ private static void logAuthenticationResult(String username, String authFunction, String result) {
+ applicationLogger.debug(result + ": " + username + " on function " + authFunction);
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/auth/FileWatcher.java b/src/main/java/org/onap/aai/auth/FileWatcher.java
new file mode 100644
index 0000000..edc8bfe
--- /dev/null
+++ b/src/main/java/org/onap/aai/auth/FileWatcher.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.auth;
+
+import java.io.File;
+import java.util.TimerTask;
+
+public abstract class FileWatcher extends TimerTask {
+ private long timeStamp;
+ private File file;
+
+ /**
+ * Instantiates a new file watcher.
+ *
+ * @param file the file
+ */
+ public FileWatcher(File file) {
+ this.file = file;
+ this.timeStamp = file.lastModified();
+ }
+
+ /**
+ * runs a timer task
+ *
+ * @see java.util.TimerTask.run
+ */
+ @Override
+ public final void run() {
+ long newTimeStamp = file.lastModified();
+
+ if ((newTimeStamp - this.timeStamp) > 500) {
+ this.timeStamp = newTimeStamp;
+ onChange(file);
+ }
+ }
+
+ /**
+ * On change.
+ *
+ * @param file the file
+ */
+ protected abstract void onChange(File file);
+}
diff --git a/src/main/java/org/onap/aai/validation/ValidationServiceApplication.java b/src/main/java/org/onap/aai/validation/ValidationServiceApplication.java
new file mode 100644
index 0000000..8bf7a44
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ValidationServiceApplication.java
@@ -0,0 +1,57 @@
+/*
+ * ============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;
+
+import org.eclipse.jetty.util.security.Password;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.support.SpringBootServletInitializer;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ImportResource;
+
+import java.util.HashMap;
+
+
+/**
+ * Validation Service Spring Boot Application.
+ */
+
+@SpringBootApplication
+@ComponentScan(basePackages = "org.onap.aai.validation")
+@ImportResource("classpath:validation-service-beans.xml")
+public class ValidationServiceApplication extends SpringBootServletInitializer {
+
+ // public static void main(String[] args) {
+ // SpringApplication.run(ValidationServiceApplication.class, args);
+ // }
+
+
+ public static void main(String[] args) {
+ HashMap<String, Object> props = new HashMap<>();
+ String keyStorePassword = System.getProperty("KEY_STORE_PASSWORD");
+ if (keyStorePassword != null && !keyStorePassword.isEmpty()) {
+ props.put("server.ssl.key-store-password", Password.deobfuscate(keyStorePassword));
+ }
+ new ValidationServiceApplication()
+ .configure(new SpringApplicationBuilder(ValidationServiceApplication.class).properties(props))
+ .run(args);
+ }
+
+
+}
diff --git a/src/main/java/org/onap/aai/validation/Validator.java b/src/main/java/org/onap/aai/validation/Validator.java
new file mode 100644
index 0000000..c3ecc2a
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/Validator.java
@@ -0,0 +1,45 @@
+/*
+ * ============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;
+
+import java.util.List;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.result.ValidationResult;
+
+/**
+ * Validator (e.g. model-driven or rule-based)
+ *
+ */
+public interface Validator {
+
+ /**
+ * This method should be called (once) before validate() to ensure that all configuration is correctly loaded.
+ *
+ * @throws ValidationServiceException
+ */
+ public void initialise() throws ValidationServiceException;
+
+ /**
+ * Validate the entity or entities found in the event.
+ *
+ * @param event JSON containing the entity or entities to validate
+ * @return a list of validation results
+ * @throws ValidationServiceException
+ */
+ public List<ValidationResult> validate(String event) throws ValidationServiceException;
+}
diff --git a/src/main/java/org/onap/aai/validation/config/EventReaderConfig.java b/src/main/java/org/onap/aai/validation/config/EventReaderConfig.java
new file mode 100644
index 0000000..c819351
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/config/EventReaderConfig.java
@@ -0,0 +1,163 @@
+/*
+ * ============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 org.springframework.beans.factory.annotation.Value;
+
+/**
+ * Loaded via Spring from src/main/resources/event-reader.properties.
+ */
+public class EventReaderConfig extends PropertiesConfig {
+
+ @Value("${event.domain.path}")
+ private String eventDomainPath;
+
+ @Value("${event.action.path}")
+ private String eventActionPath;
+
+ @Value("${event.type.path}")
+ private String eventTypePath;
+
+ @Value("${event.entity.type.path}")
+ private String entityTypePath;
+
+ @Value("${event.entity.type.top.path}")
+ private String topEntityTypePath;
+
+ @Value("${event.entity.link.path}")
+ private String entityLinkPath;
+
+ @Value("${event.entity.link.delimiter}")
+ private String entityLinkDelimiter;
+
+ @Value("${event.entity.path}")
+ private String entityPath;
+
+ @Value("${event.entity.nested.path}")
+ private String nestedEntityPath;
+
+ /** Entity relative path. Use when the entity has been extracted from the event. */
+ @Value("${entity.id.path}")
+ private String entityIdPath;
+
+ /** Entity relative path. Use when the entity has been extracted from the event. */
+ @Value("${entity.resource.version.path}")
+ private String entityResourceVersionPath;
+
+ public String getEventDomainPath() {
+ return eventDomainPath;
+ }
+
+ public void setEventDomainPath(String eventDomainPath) {
+ this.eventDomainPath = eventDomainPath;
+ }
+
+ public String getEventActionPath() {
+ return eventActionPath;
+ }
+
+ public void setEventActionPath(String eventActionPath) {
+ this.eventActionPath = eventActionPath;
+ }
+
+ public String getEventTypePath() {
+ return eventTypePath;
+ }
+
+ public void setEventTypePath(String eventTypePath) {
+ this.eventTypePath = eventTypePath;
+ }
+
+ public String getTopEntityTypePath() {
+ return topEntityTypePath;
+ }
+
+ public void setTopEntityTypePath(String topEntityTypePath) {
+ this.topEntityTypePath = topEntityTypePath;
+ }
+
+ public String getEntityLinkPath() {
+ return entityLinkPath;
+ }
+
+ public void setEntityLinkPath(String entityLinkPath) {
+ this.entityLinkPath = entityLinkPath;
+ }
+
+ public String getEntityLinkDelimiter() {
+ return entityLinkDelimiter;
+ }
+
+ public void setEntityLinkDelimiter(String entityLinkDelimiter) {
+ this.entityLinkDelimiter = entityLinkDelimiter;
+ }
+
+ public String getEntityTypePath() {
+ return entityTypePath;
+ }
+
+ public void setEntityTypePath(String entityTypePath) {
+ this.entityTypePath = entityTypePath;
+ }
+
+ public String getEntityPath() {
+ return entityPath;
+ }
+
+ public void setEntityPath(String entityPath) {
+ this.entityPath = entityPath;
+ }
+
+ /**
+ * Formats the nested entity path using the entity type provided.
+ *
+ * @param entityType
+ * an entity type
+ * @return the formatted nested entity path
+ */
+ public String getNestedEntityPath(String entityType) {
+ return formatter(nestedEntityPath, entityType);
+ }
+
+ public void setNestedEntityPath(String nestedEntityPath) {
+ this.nestedEntityPath = nestedEntityPath;
+ }
+
+ /**
+ * Formats the entity ID path using the entity type provided.
+ *
+ * @param entityType
+ * an entity type
+ * @return the formatted entity ID path
+ */
+ public String getEntityIdPath(String entityType) {
+ return formatter(entityIdPath, entityType);
+ }
+
+ public void setEntityIdPath(String entityIdPath) {
+ this.entityIdPath = entityIdPath;
+ }
+
+ public String getEntityResourceVersionPath() {
+ return entityResourceVersionPath;
+ }
+
+ public void setEntityResourceVersionPath(String entityResourceVersionPath) {
+ this.entityResourceVersionPath = entityResourceVersionPath;
+ }
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/config/ModelConfig.java b/src/main/java/org/onap/aai/validation/config/ModelConfig.java
new file mode 100644
index 0000000..02e14bc
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/config/ModelConfig.java
@@ -0,0 +1,39 @@
+/*
+ * ============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 org.springframework.beans.factory.annotation.Value;
+
+/**
+ * Model Configuration Bean
+ *
+ */
+public class ModelConfig {
+
+ @Value("${model.cache.expirySeconds}")
+ private Long modelCacheExpirySeconds;
+
+ public Long getModelCacheExpirySeconds() {
+ return modelCacheExpirySeconds;
+ }
+
+ public void setModelCacheExpirySeconds(Long modelCacheExpirySeconds) {
+ this.modelCacheExpirySeconds = modelCacheExpirySeconds;
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/config/PropertiesConfig.java b/src/main/java/org/onap/aai/validation/config/PropertiesConfig.java
new file mode 100644
index 0000000..cf4bcb2
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/config/PropertiesConfig.java
@@ -0,0 +1,41 @@
+/*
+ * ============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 java.text.MessageFormat;
+
+/**
+ * Base properties configuration class.
+ */
+public class PropertiesConfig {
+
+ /**
+ * Replaces place-holders in property values.
+ *
+ * @param s
+ * a string with place-holders in the form {n}
+ * @param args
+ * values for place-holders
+ * @return a formated String with replaced place-holders.
+ */
+ public String formatter(String s, Object... args) {
+ MessageFormat formatter = new MessageFormat("");
+ formatter.applyPattern(s);
+ return formatter.format(args);
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/config/RestConfig.java b/src/main/java/org/onap/aai/validation/config/RestConfig.java
new file mode 100644
index 0000000..e99d6c2
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/config/RestConfig.java
@@ -0,0 +1,225 @@
+/*
+ * ============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 java.util.Objects;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.springframework.beans.factory.annotation.Value;
+
+/**
+ * Configuration required to establish REST client requests with an application.
+ */
+public class RestConfig {
+
+ @Value("${host}")
+ private String host;
+
+ @Value("${port}")
+ private Integer port;
+
+ @Value("${httpProtocol}")
+ private String protocol;
+
+ @Value("${baseModelURI}")
+ private String baseModelURI;
+
+ @Value("${trustStorePath}")
+ private String trustStorePath;
+
+ @Value("${trustStorePassword.x}")
+ private String trustStorePassword;
+
+ @Value("${keyStorePath}")
+ private String keyStorePath;
+
+ @Value("${keyStorePassword.x}")
+ private String keyStorePassword;
+
+ @Value("${keyManagerFactoryAlgorithm}")
+ private String keyManagerFactoryAlgorithm;
+
+ @Value("${keyStoreType}")
+ private String keyStoreType;
+
+ @Value("${securityProtocol}")
+ private String securityProtocol;
+
+ @Value("${connectionTimeout}")
+ private Integer connectionTimeout;
+
+ @Value("${readTimeout}")
+ private Integer readTimeout;
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public Integer getPort() {
+ return port;
+ }
+
+ public void setPort(Integer port) {
+ this.port = port;
+ }
+
+ public String getProtocol() {
+ return protocol;
+ }
+
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+
+ public String getBaseModelURI() {
+ return baseModelURI;
+ }
+
+ public void setBaseModelURI(String baseModelURI) {
+ this.baseModelURI = baseModelURI;
+ }
+
+ public String getTrustStorePath() {
+ return trustStorePath;
+ }
+
+ public void setTrustStorePath(String trustStorePath) {
+ this.trustStorePath = trustStorePath;
+ }
+
+ /**
+ * Assumes the password is encrypted.
+ *
+ * @return the decrypted password
+ */
+ public String getTrustStorePassword() {
+ return trustStorePassword;
+ }
+
+ public void setTrustStorePassword(String trustStorePassword) {
+ this.trustStorePassword = trustStorePassword;
+ }
+
+ public String getKeyStorePath() {
+ return keyStorePath;
+ }
+
+ public void setKeyStorePath(String keyStorePath) {
+ this.keyStorePath = keyStorePath;
+ }
+
+ /**
+ * Assumes the password is encrypted.
+ *
+ * @return the decrypted password
+ */
+ public String getKeyStorePassword() {
+ return keyStorePassword;
+ }
+
+ public void setKeyStorePassword(String keyStorePassword) {
+ this.keyStorePassword = keyStorePassword;
+ }
+
+ public String getKeyManagerFactoryAlgorithm() {
+ return keyManagerFactoryAlgorithm;
+ }
+
+ public void setKeyManagerFactoryAlgorithm(String keyManagerFactoryAlgorithm) {
+ this.keyManagerFactoryAlgorithm = keyManagerFactoryAlgorithm;
+ }
+
+ public String getKeyStoreType() {
+ return keyStoreType;
+ }
+
+ public void setKeyStoreType(String keyStoreType) {
+ this.keyStoreType = keyStoreType;
+ }
+
+ public String getSecurityProtocol() {
+ return securityProtocol;
+ }
+
+ public void setSecurityProtocol(String securityProtocol) {
+ this.securityProtocol = securityProtocol;
+ }
+
+ public Integer getConnectionTimeout() {
+ return connectionTimeout;
+ }
+
+ public void setConnectionTimeout(Integer connectionTimeout) {
+ this.connectionTimeout = connectionTimeout;
+ }
+
+ public Integer getReadTimeout() {
+ return readTimeout;
+ }
+
+ public void setReadTimeout(Integer readTimeout) {
+ this.readTimeout = readTimeout;
+ }
+
+ @Override
+ public String toString() {
+ return "RestConfig [host=" + host + ", port=" + port + ", protocol=" + protocol + ", baseModelURI="
+ + baseModelURI + ", trustStorePath=" + trustStorePath + ", trustStorePassword=" + trustStorePassword
+ + ", keyStorePath=" + keyStorePath + ", keyStorePassword=" + keyStorePassword
+ + ", keyManagerFactoryAlgorithm=" + keyManagerFactoryAlgorithm + ", keyStoreType=" + keyStoreType
+ + ", securityProtocol=" + securityProtocol + ", connectionTimeout=" + connectionTimeout
+ + ", readTimeout=" + readTimeout + "]";
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(this.baseModelURI, this.connectionTimeout, this.host, this.keyManagerFactoryAlgorithm,
+ this.keyStorePassword, this.keyStorePath, this.keyStoreType, this.port, this.protocol, this.readTimeout,
+ this.securityProtocol, this.trustStorePassword, this.trustStorePath);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof RestConfig)) {
+ return false;
+ } else if (obj == this) {
+ return true;
+ }
+ RestConfig rhs = (RestConfig) obj;
+ // @formatter:off
+ return new EqualsBuilder()
+ .append(baseModelURI, rhs.baseModelURI)
+ .append(connectionTimeout, rhs.connectionTimeout)
+ .append(host, rhs.host)
+ .append(keyManagerFactoryAlgorithm, rhs.keyManagerFactoryAlgorithm)
+ .append(keyStorePassword, rhs.keyStorePassword)
+ .append(keyStorePath, rhs.keyStorePath)
+ .append(keyStoreType, rhs.keyStoreType)
+ .append(port, rhs.port)
+ .append(protocol, rhs.protocol)
+ .append(readTimeout, rhs.readTimeout)
+ .append(securityProtocol, rhs.securityProtocol)
+ .append(trustStorePassword, rhs.trustStorePassword)
+ .append(trustStorePath, rhs.trustStorePath)
+ .isEquals();
+ // @formatter:on
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/config/RuleIndexingConfig.java b/src/main/java/org/onap/aai/validation/config/RuleIndexingConfig.java
new file mode 100644
index 0000000..1d27705
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/config/RuleIndexingConfig.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.config;
+
+import java.util.List;
+
+/**
+ * Loads the properties needed by the controller using spring.
+ */
+public class RuleIndexingConfig extends PropertiesConfig {
+
+ private List<String> indexedEvents;
+
+ private List<String> excludedOxmValidationEvents;
+
+ private List<String> indexAttributes;
+
+ private String defaultIndexKey;
+
+ public List<String> getIndexedEvents() {
+ return indexedEvents;
+ }
+
+ public void setIndexedEvents(List<String> indexedEvents) {
+ this.indexedEvents = indexedEvents;
+ }
+
+ public List<String> getExcludedOxmValidationEvents() {
+ return excludedOxmValidationEvents;
+ }
+
+ public void setExcludedOxmValidationEvents(List<String> excludedOxmValidationEvents) {
+ this.excludedOxmValidationEvents = excludedOxmValidationEvents;
+ }
+
+ public List<String> getIndexAttributes() {
+ return indexAttributes;
+ }
+
+ public void setIndexAttributes(List<String> indexAttributes) {
+ this.indexAttributes = indexAttributes;
+ }
+
+ public String getDefaultIndexKey() {
+ return defaultIndexKey;
+ }
+
+ public void setDefaultIndexKey(String defaultIndexKey) {
+ this.defaultIndexKey = defaultIndexKey;
+ }
+
+ public boolean skipOxmValidation(String event) {
+ if(excludedOxmValidationEvents == null) {
+ return false;
+ }
+ return excludedOxmValidationEvents.contains(event);
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/config/TopicAdminConfig.java b/src/main/java/org/onap/aai/validation/config/TopicAdminConfig.java
new file mode 100644
index 0000000..22fbe97
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/config/TopicAdminConfig.java
@@ -0,0 +1,103 @@
+/*
+ * ============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 java.util.Objects;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.springframework.beans.factory.annotation.Value;
+
+/**
+ * Configuration bean with topic administration properties that are loaded via Spring configuration.
+ */
+public class TopicAdminConfig {
+
+ @Value("${topic.publish.enable}")
+ private boolean publishEnable;
+
+ @Value("${topic.publish.retries}")
+ private Long publishRetries;
+
+ @Value("${topic.consume.enable}")
+ private boolean consumeEnable;
+
+ @Value("${topic.consume.polling.interval.seconds}")
+ private Long consumePollingIntervalSeconds;
+
+ public boolean isPublishEnable() {
+ return publishEnable;
+ }
+
+ public void setPublishEnable(boolean publishEnable) {
+ this.publishEnable = publishEnable;
+ }
+
+ public Long getPublishRetries() {
+ return publishRetries;
+ }
+
+ public void setPublishRetries(Long publishRetries) {
+ this.publishRetries = publishRetries;
+ }
+
+ public boolean isConsumeEnable() {
+ return consumeEnable;
+ }
+
+ public void setConsumeEnable(boolean consumeEnable) {
+ this.consumeEnable = consumeEnable;
+ }
+
+ public Long getConsumePollingIntervalSeconds() {
+ return consumePollingIntervalSeconds;
+ }
+
+ public void setConsumePollingIntervalSeconds(Long consumePollingIntervalSeconds) {
+ this.consumePollingIntervalSeconds = consumePollingIntervalSeconds;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(this.consumeEnable, this.consumePollingIntervalSeconds, this.publishEnable,
+ this.publishRetries);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof TopicAdminConfig)) {
+ return false;
+ } else if (obj == this) {
+ return true;
+ }
+ TopicAdminConfig rhs = (TopicAdminConfig) obj;
+ // @formatter:off
+ return new EqualsBuilder()
+ .append(consumeEnable, rhs.consumeEnable)
+ .append(consumePollingIntervalSeconds, rhs.consumePollingIntervalSeconds)
+ .append(publishEnable, rhs.publishEnable)
+ .append(publishRetries, rhs.publishRetries)
+ .isEquals();
+ // @formatter:on
+ }
+
+ @Override
+ public String toString() {
+ return "TopicAdminConfig [publishEnable=" + publishEnable + ", publishRetries=" + publishRetries
+ + ", consumeEnable=" + consumeEnable + ", consumePollingIntervalSeconds="
+ + consumePollingIntervalSeconds + "]";
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/config/TopicConfig.java b/src/main/java/org/onap/aai/validation/config/TopicConfig.java
new file mode 100644
index 0000000..99742ac
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/config/TopicConfig.java
@@ -0,0 +1,243 @@
+/*
+ * ============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 java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+import java.util.Properties;
+import javax.annotation.Resource;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+/**
+ * Gets the configuration of the topics. The topics are configured using Spring in topic-config-beans.xml.
+ */
+
+@Component("TopicConfig")
+public class TopicConfig {
+
+ private List<String> consumerTopicNames;
+
+ private List<String> publisherTopicNames;
+
+ @Resource(name = "topicProperties")
+ private Properties topicProperties;
+
+ List<Topic> consumerTopics = new ArrayList<>();
+ List<Topic> publisherTopics = new ArrayList<>();
+
+ @Autowired
+ public TopicConfig (@Value("${consumer.topic.names}") final String consumerNames, @Value("${publisher.topic.names}") final String publisherNames){
+
+ consumerTopicNames = Arrays.asList(consumerNames.split(","));;
+ publisherTopicNames = Arrays.asList(publisherNames.split(","));;
+
+
+ }
+ /**
+ * Gets the configuration of topics for consumption.
+ *
+ * @return a list of topic configurations.
+ */
+ public List<Topic> getConsumerTopics()
+ {
+ return populateTopics(consumerTopics, consumerTopicNames);
+ }
+
+
+ /**
+ * Gets the configuration of topics for publishing.
+ *
+ * @return a list of topic configurations.
+ */
+ public List<Topic> getPublisherTopics() {
+ return populateTopics(publisherTopics, publisherTopicNames);
+ }
+
+ /**
+ * Populates the topics list with topic objects created from each item in the topicNames list.
+ *
+ * @param topics
+ * The topic list to populate.
+ * @param topicNames
+ * The list of topic names to populate the topic list with.
+ * @return The populated topic list.
+ */
+ private List<Topic> populateTopics(List<Topic> topics, List<String> topicNames) {
+ if (topics.isEmpty()) {
+ for (String topicName : topicNames) {
+ Topic topicConfig = new Topic();
+ topicConfig.setName(getTopicProperties().getProperty(topicName + ".name"));
+ topicConfig.setHost(getTopicProperties().getProperty(topicName + ".host"));
+ topicConfig.setUsername(getTopicProperties().getProperty(topicName + ".username"));
+ topicConfig.setPassword(getTopicProperties().getProperty(topicName + ".password"));
+ topicConfig.setPartition(getTopicProperties().getProperty(topicName + ".publisher.partition"));
+ topicConfig.setConsumerGroup(getTopicProperties().getProperty(topicName + ".consumer.group"));
+ topicConfig.setConsumerId(getTopicProperties().getProperty(topicName + ".consumer.id"));
+ topicConfig.setTransportType(getTopicProperties().getProperty(topicName + ".transport.type"));
+ topics.add(topicConfig);
+ }
+ }
+ return topics;
+ }
+
+ public List<String> getConsumerTopicNames() {
+ return consumerTopicNames;
+ }
+
+ public void setConsumerTopicNames(List<String> consumerTopicNames) {
+ this.consumerTopicNames = consumerTopicNames;
+ }
+
+ public List<String> getPublisherTopicNames() {
+ return publisherTopicNames;
+ }
+
+ public void setPublisherTopicNames(List<String> publisherTopicNames) {
+ this.publisherTopicNames = publisherTopicNames;
+ }
+
+ public Properties getTopicProperties() {
+ return topicProperties;
+ }
+
+ public void setTopicProperties(Properties topicProperties) {
+ this.topicProperties = topicProperties;
+ }
+
+ /**
+ * Defines the properties of a single topic for consumption.
+ */
+ public class Topic {
+ private String name;
+ private String host;
+ private String username;
+ private String password;
+ private String partition;
+ private String consumerGroup;
+ private String consumerId;
+ private String transportType;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getPartition() {
+ return partition;
+ }
+
+ public void setPartition(String partition) {
+ this.partition = partition;
+ }
+
+ public String getConsumerGroup() {
+ return consumerGroup;
+ }
+
+ public void setConsumerGroup(String consumerGroup) {
+ this.consumerGroup = consumerGroup;
+ }
+
+ public String getConsumerId() {
+ return consumerId;
+ }
+
+ public void setConsumerId(String consumerId) {
+ this.consumerId = consumerId;
+ }
+
+ public List<String> getHosts() {
+ return Arrays.asList(host.split(","));
+ }
+
+ public String getTransportType() {
+ return transportType;
+ }
+
+ public void setTransportType(String transportType) {
+ this.transportType = transportType;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(this.consumerGroup, this.consumerId, this.host, this.username, this.name, this.partition,
+ this.password, this.transportType);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof Topic)) {
+ return false;
+ } else if (obj == this) {
+ return true;
+ }
+ Topic rhs = (Topic) obj;
+ // @formatter:off
+ return new EqualsBuilder()
+ .append(consumerGroup, rhs.consumerGroup)
+ .append(consumerId, rhs.consumerId)
+ .append(host, rhs.host)
+ .append(username, rhs.username)
+ .append(name, rhs.name)
+ .append(partition, rhs.partition)
+ .append(password, rhs.password)
+ .append(transportType, rhs.transportType)
+ .isEquals();
+ // @formatter:on
+ }
+
+ @Override
+ public String toString() {
+ return "Topic [name=" + name + ", host=" + host + ", username=" + username + ", password=" + password + ", partition="
+ + partition + ", consumerGroup=" + consumerGroup + ", consumerId=" + consumerId
+ + ", transportType =" + transportType + "]";
+ }
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/config/TopicPropertiesConfig.java b/src/main/java/org/onap/aai/validation/config/TopicPropertiesConfig.java
new file mode 100644
index 0000000..4742cef
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/config/TopicPropertiesConfig.java
@@ -0,0 +1,75 @@
+/*
+ * ============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 org.onap.aai.validation.logging.LogHelper;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.beans.factory.config.PropertiesFactoryBean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+@Configuration
+public class TopicPropertiesConfig {
+
+ private static LogHelper applicationLogger = LogHelper.INSTANCE;
+
+ @Value("${topics.properties.location}")
+ private String topicsPropertiesLocation;
+
+ private static final String[] TOPICS_PROPERTIES_LOCATION_TPL = { "file:./%s/*.properties", "classpath:/%s/*.properties" };
+
+ @Bean(name="topicProperties")
+ public Properties topicProperties() throws IOException {
+ PropertiesFactoryBean config = new PropertiesFactoryBean();
+ PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
+ List<Resource> resouceList = new ArrayList<Resource>();
+ try {
+ for (String p : bldrsPropLoc2Path(topicsPropertiesLocation)) {
+ Resource[] resources = resolver.getResources(p);
+ if (resources != null && resources.length > 0) {
+ for (Resource resource : resources) {
+ resouceList.add(resource);
+ }
+ break;
+ }
+ }
+ } catch (Exception e) {
+ applicationLogger.logAuditError(e);
+ }
+ config.setLocations(resouceList.toArray(new Resource[]{}));
+ config.afterPropertiesSet();
+ return config.getObject();
+ }
+
+ private static String[] bldrsPropLoc2Path(String topicsPropertiesLocation) {
+ String[] res = new String[TOPICS_PROPERTIES_LOCATION_TPL.length];
+ int indx = 0;
+ for (String tmpl : TOPICS_PROPERTIES_LOCATION_TPL) {
+ res[indx++] = String.format(tmpl, topicsPropertiesLocation).replace("//", "/");
+ }
+ return res;
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/config/ValidationControllerConfig.java b/src/main/java/org/onap/aai/validation/config/ValidationControllerConfig.java
new file mode 100644
index 0000000..4110175
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/config/ValidationControllerConfig.java
@@ -0,0 +1,82 @@
+/*
+ * ============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 java.util.List;
+import org.springframework.beans.factory.annotation.Value;
+
+/**
+ * Loads the properties needed by the controller using spring.
+ */
+public class ValidationControllerConfig extends PropertiesConfig {
+
+ @Value("${event.domain}")
+ private String eventDomain;
+
+ @Value("#{'${event.action.exclude}'.split(',')}")
+ private List<String> excludedEventActions;
+
+ @Value("#{'${event.type.rule}'.split(',')}")
+ private List<String> eventTypeRule;
+
+ @Value("#{'${event.type.model}'.split(',')}")
+ private List<String> eventTypeModel;
+
+ @Value("${event.type.end:END-EVENT}")
+ private String eventTypeEnd;
+
+ public String getEventDomain() {
+ return eventDomain;
+ }
+
+ public void setEventDomain(String eventDomain) {
+ this.eventDomain = eventDomain;
+ }
+
+ public List<String> getExcludedEventActions() {
+ return excludedEventActions;
+ }
+
+ public void setExcludedEventActions(List<String> excludedEventActions) {
+ this.excludedEventActions = excludedEventActions;
+ }
+
+ public List<String> getEventTypeRule() {
+ return eventTypeRule;
+ }
+
+ public void setEventTypeRule(List<String> eventTypeRule) {
+ this.eventTypeRule = eventTypeRule;
+ }
+
+ public List<String> getEventTypeModel() {
+ return eventTypeModel;
+ }
+
+ public void setEventTypeModel(List<String> eventTypeModel) {
+ this.eventTypeModel = eventTypeModel;
+ }
+
+ public String getEventTypeEnd() {
+ return eventTypeEnd;
+ }
+
+ public void setEventTypeEnd(String eventTypeEnd) {
+ this.eventTypeEnd = eventTypeEnd;
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/config/ValidationServiceAuthConfig.java b/src/main/java/org/onap/aai/validation/config/ValidationServiceAuthConfig.java
new file mode 100644
index 0000000..62280fa
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/config/ValidationServiceAuthConfig.java
@@ -0,0 +1,46 @@
+/*
+ * ============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 org.springframework.beans.factory.annotation.Value;
+
+public class ValidationServiceAuthConfig {
+
+ @Value("${auth.authentication.disable}")
+ private boolean authenticationDisable;
+
+ @Value("${auth.policy.file}")
+ private String authPolicyFile;
+
+ public boolean isAuthenticationDisable() {
+ return authenticationDisable;
+ }
+
+ public void setAuthenticationDisable(boolean authenticationDisable) {
+ this.authenticationDisable = authenticationDisable;
+ }
+
+ public String getAuthPolicyFile() {
+ return authPolicyFile;
+ }
+
+ public void setAuthPolicyFile(String authPolicyFile) {
+ this.authPolicyFile = authPolicyFile;
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/controller/ValidationController.java b/src/main/java/org/onap/aai/validation/controller/ValidationController.java
new file mode 100644
index 0000000..60d1c1c
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/controller/ValidationController.java
@@ -0,0 +1,380 @@
+/*
+ * ============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 java.io.PrintWriter;
+import java.io.StringWriter;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.Temporal;
+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 java.util.SortedMap;
+import java.util.TreeMap;
+import javax.inject.Inject;
+import org.onap.aai.validation.Validator;
+import org.onap.aai.validation.config.ValidationControllerConfig;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.logging.ApplicationMsgs;
+import org.onap.aai.validation.logging.LogHelper;
+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.result.ValidationResult;
+import org.onap.aai.validation.result.Violation;
+import org.onap.aai.validation.util.JsonUtil;
+
+/**
+ * Controls the execution (of validation of an event) for the various validation service components.
+ */
+public class ValidationController {
+
+ private static LogHelper applicationLogger = LogHelper.INSTANCE;
+
+ public static final String VALIDATION_ERROR_SEVERITY = "CRITICAL";
+
+ private static final String VALIDATION_ERROR_CATEGORY = "CANNOT_VALIDATE";
+ private static final String VALIDATION_ERROR_VIOLATIONTYPE = "NONE";
+
+ /**
+ * Result of the Controller executing validation of a single event. Either there is a set of ValidationResults or
+ * instead an exception was handled.
+ */
+ public class Result {
+ /**
+ * A successful validation will produce a set of results.
+ */
+ Optional<List<ValidationResult>> validationResults = Optional.empty();
+
+ /**
+ * For an unsuccessful validation, we will record the error details.
+ */
+ private String errorText;
+
+ /**
+ * @return whether or not we have a set of validation results
+ */
+ public boolean validationSuccessful() {
+ return validationResults.isPresent();
+ }
+
+ public List<ValidationResult> getValidationResults() {
+ return validationResults.orElse(Collections.emptyList());
+ }
+
+ /**
+ * @return a JSON string representing the first ValidationResult, or an empty string when there are no results
+ */
+ public String getValidationResultAsJson() {
+ List<ValidationResult> resultsList = getValidationResults();
+ if (resultsList.isEmpty()) {
+ return "";
+ } else {
+ // Only one Validation Result is returned (as only one is expected)
+ return JsonUtil.toJson(resultsList.get(0));
+ }
+ }
+
+ public Optional<String> getErrorText() {
+ return Optional.ofNullable(errorText);
+ }
+
+ private void handleException(String event, Exception rootException) {
+ try {
+ Entity entity = eventReader.getEntity(event);
+ if (!entity.getIds().isEmpty() && eventReader.getEntityType(event).isPresent()
+ && entity.getResourceVersion().isPresent()) {
+ ValidationResult validationResult = new ValidationResult(entity);
+ // @formatter:off
+ validationResult.addViolation(new Violation.Builder(entity)
+ .category(VALIDATION_ERROR_CATEGORY)
+ .severity(VALIDATION_ERROR_SEVERITY)
+ .violationType(VALIDATION_ERROR_VIOLATIONTYPE)
+ .errorMessage(rootException.getMessage())
+ .build());
+ // @formatter:on
+
+ validationResults = Optional.of(Collections.singletonList(validationResult));
+ publishValidationResults(validationResults);
+ }
+ } catch (Exception e) {
+ errorText = e.getMessage();
+ applicationLogger.error(ApplicationMsgs.CANNOT_VALIDATE_HANDLE_EXCEPTION_ERROR, e, event);
+ }
+ }
+ }
+
+ /**
+ * Status Report for the Controller
+ *
+ */
+ public class StatusReport {
+
+ private Temporal reportTime = LocalDateTime.now();
+ private long upTime = ChronoUnit.SECONDS.between(startTime, reportTime);
+ private long upTimeDays = ChronoUnit.DAYS.between(startTime, reportTime);
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("Started at ");
+ sb.append(startTime).append('\n').append("Up time ");
+ if (upTimeDays > 0) {
+ sb.append(upTimeDays).append(" days ");
+ }
+ sb.append(LocalTime.MIDNIGHT.plusSeconds(upTime).format(DateTimeFormatter.ofPattern("HH:mm:ss")));
+ sb.append('\n').append(formatStats(stats));
+ return sb.toString();
+ }
+
+ /**
+ * @return formatted statistics
+ */
+ private String formatStats(Statistics stats) {
+ StringBuilder sb = new StringBuilder();
+ formatStats(stats, "info", sb, "Info Service");
+ formatStats(stats, "http", sb, "Validation REST API");
+ formatStats(stats, "topic", sb, "Events Consumed");
+ if (stats.reportedThrowable != null) {
+ StringWriter sw = new StringWriter();
+ stats.reportedThrowable.printStackTrace(new PrintWriter(sw));
+ sb.append("Exception reported: ").append(sw.toString());
+ }
+ return sb.toString();
+ }
+
+ private void formatStats(Statistics stats, String eventSource, StringBuilder sb, String heading) {
+ sb.append("\n").append(heading).append("\n");
+ if (stats.keyValues(eventSource).isEmpty()) {
+ sb.append("total=0\n");
+ } else {
+ for (String key : stats.keyValues(eventSource)) {
+ sb.append(key).append("=").append(stats.messageCount(eventSource, key)).append("\n");
+ }
+ }
+ }
+ }
+
+ private ValidationControllerConfig validationControllerConfig;
+ private EventReader eventReader;
+ private Validator ruleDrivenValidator;
+ private Validator modelDrivenValidator;
+ private MessagePublisher messagePublisher;
+ private LocalDateTime startTime;
+ private Statistics stats;
+
+ /**
+ * Record of actions taken by the Controller
+ *
+ */
+ private class Statistics {
+
+ private Map<String, SortedMap<String, Integer>> sourceMap = new HashMap<>();
+ private Throwable reportedThrowable;
+
+ /**
+ * Increment the message count for the composite key <eventSource, key>
+ *
+ * @param eventSource the source of the event - used for statistics reporting purposes
+ * @param key the statistic to increment by one
+ */
+ private void incrementEventCount(String eventSource, String key) {
+ Map<String, Integer> messagesConsumed = getMessageCountsMap(eventSource);
+ int count = messagesConsumed.getOrDefault(key, 0);
+ messagesConsumed.put(key, count + 1);
+ }
+
+ private Map<String, Integer> getMessageCountsMap(String eventSource) {
+ return sourceMap.computeIfAbsent(eventSource, k -> new TreeMap<>());
+ }
+
+ /**
+ * @param eventSource the source of the event
+ * @return List<String> the keys for the specified eventSource
+ */
+ private List<String> keyValues(String eventSource) {
+ Map<String, Integer> messagesConsumed = getMessageCountsMap(eventSource);
+ return new ArrayList<>(messagesConsumed.keySet());
+ }
+
+ /*
+ * return the count for the supplied event source and statistic key
+ */
+ private int messageCount(String eventSource, String key) {
+ Map<String, Integer> messagesConsumed = getMessageCountsMap(eventSource);
+ return messagesConsumed.getOrDefault(key, 0);
+ }
+
+ }
+
+ /**
+ * Constructs a new validation controller with the injected parameters.
+ *
+ * @param validationControllerConfig the configuration parameters for validation controllers
+ * @param eventReader an object that can read events
+ * @param ruleDrivenValidator a validator for validating rules
+ * @param modelDrivenValidator a validator for validating model
+ * @param messagePublisher an instance of a publisher for messages
+ */
+ @Inject
+ public ValidationController(ValidationControllerConfig validationControllerConfig, EventReader eventReader,
+ Validator ruleDrivenValidator, Validator modelDrivenValidator, MessagePublisher messagePublisher) {
+ this.startTime = LocalDateTime.now();
+ this.validationControllerConfig = validationControllerConfig;
+ this.eventReader = eventReader;
+ this.ruleDrivenValidator = ruleDrivenValidator;
+ this.modelDrivenValidator = modelDrivenValidator;
+ this.messagePublisher = messagePublisher;
+ this.stats = new Statistics();
+ }
+
+ /**
+ * @throws ValidationServiceException if an error occurs initialising the controller
+ */
+ public void initialise() throws ValidationServiceException {
+ ruleDrivenValidator.initialise();
+ modelDrivenValidator.initialise();
+ }
+
+ /**
+ * Validates the event and publishes the results of the validation onto the topic configured in the message
+ * publisher.
+ *
+ * @param event the event to be validated
+ * @param eventSource the source of the event
+ * @return Result a result containing either the set of ValidationResults or an error message
+ */
+ public Result execute(String event, String eventSource) {
+ Result result = new Result();
+ try {
+ stats.incrementEventCount(eventSource, "total");
+ if (isEndEvent(event)) {
+ applicationLogger.debug("Event has not been processed. End event type was detected. Event :" + event);
+ stats.incrementEventCount(eventSource, "end");
+ } else if (isValidationCandidate(event)) {
+ result.validationResults = dispatchEvent(event, eventSource);
+ publishValidationResults(result.validationResults);
+ } else {
+ stats.incrementEventCount(eventSource, "filtered");
+ }
+ } catch (Exception e) {
+ applicationLogger.error(ApplicationMsgs.CANNOT_VALIDATE_ERROR, e, event);
+ stats.incrementEventCount(eventSource, "errored");
+ result.handleException(event, e);
+ }
+ return result;
+ }
+
+ private void publishValidationResults(Optional<List<ValidationResult>> validationResults) {
+ if (validationResults.isPresent()) {
+ for (ValidationResult validationResult : validationResults.get()) {
+ try {
+ messagePublisher.publishMessage(validationResult.toJson());
+ } catch (ValidationServiceException e) {
+ applicationLogger.error(ApplicationMsgs.MESSAGE_PUBLISH_ERROR, e, validationResult.toString());
+ }
+ }
+ }
+ }
+
+ private Optional<List<ValidationResult>> dispatchEvent(String event, String eventSource)
+ throws ValidationServiceException {
+ List<ValidationResult> validationResults = null;
+ Optional<String> eventType = eventReader.getEventType(event);
+
+ applicationLogger.debug("Event consumed: " + event);
+
+ if (eventType.isPresent()) {
+ if (isRuleDriven(eventType.get())) {
+ validationResults = ruleDrivenValidator.validate(event);
+ stats.incrementEventCount(eventSource, "rule");
+ } else if (isModelDriven(eventType.get())) {
+ validationResults = modelDrivenValidator.validate(event);
+ stats.incrementEventCount(eventSource, "model");
+ } else {
+ applicationLogger.debug("Event has not been validated. Invalid event type. Event :" + event);
+ stats.incrementEventCount(eventSource, "invalid");
+ }
+ } else {
+ stats.incrementEventCount(eventSource, "missing event type");
+ }
+
+ return Optional.ofNullable(validationResults);
+ }
+
+ private Boolean isRuleDriven(String eventType) {
+ return validationControllerConfig.getEventTypeRule().contains(eventType);
+ }
+
+ private Boolean isModelDriven(String eventType) {
+ return validationControllerConfig.getEventTypeModel().contains(eventType);
+ }
+
+ private boolean isEndEvent(String event) throws ValidationServiceException {
+ Optional<String> eventType = eventReader.getEventType(event);
+
+ return eventType.isPresent() && "END-EVENT".equalsIgnoreCase(eventType.get());
+ }
+
+ private Boolean isDomainValid(String event) throws ValidationServiceException {
+ Optional<String> eventDomain = eventReader.getEventDomain(event);
+
+ // Domain is optional in Event Header
+ return !eventDomain.isPresent()
+ || validationControllerConfig.getEventDomain().equalsIgnoreCase(eventDomain.get());
+ }
+
+ private Boolean isNotExcludedAction(String event) throws ValidationServiceException {
+ Optional<String> eventAction = eventReader.getEventAction(event);
+
+ // Action is optional in Event Header
+ return !eventAction.isPresent()
+ || !validationControllerConfig.getExcludedEventActions().contains(eventAction.get());
+ }
+
+
+ private Boolean isValidationCandidate(String event) throws ValidationServiceException {
+ return isDomainValid(event) && isNotExcludedAction(event);
+ }
+
+ /**
+ * @return a formatted string containing status information
+ */
+ public StatusReport statusReport() {
+ return new StatusReport();
+ }
+
+ /**
+ * Record a Throwable which will then be added to the status reporting text.
+ *
+ * @param t a Throwable to be reported (on demand)
+ */
+ public void recordThrowable(Throwable t) {
+ stats.reportedThrowable = t;
+ }
+
+ public void incrementInfoCount() {
+ stats.incrementEventCount("info", "total");
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/data/client/RestClient.java b/src/main/java/org/onap/aai/validation/data/client/RestClient.java
new file mode 100644
index 0000000..d2d1196
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/data/client/RestClient.java
@@ -0,0 +1,121 @@
+/*
+ * ============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 com.sun.jersey.core.util.MultivaluedMapImpl;
+import java.util.Arrays;
+import java.util.UUID;
+import javax.inject.Inject;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import org.onap.aai.restclient.client.OperationResult;
+import org.onap.aai.validation.config.RestConfig;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+
+/**
+ * REST client capable of establishing secured requests.
+ */
+public class RestClient {
+ private RestConfig restConfig;
+ private org.onap.aai.restclient.client.RestClient aaiRestClient;
+ private MultivaluedMap<String, String> headers;
+
+ private static final String ACCEPT = "application/json";
+ private static final String HEADER_X_FROM_APP_ID = "validation-service";
+ private static final String APP_CONFIG_HOME = System.getProperty("CONFIG_HOME");
+
+ /**
+ * Constructs a new rest client with the injected parameters.
+ *
+ * @param restConfig
+ */
+ @Inject
+ public RestClient(RestConfig restConfig) {
+ this.restConfig = restConfig;
+ initialiseRestClient();
+ }
+
+ /**
+ * Initialises the REST client
+ *
+ */
+ private void initialiseRestClient() {
+ // @formatter:off
+ aaiRestClient = new org.onap.aai.restclient.client.RestClient()
+ .validateServerHostname(false)
+ .validateServerCertChain(true)
+ .clientCertFile(APP_CONFIG_HOME + restConfig.getKeyStorePath())
+ .clientCertPassword(restConfig.getKeyStorePassword())
+ .trustStore(APP_CONFIG_HOME + restConfig.getTrustStorePath())
+ .connectTimeoutMs(restConfig.getConnectionTimeout())
+ .readTimeoutMs(restConfig.getReadTimeout());
+ // @formatter:on
+
+ headers = new MultivaluedMapImpl();
+ headers.put("Accept", Arrays.asList(ACCEPT));
+ headers.put("X-FromAppId", Arrays.asList(HEADER_X_FROM_APP_ID));
+ headers.put("X-TransactionId", Arrays.asList(UUID.randomUUID().toString()));
+ }
+
+ /**
+ * Invokes the REST URL and returns the payload string.
+ *
+ * @param uriPath
+ * @param mediaType
+ * @return The payload of the REST URL call as a string.
+ * @throws ValidationServiceException
+ */
+ public String get(String uriPath, String mediaType) throws ValidationServiceException {
+ // Construct URI
+ String uri = restConfig.getProtocol() + "://" + restConfig.getHost() + ":" + restConfig.getPort() + uriPath;
+
+ OperationResult result = aaiRestClient.get(uri, headers, MediaType.valueOf(mediaType));
+
+ if (result.getResultCode() == 200) {
+ return result.getResult();
+ } else if (result.getResultCode() == 404) {
+ throw new ValidationServiceException(ValidationServiceError.REST_CLIENT_RESPONSE_NOT_FOUND,
+ result.getResultCode(), result.getFailureCause());
+ } else {
+ throw new ValidationServiceException(ValidationServiceError.REST_CLIENT_RESPONSE_ERROR,
+ result.getResultCode(), result.getFailureCause());
+ }
+ }
+
+ /**
+ * POSTs a request.
+ *
+ * @param url
+ * @param payload
+ *
+ * @return The payload of the REST URL call as a string.
+ * @throws GapServiceException
+ */
+ public String post(String url, String payload) throws ValidationServiceException {
+ OperationResult result = aaiRestClient.post(url, payload, headers, MediaType.APPLICATION_JSON_TYPE,
+ MediaType.APPLICATION_JSON_TYPE);
+ if (result.getResultCode() == 200) {
+ return result.getResult();
+ } else {
+ throw new ValidationServiceException(ValidationServiceError.REST_CLIENT_RESPONSE_ERROR,
+ result.getResultCode(), result.getFailureCause());
+ }
+
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/exception/BaseValidationServiceException.java b/src/main/java/org/onap/aai/validation/exception/BaseValidationServiceException.java
new file mode 100644
index 0000000..59fdb72
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/exception/BaseValidationServiceException.java
@@ -0,0 +1,66 @@
+/*
+ * ============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.exception;
+
+import java.util.Locale;
+
+/**
+ * Validation service exception base class
+ *
+ */
+public class BaseValidationServiceException extends Exception {
+
+ private static final long serialVersionUID = -6663403070792969748L;
+
+ public static final Locale LOCALE = Locale.US;
+
+ private final String id;
+
+ /**
+ * Default constructor.
+ *
+ * @param id
+ */
+ public BaseValidationServiceException(String id) {
+ super();
+ this.id = id;
+ }
+
+ /**
+ * @param id
+ * @param message
+ */
+ public BaseValidationServiceException(String id, String message) {
+ super(message);
+ this.id = id;
+ }
+
+ /**
+ * @param id
+ * @param message
+ * @param cause
+ */
+ public BaseValidationServiceException(String id, String message, Throwable cause) {
+ super(message, cause);
+ this.id = id;
+ }
+
+ public String getId() {
+ return this.id;
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/exception/ValidationServiceError.java b/src/main/java/org/onap/aai/validation/exception/ValidationServiceError.java
new file mode 100644
index 0000000..45d79d4
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/exception/ValidationServiceError.java
@@ -0,0 +1,103 @@
+/*
+ * ============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.exception;
+
+import java.text.MessageFormat;
+
+/**
+ * Error text formatting
+ *
+ */
+public enum ValidationServiceError {
+
+ //@formatter:off
+
+ // Rule Configuration exceptions. Range 100..199
+ RULES_FILE_ERROR("VS-100", "Error reading rules configuration file(s) {0}"),
+ RULE_UNEXPECTED_TOKEN("VS-101", "Token {0} unexpected in rules configuration file."),
+ RULES_NOT_DEFINED("VS-102", "Event type {0} has no rule definitions."),
+
+ // Rule exceptions. Range 200..299
+ RULE_EXECUTION_ERROR("VS-201", "Error executing rule {0} with arguments {1}"),
+
+ // Validation service processing exceptions. Range 300..399
+ OMX_LOAD_ERROR("VS-300", "Validation service failed to load the OXM file."),
+ OXM_MISSING_KEY("VS-301", "Validation service failed to retrieve primary key for object of type {0}."),
+ MESSAGE_DIGEST_ERROR("VS-302", "Java platform security error. Failed to create Message Digest hashing object {0}."),
+ MODEL_RETRIEVAL_ERROR("VS-303", "Validator failed to get the model from external system."),
+ MODEL_CACHE_ERROR("VS-304", "Validator failed to retrieve the model from the cache. {0}"),
+ MODEL_NOT_FOUND("VS-305", "Model with UUID {0} not found."),
+
+ // Event publishing exceptions. Range 400..499
+ EVENT_CLIENT_PUBLISHER_INIT_ERROR("VS-400", "Error while initialising the Event Publisher Client."),
+ EVENT_CLIENT_SEND_ERROR("VS-401", "Error while sending a message to the event bus."),
+ EVENT_CLIENT_INCORRECT_NUMBER_OF_MESSAGES_SENT("VS-402", "Publisher client returned a result of {0} messages sent."),
+ EVENT_CLIENT_CLOSE_ERROR("VS-403", "Error while closing the Event Publisher Client."),
+ EVENT_CLIENT_CLOSE_UNSENT_MESSAGE("VS-404", "Failed to publish message. Error while closing the Event Publisher Client. " +
+ "The following message is unsent: {0}. Please check the logs for more information."),
+ EVENT_CLIENT_CONSUMER_INIT_ERROR("VS-405", "Error while initialising the Event Consumer Client."),
+
+ // Reader exceptions. Range 500..599
+ JSON_READER_PARSE_ERROR("VS-500", "JSON could not be parsed."),
+ EVENT_READER_MISSING_PROPERTY("VS-501", "Missing property: {0}"),
+ EVENT_READER_TOO_MANY_ENTITIES("VS-502", "Unexpected number or entities."),
+ INSTANCE_READER_NO_INSTANCE("VS-503", "Failed to extract instance under path: {0}. JSON payload: {1}"),
+ EVENT_READER_PROPERTY_READ_ERROR("VS-504", "Failed to read entity link property. Check event reader configuration properties."),
+
+ // Model-instance mapping exceptions. Range 600..649
+ MODEL_INSTANCE_MAPPING_RETRIEVAL_ERROR("VS-600", "Error retrieving model-instance mappings."),
+ MODEL_INSTANCE_MAPPING_FILE_IO_ERROR("VS-601", "IO error when reading from the model-instance mapping file {0}."),
+ MODEL_PARSE_ERROR("VS-602", "Validator failed to parse the model provided. Source:\n{0}"),
+ MODEL_VALUE_ERROR("VS-603", "Validator failed to access the model value {0} in {1}"),
+ INSTANCE_MAPPING_ROOT_ERROR("VS-604", "Missing 'root' property in instance mapping."),
+
+ // REST client exceptions. Range 650..699
+ REST_CLIENT_RESPONSE_ERROR("VS-650", "REST client response error: Response Code: {0}, Failure Cause: {1}."),
+ REST_CLIENT_RESPONSE_NOT_FOUND("VS-651", "REST client response error: Response Code: {0}, Failure Cause: {1}."),
+
+ // Validation Service configuration exceptions. Range 700..799
+ VS_PROPERTIES_LOAD_ERROR("VS-700", "Failed to read property {0} in the validation service properties file."),
+
+ // Miscellaneous exceptions. Range 800..849
+ STRING_UTILS_INVALID_REGEX("VS-800", "Invalid regular expression: {0}");
+
+ //@formatter:on
+
+ private String id;
+ private String message;
+
+ private ValidationServiceError(String id, String message) {
+ this.id = id;
+ this.message = message;
+ }
+
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * @param args
+ * to be formatted
+ * @return the formatted error message
+ */
+ public String getMessage(Object... args) {
+ MessageFormat formatter = new MessageFormat("");
+ formatter.applyPattern(this.message);
+ return formatter.format(args);
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/exception/ValidationServiceException.java b/src/main/java/org/onap/aai/validation/exception/ValidationServiceException.java
new file mode 100644
index 0000000..2606ce9
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/exception/ValidationServiceException.java
@@ -0,0 +1,78 @@
+/*
+ * ============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.exception;
+
+/**
+ * Validation service exception
+ *
+ */
+public class ValidationServiceException extends BaseValidationServiceException { // NOSONAR
+
+ private static final long serialVersionUID = 883498159309797607L;
+
+ /**
+ * Constructs an exception defined by the Error.
+ *
+ * @param error
+ * {@link ValidationServiceError} with the error id.
+ */
+ public ValidationServiceException(ValidationServiceError error) {
+ super(error.getId(), error.getId() + ", " + error.getMessage());
+ }
+
+ /**
+ * Constructs an exception defined by the Error. The message is parameterised with the arguments.
+ *
+ * @param error
+ * {@link ValidationServiceError} with the error id.
+ * @param args
+ * Arguments for the exception message.
+ */
+ public ValidationServiceException(ValidationServiceError error, Object... args) {
+ super(error.getId(), error.getId() + ", " + error.getMessage(args));
+ }
+
+ /**
+ * Constructs an exception defined by the Error and the underlying Exception. The message is parameterised with the
+ * arguments and enhanced with the underlying Exception message.
+ *
+ * @param error
+ * {@link ValidationServiceError} with the error id.
+ * @param exception
+ * Exception thrown by an underlying API.
+ * @param args
+ * Arguments for the exception message.
+ */
+ public ValidationServiceException(ValidationServiceError error, Exception exception, Object... args) {
+ super(error.getId(), error.getId() + ", " + error.getMessage(args) + "; Caused by: " + exception.getMessage(), exception);
+ }
+
+ /**
+ * Constructs an exception defined by the Error and the underlying Exception. The message is enhanced with the
+ * underlying Exception message.
+ *
+ * @param error
+ * {@link ValidationServiceError} with the error id.
+ * @param exception
+ * Exception thrown by an underlying API.
+ */
+ public ValidationServiceException(ValidationServiceError error, Exception exception) {
+ super(error.getId(), error.getId() + ", " + error.getMessage() + "; Caused by: " + exception.getMessage(), exception);
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/factory/DMaaPEventPublisherFactory.java b/src/main/java/org/onap/aai/validation/factory/DMaaPEventPublisherFactory.java
new file mode 100644
index 0000000..fa4af74
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/factory/DMaaPEventPublisherFactory.java
@@ -0,0 +1,34 @@
+/*
+ * ============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.factory;
+
+import org.onap.aai.event.client.DMaaPEventPublisher;
+
+public class DMaaPEventPublisherFactory {
+
+
+ public DMaaPEventPublisher createEventPublisher(String topicHost, String topicName, String topicUsername,
+ String topicPassword, String topicTransportType) {
+ int defaultBatchSize = DMaaPEventPublisher.DEFAULT_BATCH_SIZE;
+ long defaultBatchAge = DMaaPEventPublisher.DEFAULT_BATCH_AGE;
+ int defaultBatchDelay = DMaaPEventPublisher.DEFAULT_BATCH_DELAY;
+ return new DMaaPEventPublisher(topicHost, topicName, topicUsername, topicPassword, defaultBatchSize,
+ defaultBatchAge, defaultBatchDelay, topicTransportType);
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/logging/ApplicationMsgs.java b/src/main/java/org/onap/aai/validation/logging/ApplicationMsgs.java
new file mode 100644
index 0000000..6066a20
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/logging/ApplicationMsgs.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.logging;
+
+import com.att.eelf.i18n.EELFResourceManager;
+import org.onap.aai.cl.eelf.LogMessageEnum;
+
+/**
+ * Application messages
+ */
+public enum ApplicationMsgs implements LogMessageEnum {
+
+ /**
+ * Add message keys here.
+ */
+ // @formatter:off
+ MESSAGE_VALIDATION_REQUEST,
+ MESSAGE_AUDIT,
+ MESSAGE_METRIC,
+ MESSAGE_PUBLISH_ERROR,
+ OXM_LOAD_ERROR,
+ OXM_MISSING_KEY_ERROR,
+ MISSING_REQUEST_ID,
+ CANNOT_VALIDATE_ERROR,
+ CANNOT_VALIDATE_HANDLE_EXCEPTION_ERROR,
+ POLL_EVENTS,
+ NUMBER_OF_MESSAGES_CONSUMED,
+ INVOKE_EVENT_CONSUMER_ERROR,
+ READ_FILE_ERROR,
+ STARTUP_SERVLET_INIT,
+ POLLING_INTERVAL_CONFIG_NOT_PRESENT,
+ POLLING_FOR_EVENTS,
+ POLLING_DISABLED,
+ STARTUP_SERVLET_INIT_SUCCESS,
+ UNSENT_MESSAGE_WARN,
+ UNSENT_MESSAGE_ERROR,
+ EVENT_CLIENT_CLOSE_UNSENT_MESSAGE,
+ SEND_MESSAGE_ABORT_WARN,
+ SEND_MESSAGE_RETRY_WARN,
+ FILE_ARG_NULL_ERROR,
+ LOAD_PROPERTIES,
+ FILE_LOAD_INTO_MAP,
+ FILE_LOAD_INTO_MAP_ERROR,
+ CREATE_PROPERTY_MAP_ERROR,
+ FILE_MONITOR_BLOCK_ERROR,
+ READ_FILE_STREAM_ERROR,
+ STRING_UTILS_INVALID_REGEX,
+ MALFORMED_REQUEST_ERROR,
+ PROCESS_REQUEST_ERROR;
+ // @formatter:on
+
+ /**
+ * Static initializer to ensure the resource bundles for this class are loaded... Here this application loads
+ * messages from three bundles
+ */
+ static {
+ EELFResourceManager.loadMessageBundle("validation-service-logging-resources");
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/logging/LogHelper.java b/src/main/java/org/onap/aai/validation/logging/LogHelper.java
new file mode 100644
index 0000000..4abf5fd
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/logging/LogHelper.java
@@ -0,0 +1,548 @@
+/*
+ * ============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 com.att.eelf.configuration.Configuration.MDC_SERVICE_NAME;
+
+import ch.qos.logback.classic.AsyncAppender;
+import ch.qos.logback.core.FileAppender;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.att.eelf.i18n.EELFResolvableErrorEnum;
+import java.io.File;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.function.BiConsumer;
+import java.util.function.Consumer;
+import javax.servlet.ServletRequest;
+import javax.ws.rs.core.Response.Status;
+import org.apache.commons.lang.time.StopWatch;
+import org.onap.aai.cl.api.LogFields;
+import org.onap.aai.cl.api.Logger;
+import org.onap.aai.cl.mdc.MdcContext;
+import org.onap.aai.cl.mdc.MdcOverride;
+import org.onap.aai.restclient.client.Headers;
+import org.onap.aai.validation.services.RequestHeaders;
+import org.slf4j.MDC;
+import org.springframework.http.HttpHeaders;
+
+/*-
+ * This Log Helper mimics the interface of a Common Logging Logger
+ * but adds helper methods for audit and metrics logging requirements.
+ *
+ * Messages are logged to the appropriate EELF functional logger as described below.
+ *
+ * Error Log: INFO/WARN/ERROR/FATAL
+ * Debug Log: DEBUG/TRACE
+ * Audit Log: summary view of transaction processing
+ * Metrics Log: detailed timings of transaction processing interactions
+ *
+ * Audit and Metrics log messages record the following fields:
+ *
+ * RequestID - an RFC4122 UUID for the transaction request
+ * ServiceName - the API provided by this service
+ * PartnerName - invoker of the API
+ * ClassName - name of the class creating the log record
+ *
+ * The above list is not exhaustive.
+ */
+public enum LogHelper implements Logger {
+ INSTANCE; // Joshua Bloch's singleton pattern
+
+ @FunctionalInterface
+ public interface TriConsumer<T, U, V> {
+ public void accept(T t, U u, V v);
+ }
+
+ /**
+ * Audit log message status code values. See {@code MdcParameter.STATUS_CODE}
+ */
+ public enum StatusCode {
+ COMPLETE,
+ ERROR;
+ }
+
+ /**
+ * Mapped Diagnostic Context parameter names.
+ *
+ * Note that MdcContext.MDC_START_TIME is used for audit messages, and indicates the start of a transaction.
+ * Messages in the metrics log record sub-operations of a transaction and thus use different timestamps.
+ */
+ public enum MdcParameter {
+ REQUEST_ID(MdcContext.MDC_REQUEST_ID),
+ CLASS_NAME("ClassName"),
+ BEGIN_TIMESTAMP("BeginTimestamp"),
+ END_TIMESTAMP("EndTimestamp"),
+ ELAPSED_TIME("ElapsedTime"),
+ STATUS_CODE("StatusCode"),
+ RESPONSE_CODE("ResponseCode"),
+ RESPONSE_DESCRIPTION("ResponseDescription"),
+ TARGET_ENTITY("TargetEntity"),
+ TARGET_SERVICE_NAME("TargetServiceName"),
+ USER("User");
+
+ private final String parameterName;
+
+ MdcParameter(String parameterName) {
+ this.parameterName = parameterName;
+ }
+
+ /**
+ * Get the MDC logging context parameter name as referenced by the logback configuration
+ *
+ * @return the MDC parameter name
+ */
+ public String value() {
+ return parameterName;
+ }
+ }
+
+ /**
+ * Our externally advertised service API
+ */
+ private static final String SERVICE_NAME_VALUE = "AAI-VS";
+
+ private static final EELFLogger errorLogger = EELFManager.getInstance().getErrorLogger();
+ private static final EELFLogger debugLogger = EELFManager.getInstance().getDebugLogger();
+ private static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
+ private static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
+
+ /**
+ * Formatting for timestamps logged as Strings (from the MDC)
+ */
+ private DateFormat timestampFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
+
+ // Records the elapsed time (since the start of servicing a request) for audit logging
+ private StopWatch auditStopwatch;
+
+ /**
+ * Initialises the MDC (logging context) with default values, to support any logging of messages BEFORE the
+ * startAudit() method is invoked.
+ */
+ private LogHelper() {
+ setContextValue(MDC_SERVICE_NAME, SERVICE_NAME_VALUE);
+ // This value is not expected to be used in the default logging configuration
+ setContextValue(MdcContext.MDC_START_TIME, timestampFormat.format(new Date()));
+ }
+
+ /**
+ * Begin recording transaction information for a new request. This data is intended for logging purposes. This
+ * method does not actually write any messages to the log(s).
+ *
+ * Initialise the MDC logging context for auditing and metrics, using the HTTP request headers. This information
+ * includes: the correlation ID, local application service name/ID, calling host details and authentication data.
+ *
+ * The request object is used to find the client details (e.g. IP address)
+ *
+ * @param headers raw HTTP headers
+ * @param servletRequest the request
+ */
+ public void startAudit(final HttpHeaders headers, ServletRequest servletRequest) {
+ auditStopwatch = new StopWatch();
+ auditStopwatch.start();
+
+ String requestId = null;
+ String serviceInstanceId = null;
+ String partnerName = "<UNKNOWN_PARTNER>";
+
+ if (headers != null) {
+ requestId = setRequestId(headers);
+ serviceInstanceId = headers.getFirst(RequestHeaders.HEADER_SERVICE_INSTANCE_ID);
+ partnerName = headers.getFirst(Headers.FROM_APP_ID);
+ }
+
+ String clientHost = null;
+ String clientIPAddress = null;
+ String user = "<UNKNOWN_USER>";
+
+ if (servletRequest != null) {
+ clientHost = servletRequest.getRemoteHost();
+ clientIPAddress = servletRequest.getRemoteAddr();
+
+ if (partnerName == null) {
+ partnerName = clientHost;
+ }
+ }
+
+ // Populate standard MDC keys - note that the initialize method calls MDC.clear()
+ MdcContext.initialize(requestId, SERVICE_NAME_VALUE, serviceInstanceId, partnerName, clientIPAddress);
+
+ setContextValue(MdcParameter.USER, user);
+ setContextValue(MdcContext.MDC_REMOTE_HOST, clientHost);
+ }
+
+ /**
+ * Store a value in the current thread's logging context.
+ *
+ * @param key non-null parameter name
+ * @param value the value to store against the key
+ */
+ public void setContextValue(String key, String value) {
+ debug(key + "=" + value);
+ MDC.put(key, value);
+ }
+
+ /**
+ * Store a value in the current thread's logging context.
+ *
+ * @param param identifier of the context parameter
+ * @param value the value to store for this parameter
+ */
+ public void setContextValue(MdcParameter param, String value) {
+ setContextValue(param.value(), value);
+ }
+
+ /**
+ * Set a value in the current thread's logging context, only if this is not already set.
+ *
+ * @param key non-null parameter name
+ * @param value the value to store against the key (only if the current value is null)
+ */
+ public void setDefaultContextValue(String key, String value) {
+ if (MDC.get(key) == null) {
+ setContextValue(key, value);
+ }
+ }
+
+ /**
+ * Set a value in the current thread's logging context, only if this is not already set.
+ *
+ * @param param identifier of the context parameter
+ * @param value the value to store for this parameter (only if the current value is null)
+ */
+ public void setDefaultContextValue(MdcParameter param, String value) {
+ setContextValue(param.value(), value);
+ }
+
+ /**
+ * Clear all logging context values. This should be called at start-up only.
+ */
+ public void clearContext() {
+ debug("Clearing MDC context");
+ MDC.clear();
+ }
+
+ /**
+ * Clear the specified logging context value.
+ */
+ public void clearContextValue(MdcParameter param) {
+ MDC.remove(param.value());
+ }
+
+ /**
+ * Log an audit message to the audit logger. This method is expected to be called when a response is returned to the
+ * caller and/or when the processing of the request completes.
+ *
+ * @param status status of the service request: COMPLETE/ERROR
+ * @param responseCode optional application error code
+ * @param responseDescription human-readable description of the response code
+ * @param args the argument(s) required to populate the Audit Message log content
+ */
+ public void logAudit(StatusCode status, String responseCode, String responseDescription, final String... args) {
+ if (auditStopwatch == null) {
+ debug("Unexpected program state: audit stopwatch not started");
+ auditStopwatch = new StopWatch();
+ auditStopwatch.start();
+ }
+
+ if (auditLogger.isInfoEnabled()) {
+ setMdcElapsedTime(auditStopwatch);
+ setContextValue(MdcParameter.STATUS_CODE, status.toString());
+ setContextValue(MdcParameter.RESPONSE_CODE, responseCode);
+ setContextValue(MdcParameter.RESPONSE_DESCRIPTION, responseDescription);
+ invokeLogger(auditLogger::info, ApplicationMsgs.MESSAGE_AUDIT, args);
+ }
+ }
+
+ /**
+ * Log an audit message to the audit logger representing a non-specific processing success message.
+ *
+ * @param msg
+ */
+ public void logAuditSuccess(String msg) {
+ Status status = Status.OK;
+ logAudit(StatusCode.COMPLETE, Integer.toString(status.getStatusCode()), status.getReasonPhrase(), msg);
+ }
+
+ /**
+ * Log an audit message to the audit logger representing an internal error (e.g. for an exception thrown by the
+ * implementation). This method is expected to be called when a generic error response is returned to the caller to
+ * indicate a processing failure.
+ *
+ * @param e Exception
+ */
+ public void logAuditError(Exception e) {
+ Status status = Status.INTERNAL_SERVER_ERROR;
+ logAudit(StatusCode.ERROR, Integer.toString(status.getStatusCode()), status.getReasonPhrase(), e.getMessage());
+ }
+
+ /**
+ * Log a message to the metrics log.
+ *
+ * @param error the log code
+ * @param args the info messages
+ */
+ public void logMetrics(final String... args) {
+ if (metricsLogger.isInfoEnabled()) {
+ invokeLogger(metricsLogger::info, ApplicationMsgs.MESSAGE_METRIC, args);
+ }
+ }
+
+ /**
+ * @param stopwatch
+ * @param args
+ */
+ public void logMetrics(final StopWatch stopwatch, String... args) {
+ setMdcElapsedTime(stopwatch);
+ logMetrics(args);
+ }
+
+ @Override
+ public String formatMsg(@SuppressWarnings("rawtypes") Enum arg0, String... args) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean isDebugEnabled() {
+ return debugLogger != null && debugLogger.isDebugEnabled();
+ }
+
+ @Override
+ public boolean isErrorEnabled() {
+ return errorLogger.isErrorEnabled();
+ }
+
+ @Override
+ public boolean isInfoEnabled() {
+ return errorLogger.isInfoEnabled();
+ }
+
+ @Override
+ public boolean isTraceEnabled() {
+ return debugLogger.isTraceEnabled();
+ }
+
+ @Override
+ public boolean isWarnEnabled() {
+ return errorLogger.isWarnEnabled();
+ }
+
+ /**
+ * Log a DEBUG level message to the debug logger.
+ *
+ * @param message the debug message
+ */
+ @Override
+ public void debug(String message) {
+ if (isDebugEnabled()) {
+ invokeLogger(debugLogger::debug, message);
+ }
+ }
+
+ @Override
+ public void debug(@SuppressWarnings("rawtypes") Enum errorCode, String... args) {
+ if (isDebugEnabled()) {
+ invokeErrorCodeLogger(debugLogger::debug, (EELFResolvableErrorEnum) errorCode, args);
+ }
+ }
+
+ @Override
+ public void debug(@SuppressWarnings("rawtypes") Enum errorCode, LogFields arg1, String... args) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void error(@SuppressWarnings("rawtypes") Enum errorCode, String... args) {
+ if (isErrorEnabled()) {
+ invokeErrorCodeLogger(errorLogger::error, (EELFResolvableErrorEnum) errorCode, args);
+ }
+ }
+
+ @Override
+ public void error(@SuppressWarnings("rawtypes") Enum errorCode, Throwable t, String... args) {
+ if (isErrorEnabled()) {
+ invokeErrorCodeLogger(errorLogger::error, (EELFResolvableErrorEnum) errorCode, t, args);
+ }
+ }
+
+ @Override
+ public void error(@SuppressWarnings("rawtypes") Enum errorCode, LogFields arg1, String... args) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void error(@SuppressWarnings("rawtypes") Enum errorCode, LogFields arg1, Throwable arg2, String... args) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void info(@SuppressWarnings("rawtypes") Enum errorCode, String... args) {
+ if (isInfoEnabled()) {
+ invokeErrorCodeLogger(errorLogger::info, (EELFResolvableErrorEnum) errorCode, args);
+ }
+ }
+
+ @Override
+ public void info(@SuppressWarnings("rawtypes") Enum arg0, LogFields arg1, String... args) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void info(@SuppressWarnings("rawtypes") Enum arg0, LogFields arg1, MdcOverride arg2, String... args) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void trace(@SuppressWarnings("rawtypes") Enum errorCode, String... args) {
+ if (isTraceEnabled()) {
+ invokeErrorCodeLogger(debugLogger::trace, (EELFResolvableErrorEnum) errorCode, args);
+ }
+ }
+
+ @Override
+ public void trace(@SuppressWarnings("rawtypes") Enum arg0, LogFields arg1, String... args) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void warn(@SuppressWarnings("rawtypes") Enum errorCode, String... args) {
+ if (isWarnEnabled()) {
+ invokeErrorCodeLogger(errorLogger::warn, (EELFResolvableErrorEnum) errorCode, args);
+ }
+ }
+
+ @Override
+ public void warn(@SuppressWarnings("rawtypes") Enum arg0, LogFields arg1, String... args) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Get the method name for a calling method (from the current stack trace)
+ *
+ * @param level number of levels for the caller (not including this method)
+ * @return the class and name of the calling method in the form "class#method"
+ */
+ public static String getCallerMethodName(int level) {
+ StackTraceElement callingMethod = Thread.currentThread().getStackTrace()[level + 2];
+ return callingMethod.getClassName() + "#" + callingMethod.getMethodName();
+ }
+
+
+ /**
+ * Convenience method to be used only for testing purposes.
+ *
+ * @return the directory storing the log files
+ */
+ public static String getLogDirectory() {
+ ch.qos.logback.classic.Logger logger =
+ (ch.qos.logback.classic.Logger) org.slf4j.LoggerFactory.getLogger("com.att.eelf");
+ AsyncAppender appender = (AsyncAppender) logger.getAppender("asyncEELF");
+ FileAppender<?> fileAppender = (FileAppender<?>) appender.getAppender("EELF");
+ return new File(fileAppender.getFile()).getParent();
+ }
+
+ /**
+ * @param headers
+ * @return the request ID from the HTTP headers
+ */
+ private String setRequestId(final HttpHeaders headers) {
+ String requestId = headers.getFirst(RequestHeaders.HEADER_REQUEST_ID);
+
+ // If the request ID is missing, set it from the transaction ID
+ if (requestId == null) {
+ requestId = headers.getFirst(Headers.TRANSACTION_ID);
+ }
+
+ // Normalize the incoming ID by removing any suffix
+ if (requestId != null && requestId.contains(":")) {
+ requestId = requestId.split(":")[0];
+ }
+
+ return requestId == null ? "missing-request-id" : requestId;
+ }
+
+ private void setMdcClassName() {
+ MDC.put(MdcParameter.CLASS_NAME.value(), getCallerMethodName(3));
+ }
+
+ private void unsetMdcClassName() {
+ MDC.put(MdcParameter.CLASS_NAME.value(), null);
+ }
+
+ /**
+ * Set the Begin, End, and Elapsed time values in the MDC context.
+ *
+ * @param stopwatch
+ */
+ private void setMdcElapsedTime(final StopWatch stopwatch) {
+ long startTime = stopwatch.getStartTime();
+ long elapsedTime = stopwatch.getTime();
+
+ setContextValue(MdcParameter.BEGIN_TIMESTAMP, timestampFormat.format(startTime));
+ setContextValue(MdcParameter.END_TIMESTAMP, timestampFormat.format(startTime + elapsedTime));
+ setContextValue(MdcParameter.ELAPSED_TIME, Long.toString(elapsedTime)); // Milliseconds
+ }
+
+ /**
+ * @param logMethod the logger method to invoke
+ * @param message
+ */
+ private void invokeLogger(Consumer<String> logMethod, String message) {
+ setMdcClassName();
+ logMethod.accept(message);
+ unsetMdcClassName();
+ }
+
+ /**
+ * @param logMethod
+ * @param msg
+ * @param args
+ */
+ private void invokeLogger(BiConsumer<ApplicationMsgs, String[]> logMethod, ApplicationMsgs msg, String[] args) {
+ setMdcClassName();
+ logMethod.accept(msg, args);
+ unsetMdcClassName();
+ }
+
+ /**
+ * @param logMethod
+ * @param errorEnum
+ * @param args
+ */
+ private void invokeErrorCodeLogger(BiConsumer<EELFResolvableErrorEnum, String[]> logMethod,
+ EELFResolvableErrorEnum errorEnum, String[] args) {
+ setMdcClassName();
+ logMethod.accept(errorEnum, args);
+ unsetMdcClassName();
+ }
+
+ /**
+ * @param logMethod
+ * @param errorEnum
+ * @param t a Throwable
+ * @param args
+ */
+ private void invokeErrorCodeLogger(TriConsumer<EELFResolvableErrorEnum, Throwable, String[]> logMethod,
+ EELFResolvableErrorEnum errorEnum, Throwable t, String[] args) {
+ setMdcClassName();
+ logMethod.accept(errorEnum, t, args);
+ unsetMdcClassName();
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/modeldriven/ModelCacheManager.java b/src/main/java/org/onap/aai/validation/modeldriven/ModelCacheManager.java
new file mode 100644
index 0000000..5c741fb
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/modeldriven/ModelCacheManager.java
@@ -0,0 +1,182 @@
+/*
+ * ============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 com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import javax.inject.Inject;
+import javax.ws.rs.core.MediaType;
+import org.apache.http.client.utils.URIBuilder;
+import org.dom4j.Element;
+import org.onap.aai.validation.config.ModelConfig;
+import org.onap.aai.validation.config.RestConfig;
+import org.onap.aai.validation.data.client.RestClient;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.modeldriven.parser.XMLModelParser;
+
+/**
+ * A cache of model UUID against the parsed model Element, using Guava's CacheBuilder.
+ */
+public class ModelCacheManager {
+
+ public static final String FILE_MODEL_PROTOCOL = "file";
+
+ private LoadingCache<ModelId, Element> modelCache;
+ private RestConfig restConfig;
+
+ /**
+ * Initialises the instance by loading validator properties from config.
+ *
+ * @param modelConfig
+ * @param restConfig
+ * @throws ValidationServiceException
+ */
+ @Inject
+ public ModelCacheManager(ModelConfig modelConfig, RestConfig restConfig) {
+ this.restConfig = restConfig;
+
+ // Create an expiring cache with a load implementation which is executed when a key value is not cached.
+ modelCache = CacheBuilder.newBuilder().maximumSize(1000)
+ .expireAfterWrite(modelConfig.getModelCacheExpirySeconds(), TimeUnit.SECONDS)
+ .build(new CacheLoader<ModelId, Element>() {
+ @Override
+ public Element load(ModelId key) throws ValidationServiceException {
+ return retrieveModelElement(key);
+ }
+ });
+ }
+
+ /**
+ * Gets the model with specified uuid from the model cache. If model is not cached, retrieve the model from the
+ * external system.
+ *
+ * @param uuid
+ * The model UUID.
+ * @return The DOM Element representing the model's root element.
+ * @throws ValidationServiceException
+ */
+ public Element get(ModelId uuid) throws ValidationServiceException {
+ if (uuid == null || uuid.isEmpty()) {
+ return null;
+ }
+
+ return getCachedModel(uuid);
+ }
+
+ private Element getCachedModel(ModelId uuid) throws ValidationServiceException {
+ Element element = null;
+ try {
+ element = modelCache.get(uuid);
+ } catch (ExecutionException e) {
+ // If the wrapped exception is a model validation error, return null.
+ Throwable cause = e.getCause();
+ if (cause != null && cause.getClass().equals(ValidationServiceException.class)
+ && (((ValidationServiceException) cause).getId().equals(ValidationServiceError.MODEL_NOT_FOUND.getId())
+ || ((ValidationServiceException) cause).getId().equals(ValidationServiceError.REST_CLIENT_RESPONSE_NOT_FOUND.getId()))) {
+ return null;
+ }
+ throw new ValidationServiceException(ValidationServiceError.MODEL_CACHE_ERROR, e, "");
+ }
+ return element;
+ }
+
+ /**
+ * Puts an item into the model cache.
+ *
+ * @param uuid
+ * The key.
+ * @param modelElement
+ * The value.
+ */
+ public void put(ModelId uuid, Element modelElement) {
+ modelCache.put(uuid, modelElement);
+ }
+
+ /**
+ * Constructs and invokes the configured REST URL. The XML payload is then parsed into a model Element.
+ *
+ * @param uuid
+ * The model UUID to retrieve.
+ * @return The payload of the REST URL call as a model Element.
+ * @throws ValidationServiceException
+ * if the payload is null
+ */
+ private Element retrieveModelElement(ModelId uuid) throws ValidationServiceException {
+ String protocol = restConfig.getProtocol();
+ Element modelElement;
+ if (FILE_MODEL_PROTOCOL.equals(protocol)) {
+ File modelFile = new File(restConfig.getBaseModelURI());
+ modelElement = retrieveModelElementFromFile(modelFile, uuid);
+ } else {
+ modelElement = retrieveModelElementFromREST(restConfig, uuid);
+ }
+
+ // Do not store a null value in the CacheBuilder
+ if (modelElement != null) {
+ return modelElement;
+ } else {
+ throw new ValidationServiceException(ValidationServiceError.MODEL_NOT_FOUND, uuid);
+ }
+ }
+
+ /**
+ * Constructs and invokes the configured REST URL to retrieve the model for the supplied UUID. The XML payload is
+ * then parsed into a model Element.
+ *
+ * @param uuid
+ * The model UUID to retrieve.
+ * @return The payload of the REST URL call as a model Element, or null of no model could be found.
+ * @throws ValidationServiceException
+ */
+ private Element retrieveModelElementFromREST(RestConfig restConfig, ModelId uuid)
+ throws ValidationServiceException {
+ try {
+ URI restURI = new URIBuilder(restConfig.getBaseModelURI())
+ .addParameter(uuid.getModelIdAttribute(), uuid.getModelId()).build();
+ String restPayload = new RestClient(restConfig).get(restURI.toString(), MediaType.APPLICATION_XML);
+ return XMLModelParser.parse(restPayload, true);
+ } catch (URISyntaxException e) {
+ throw new ValidationServiceException(ValidationServiceError.MODEL_RETRIEVAL_ERROR, e);
+ }
+ }
+
+ /**
+ * Retrieves the model with supplied model UUID from the supplied model file. The XML payload is then parsed into a
+ * model Element.
+ *
+ * @param uuid
+ * The model UUID to retrieve.
+ * @return The model Element, or null if no model could be found.
+ * @throws ValidationServiceException
+ */
+ private Element retrieveModelElementFromFile(File modelFile, ModelId uuid) throws ValidationServiceException {
+ Element rootElement = XMLModelParser.parse(modelFile, false);
+ // Check that the root element of the model file is correct.
+ if (!XMLModelParser.MODELS_ROOT_ELEMENT.equals(rootElement.getName())) {
+ return null;
+ }
+ return XMLModelParser.getModelElementWithId(rootElement, uuid.getModelIdAttribute(), uuid.getModelId());
+ }
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/modeldriven/ModelId.java b/src/main/java/org/onap/aai/validation/modeldriven/ModelId.java
new file mode 100644
index 0000000..25fbc22
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/modeldriven/ModelId.java
@@ -0,0 +1,86 @@
+/*
+ * ============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 java.util.Objects;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+
+/**
+ * Bean representing a model ID.
+ *
+ * The modelIdAttribute field defines the attribute in the model that holds the modelId
+ */
+public class ModelId {
+
+ public static final String ATTR_MODEL_NAME_VERSION_ID = "model-name-version-id";
+ public static final String ATTR_MODEL_ID = "model-id";
+
+ private String modelIdAttribute;
+ private String id;
+
+ /**
+ * @param modelIdAttribute The name of the attribute that holds the model ID.
+ * @param modelId The model ID.
+ */
+ public ModelId(String modelIdAttribute, String modelId) {
+ super();
+ this.modelIdAttribute = modelIdAttribute;
+ this.id = modelId;
+ }
+
+ public String getModelIdAttribute() {
+ return modelIdAttribute;
+ }
+
+ public void setModelIdAttribute(String modelIdAttribute) {
+ this.modelIdAttribute = modelIdAttribute;
+ }
+
+ public String getModelId() {
+ return id;
+ }
+
+ public void setModelId(String modelId) {
+ this.id = modelId;
+ }
+
+ public boolean isEmpty() {
+ return modelIdAttribute == null || id == null || modelIdAttribute.isEmpty() || id.isEmpty();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(this.id, this.modelIdAttribute);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof ModelId)) {
+ return false;
+ } else if (obj == this) {
+ return true;
+ }
+ ModelId rhs = (ModelId) obj;
+ // @formatter:off
+ return new EqualsBuilder()
+ .append(id, rhs.id)
+ .append(modelIdAttribute, rhs.modelIdAttribute)
+ .isEquals();
+ // @formatter:on
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/Filter.java b/src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/Filter.java
new file mode 100644
index 0000000..a251d54
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/Filter.java
@@ -0,0 +1,75 @@
+/*
+ * ============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 java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+
+/**
+ * Defines a path and value that will be used to validate a particular model.
+ * @see ValueConfiguration and ModelInstanceMapper
+ */
+public class Filter {
+
+ private String path;
+ private List<String> valid = new ArrayList<>();
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public List<String> getValid() {
+ return valid;
+ }
+
+ public void setValid(List<String> valid) {
+ this.valid = valid;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(path, valid);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof Filter)) {
+ return false;
+ } else if (obj == this) {
+ return true;
+ }
+ Filter rhs = (Filter) obj;
+ // @formatter:off
+ return new EqualsBuilder()
+ .append(path, rhs.path)
+ .append(valid, rhs.valid)
+ .isEquals();
+ // @formatter:on
+ }
+
+ @Override
+ public String toString() {
+ return "Filter [path=" + path + ", valid=" + valid + "]";
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/ModelInstanceMapper.java b/src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/ModelInstanceMapper.java
new file mode 100644
index 0000000..9ebe03c
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/ModelInstanceMapper.java
@@ -0,0 +1,89 @@
+/*
+ * ============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 java.util.Objects;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+
+/**
+ * Maps the configuration of model and instance values to be compared.
+ */
+public class ModelInstanceMapper {
+
+ /**
+ * Types of mappings.
+ */
+ public enum MappingType {
+ RELATIONSHIP, ATTRIBUTE
+ }
+
+ private MappingType mappingType;
+ private ValueConfiguration model;
+ private ValueConfiguration instance;
+
+ public MappingType getMappingType() {
+ return mappingType;
+ }
+
+ public void setMappingType(String mappingType) {
+ this.mappingType = MappingType.valueOf(mappingType);
+ }
+
+ public ValueConfiguration getModel() {
+ return model;
+ }
+
+ public void setModel(ValueConfiguration model) {
+ this.model = model;
+ }
+
+ public ValueConfiguration getInstance() {
+ return instance;
+ }
+
+ public void setInstance(ValueConfiguration instance) {
+ this.instance = instance;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(instance, mappingType, model);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof ModelInstanceMapper)) {
+ return false;
+ } else if (obj == this) {
+ return true;
+ }
+ ModelInstanceMapper rhs = (ModelInstanceMapper) obj;
+ // @formatter:off
+ return new EqualsBuilder()
+ .append(instance, rhs.instance)
+ .append(mappingType, rhs.mappingType)
+ .append(model, rhs.model)
+ .isEquals();
+ // @formatter:on
+ }
+
+ @Override
+ public String toString() {
+ return "ModelInstanceMapper [mappingType=" + mappingType + ", model=" + model + ", instance=" + instance + "]";
+ }
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/ModelInstanceMappingReader.java b/src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/ModelInstanceMappingReader.java
new file mode 100644
index 0000000..7be2d76
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/ModelInstanceMappingReader.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.modeldriven.configuration.mapping;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.util.JsonUtil;
+
+/**
+ * Read mapping files
+ */
+public class ModelInstanceMappingReader {
+
+ private String mappingFile;
+
+ /**
+ * @param mappingFile
+ */
+ public ModelInstanceMappingReader(String mappingFile) {
+ this.mappingFile = mappingFile;
+ }
+
+ /**
+ * Returns a list of model and object instance paths that will be used for comparing the corresponding model and
+ * instance elements. The mappings are defined in the configuration file model-instance-mapping.json_conf and follows the
+ * JSON notation.
+ *
+ * @return a List of {@link ModelInstanceMapper} beans which represents all the mappings defined in the file
+ * model-instance-mapping.json_conf.
+ * @throws ValidationServiceException
+ */
+ public List<ModelInstanceMapper> getMappings() throws ValidationServiceException {
+ List<ModelInstanceMapper> mappings = new ArrayList<>();
+
+ try {
+ JSONArray mappingsArray = new JSONArray(mappingFile);
+
+ for (int i = 0; i < mappingsArray.length(); i++) {
+ JSONObject jsonObject = mappingsArray.getJSONObject(i);
+ ModelInstanceMapper mapping = JsonUtil.fromJson(jsonObject.toString(), ModelInstanceMapper.class);
+ mappings.add(mapping);
+ }
+ } catch (JSONException e) {
+ throw new ValidationServiceException(ValidationServiceError.MODEL_INSTANCE_MAPPING_RETRIEVAL_ERROR, e);
+ }
+
+ return mappings;
+ }
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/ValueConfiguration.java b/src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/ValueConfiguration.java
new file mode 100644
index 0000000..230bbd9
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/modeldriven/configuration/mapping/ValueConfiguration.java
@@ -0,0 +1,124 @@
+/*
+ * ============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 java.util.Objects;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+
+/**
+ * Describes a model or instance value that is used in model to instance comparison.
+ *
+ * @see ModelInstanceMapper
+ */
+public class ValueConfiguration {
+
+ /** Top level element. From which all navigation starts. */
+ private String origin;
+
+ /**
+ * Root element from which the value will be extracted. Can be used to recursively navigate the model/instance
+ * hierarchy.
+ */
+ private String root;
+
+ /**
+ * Provides validation on the model before the value is extracted. If the filter is not satisfied other root models
+ * will be searched.
+ */
+ private Filter filter;
+
+ /**
+ * Path to the model id
+ */
+ private String id;
+
+ /**
+ * Path to a model or instance value
+ */
+ private String value;
+
+ public String getOrigin() {
+ return origin;
+ }
+
+ public void setOrigin(String origin) {
+ this.origin = origin;
+ }
+
+ public String getRoot() {
+ return root;
+ }
+
+ public void setRoot(String root) {
+ this.root = root;
+ }
+
+ public Filter getFilter() {
+ return filter;
+ }
+
+ public void setFilter(Filter filter) {
+ this.filter = filter;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(this.filter, this.origin, this.root, this.value, this.id);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof ValueConfiguration)) {
+ return false;
+ } else if (obj == this) {
+ return true;
+ }
+ ValueConfiguration rhs = (ValueConfiguration) obj;
+ // @formatter:off
+ return new EqualsBuilder()
+ .append(filter, rhs.filter)
+ .append(origin, rhs.origin)
+ .append(root, rhs.root)
+ .append(value, rhs.value)
+ .append(id, rhs.id)
+ .isEquals();
+ // @formatter:on
+ }
+
+ @Override
+ public String toString() {
+ return "ValueConfiguration [origin=" + origin + ", root=" + root + ", id=" + id + ", filter=" + filter
+ + ", value=" + value + "]";
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/modeldriven/parser/XMLModelParser.java b/src/main/java/org/onap/aai/validation/modeldriven/parser/XMLModelParser.java
new file mode 100644
index 0000000..cf7aa38
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/modeldriven/parser/XMLModelParser.java
@@ -0,0 +1,152 @@
+/*
+ * ============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 java.io.File;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.util.List;
+import org.dom4j.DocumentException;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.Node;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+
+/**
+ * Read models from XML file
+ *
+ */
+public class XMLModelParser {
+
+ public static final String MODEL_ROOT_ELEMENT = "model";
+ public static final String MODELS_ROOT_ELEMENT = "models";
+
+ private XMLModelParser() {
+ // Do nothing
+ }
+
+ /**
+ * Parses an xml file and returns the root Element.
+ *
+ * @param modelFile
+ * The XML File.
+ * @param validateModel
+ * If true the model will be validated.
+ * @return The root Element of the document.
+ * @throws DocumentException
+ * @throws ValidationServiceException
+ */
+ public static Element parse(File modelFile, boolean validateModel) throws ValidationServiceException {
+ try {
+ byte[] encoded = Files.readAllBytes(modelFile.toPath());
+ String modelString = new String(encoded, Charset.defaultCharset());
+
+ return parse(modelString, validateModel);
+ } catch (IOException e) {
+ throw new ValidationServiceException(ValidationServiceError.MODEL_PARSE_ERROR, e, modelFile.toString());
+ }
+ }
+
+ /**
+ * Parses an xml String and returns the root Element.
+ *
+ * @param modelString
+ * The XML String.
+ * @param validateModel
+ * If true the model will be validated.
+ * @return The root Element of the document, or null if no valid model can be parsed.
+ * @throws DocumentException
+ */
+ public static Element parse(String modelString, boolean validateModel) throws ValidationServiceException {
+ // Strip namespace information first.
+ String model = removeXmlStringNamespaceAndPreamble(modelString);
+
+ try {
+ Element modelElement = DocumentHelper.parseText(model).getRootElement();
+ if (validateModel && (modelElement == null || !isValidModel(modelElement))) {
+ return null;
+ }
+ return modelElement;
+ } catch (DocumentException e) {
+ throw new ValidationServiceException(ValidationServiceError.MODEL_PARSE_ERROR, e, model);
+ }
+ }
+
+ /**
+ * Returns the result of running the XPath expression on the DOM Node.
+ *
+ * @param currentNode
+ * The current Node being processed.
+ * @param xPath
+ * The XPath expression to run on the Node.
+ * @return A List of Nodes representing the result of the XPath expression.
+ */
+ @SuppressWarnings("unchecked")
+ public static List<Node> getObjectsFromXPath(Node currentNode, String xPath) {
+ return currentNode.selectNodes(xPath);
+ }
+
+ /**
+ * Returns the child model Element that corresponds to the provided root Element and model ID.
+ *
+ * @param rootElement
+ * The root Element to search.
+ * @param attributeName
+ * The name of the attribute that holds the model ID.
+ * @param modelId
+ * The model ID to search for.
+ * @return The model Element that matches the model ID supplied.
+ */
+ public static Element getModelElementWithId(Element rootElement, String attributeName, String modelId) {
+ Element modelElement = null;
+ List<Node> modelsList = getObjectsFromXPath(rootElement, MODEL_ROOT_ELEMENT + "/" + attributeName);
+ for (Node model : modelsList) {
+ if (model.getText().equals(modelId)) {
+ modelElement = model.getParent();
+ }
+ }
+ return modelElement;
+ }
+
+ /**
+ * Determines the validity of the supplied model element by checking if the name of the root element is correct.
+ *
+ * @param modelElement
+ * The model element to check.
+ * @return True if the root element matches the expected name.
+ */
+ private static boolean isValidModel(Element modelElement) {
+ return MODEL_ROOT_ELEMENT.equals(modelElement.getName());
+ }
+
+ /**
+ * Strips all namespace information from the model XML.
+ *
+ * @param modelXML
+ * The model XML as a String.
+ * @return The model XML String minus the namespace information.
+ */
+ private static String removeXmlStringNamespaceAndPreamble(String xmlString) {
+ return xmlString.replaceAll("(<\\?[^<]*\\?>)?", "") /* remove preamble */
+ .replaceAll("xmlns.*?(\"|\').*?(\"|\')", "") /* remove xmlns declaration */
+ .replaceAll("(<)(\\w+:)(.*?>)", "$1$3") /* remove opening tag prefix */
+ .replaceAll("(</)(\\w+:)(.*?>)", "$1$3"); /* remove closing tags prefix */
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/modeldriven/validator/InstanceReader.java b/src/main/java/org/onap/aai/validation/modeldriven/validator/InstanceReader.java
new file mode 100644
index 0000000..7832e51
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/modeldriven/validator/InstanceReader.java
@@ -0,0 +1,316 @@
+/*
+ * ============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 com.google.common.collect.HashMultimap;
+import com.google.common.collect.Multimap;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import com.jayway.jsonpath.DocumentContext;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.Set;
+import javax.inject.Inject;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.modeldriven.configuration.mapping.ModelInstanceMapper;
+import org.onap.aai.validation.modeldriven.configuration.mapping.ModelInstanceMapper.MappingType;
+import org.onap.aai.validation.reader.JsonReader;
+import org.onap.aai.validation.reader.OxmReader;
+
+/**
+ * Reads values from an instance object.
+ */
+public class InstanceReader {
+
+ private static final String MODEL_NAME = "model-name";
+ private static final String[] INVALID_ENTRIES = { "inventory-response-items", "extra-properties", MODEL_NAME };
+ private static final String RESOURCE_VERSION = "resource-version";
+ private static final String JSON_PATH_MODEL_ID = "$.*.persona-model-id";
+
+ private JsonReader jsonReader;
+ private OxmReader oxmReader;
+ private JsonParser jsonParser = new JsonParser();
+
+ /**
+ * @param jsonReader
+ * @param oxmReader
+ */
+ @Inject
+ public InstanceReader(JsonReader jsonReader, OxmReader oxmReader) {
+ this.jsonReader = jsonReader;
+ this.oxmReader = oxmReader;
+ }
+
+ public OxmReader getOxmReader() {
+ return oxmReader;
+ }
+
+ /**
+ * Gets object instance values.
+ *
+ * @param json
+ * a Named Query JSON payload
+ * @param mapping
+ * defines the paths that allow the extraction of values from the object instance. This includes:
+ * <ul>
+ * <li>origin: path that serves as the starting point for the instance search</li>
+ * <li>root: path to underlying instance objects that can be examined by recursively calling the
+ * getValues method</li>
+ * </ul>
+ *
+ * @return a {@link Multimap} of instances keyed by their model id.
+ * @throws ValidationServiceException
+ */
+ public Multimap<String, String> getValues(String json, ModelInstanceMapper mapping) throws ValidationServiceException {
+ Multimap<String, String> values = HashMultimap.create();
+
+ DocumentContext document = jsonReader.parse(json);
+
+ if (MappingType.RELATIONSHIP.equals(mapping.getMappingType())) {
+ String rootPath = mapping.getInstance().getRoot();
+ if (rootPath == null || rootPath.isEmpty()) {
+ throw new ValidationServiceException(ValidationServiceError.INSTANCE_MAPPING_ROOT_ERROR);
+ }
+
+ JsonElement jsonElement = jsonReader.getJsonElement(document, rootPath);
+
+ if (jsonElement instanceof JsonArray) {
+ JsonArray jsonArray = jsonElement.getAsJsonArray();
+
+ processRelatedObjects(values, jsonArray);
+ }
+ } else {
+ // We are dealing with attributes.
+ String valuePath = mapping.getInstance().getValue();
+ if (valuePath != null && !valuePath.isEmpty()) {
+ List<String> attributes = jsonReader.get(json, valuePath);
+ for (String attribute : attributes) {
+ values.put(attribute, null);
+ }
+ }
+ }
+
+ return values;
+ }
+
+ /**
+ * Gets the instance type, e.g. connector, pserver, etc.
+ *
+ * @param json
+ * a Named Query JSON payload
+ * @return the type of the entity
+ */
+ public String getInstanceType(String json) {
+ return getNamedQueryEntity(json).getEntityType();
+ }
+
+ /**
+ * Gets the id of the instance. Uses the {@link OxmReader} to identify the property holding the primary key.<br>
+ *
+ * WARNING: Some types of object appear to have more than one primary key. This method uses the first primary key.
+ *
+ * @param json
+ * a Named Query JSON payload
+ * @return the identifier of the object instance
+ * @throws ValidationServiceException
+ */
+ public String getInstanceId(String json) throws ValidationServiceException {
+ String instanceId = null;
+
+ InstanceEntity entity = getNamedQueryEntity(json);
+
+ List<String> primaryKeys = oxmReader.getPrimaryKeys(entity.getEntityType());
+
+ if (primaryKeys != null && !primaryKeys.isEmpty()) {
+ JsonObject instance = entity.getObject().getAsJsonObject();
+ JsonElement primaryKey = instance.get(primaryKeys.get(0));
+ instanceId = primaryKey == null ? null : primaryKey.getAsString();
+ }
+
+ return instanceId;
+ }
+
+ /**
+ * Strips the instance out of its payload wrapping.
+ *
+ * @param json
+ * a Named Query JSON payload
+ * @param mappings
+ * the definition of the paths that allow the extraction of the instance from the JSON payload
+ * @return
+ * @throws ValidationServiceException
+ */
+ public String getInstance(String json, List<ModelInstanceMapper> mappings) throws ValidationServiceException {
+ String origin = mappings.iterator().next().getInstance().getOrigin();
+ List<String> jsonList = jsonReader.get(json, origin);
+
+ if (!jsonList.isEmpty()) {
+ return jsonList.get(0);
+ } else {
+ throw new ValidationServiceException(ValidationServiceError.INSTANCE_READER_NO_INSTANCE, origin, json);
+ }
+ }
+
+ /**
+ * Extracts the entity from a Named Query JSON payload.
+ *
+ * @param json
+ * a Named Query JSON payload
+ * @return an {@link InstanceEntity} object
+ */
+ public InstanceEntity getNamedQueryEntity(String json) {
+ return getNamedQueryEntity(jsonParser.parse(json).getAsJsonObject());
+ }
+
+ /**
+ * Gets the model identifier of a given entity.
+ *
+ * @param entity
+ * a JSON entity
+ * @return a model identifier attribute value if the attribute exists else a null is returned.
+ * @throws ValidationServiceException
+ */
+ public String getModelId(String entity) throws ValidationServiceException {
+ String modelId = null;
+ List<String> readResult = jsonReader.get(entity, JSON_PATH_MODEL_ID);
+ if (!readResult.isEmpty()) {
+ modelId = readResult.get(0);
+ }
+ return modelId;
+ }
+
+ /**
+ * Gets the resource version of the instance.
+ *
+ * @param json
+ * a Named Query JSON payload
+ * @return the resource version of the object instance
+ */
+ public String getResourceVersion(String json) {
+ String resourceVersion = null;
+
+ InstanceEntity entity = getNamedQueryEntity(json);
+
+ if (entity != null && entity.getObject() != null && entity.getObject().getAsJsonObject().has(RESOURCE_VERSION)) {
+ resourceVersion = entity.getObject().getAsJsonObject().get(RESOURCE_VERSION).getAsString();
+ }
+ return resourceVersion;
+ }
+
+ /**
+ * Gets the model name of the instance.
+ *
+ * @param jsonString
+ * a Named Query JSON payload
+ * @return the model name of the object instance
+ * @throws ValidationServiceException
+ */
+ public String getModelName(String jsonString) {
+ JsonObject jsonObject = jsonParser.parse(jsonString).getAsJsonObject();
+ return getModelName(jsonObject);
+ }
+
+ /**
+ * @param jsonObject
+ * @return
+ */
+ private String getModelName(JsonObject jsonObject) {
+ for (Entry<String, JsonElement> entry : jsonObject.entrySet()) {
+ if (MODEL_NAME.equals(entry.getKey())) {
+ return entry.getValue().getAsString();
+ }
+ }
+ return null;
+ }
+
+ private void processRelatedObjects(Multimap<String, String> values, JsonArray jsonArray) {
+ for (JsonElement relatedObject : jsonArray) {
+ JsonObject jsonObject = relatedObject.getAsJsonObject();
+
+ InstanceEntity entity = getNamedQueryEntity(jsonObject);
+ if (entity != null) {
+ values.put(entity.getModelName() == null ? entity.getEntityType() : entity.getModelName(), jsonObject.toString());
+ }
+ }
+ }
+
+ private InstanceEntity getNamedQueryEntity(JsonObject jsonObject) {
+ Set<Entry<String, JsonElement>> entrySet = jsonObject.entrySet();
+
+ String modelName = getModelName(jsonObject);
+
+ for (Entry<String, JsonElement> entry : entrySet) {
+ if (!Arrays.asList(INVALID_ENTRIES).contains(entry.getKey())) {
+ return new InstanceEntity(entry.getKey(), modelName, entry.getValue().getAsJsonObject(), jsonObject);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * An Entity bean for the InstanceReader
+ *
+ */
+ public class InstanceEntity {
+
+ private String entityType;
+ private String modelName;
+ private JsonObject object;
+ private JsonObject objectAndGraph;
+
+ /**
+ * @param entityType
+ * @param modelName
+ * @param object
+ * @param objectAndGraph
+ */
+ public InstanceEntity(String entityType, String modelName, JsonObject object, JsonObject objectAndGraph) {
+ this.entityType = entityType;
+ this.modelName = modelName;
+ this.object = object;
+ this.objectAndGraph = objectAndGraph;
+ }
+
+ public String getEntityType() {
+ return entityType;
+ }
+
+ public String getModelName() {
+ return modelName;
+ }
+
+ public JsonObject getObject() {
+ return object;
+ }
+
+ public JsonObject getObjectAndGraph() {
+ return objectAndGraph;
+ }
+
+ @Override
+ public String toString() {
+ return "Entity [entityType=" + entityType + ", modelName=" + modelName + ", object=" + object.toString() + ", fullObject="
+ + objectAndGraph.toString() + "]";
+ }
+ }
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/modeldriven/validator/ModelDrivenValidator.java b/src/main/java/org/onap/aai/validation/modeldriven/validator/ModelDrivenValidator.java
new file mode 100644
index 0000000..1b8ab00
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/modeldriven/validator/ModelDrivenValidator.java
@@ -0,0 +1,306 @@
+/*
+ * ============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 com.google.common.collect.HashMultimap;
+import com.google.common.collect.Multimap;
+import com.google.gson.JsonObject;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import javax.inject.Inject;
+import org.apache.commons.collections.CollectionUtils;
+import org.dom4j.Node;
+import org.onap.aai.validation.Validator;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.modeldriven.ModelCacheManager;
+import org.onap.aai.validation.modeldriven.ModelId;
+import org.onap.aai.validation.modeldriven.configuration.mapping.ModelInstanceMapper;
+import org.onap.aai.validation.modeldriven.configuration.mapping.ModelInstanceMappingReader;
+import org.onap.aai.validation.modeldriven.configuration.mapping.ModelInstanceMapper.MappingType;
+import org.onap.aai.validation.reader.EntityReader;
+import org.onap.aai.validation.reader.EventReader;
+import org.onap.aai.validation.reader.InstanceEntityReader;
+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.result.Violation.Builder;
+import org.onap.aai.validation.result.Violation.ViolationType;
+
+/**
+ * Validates object instances against the ONAP model.
+ *
+ */
+public class ModelDrivenValidator implements Validator {
+
+ /**
+ * Types of validation rules.
+ */
+ public enum RuleType {
+ REL, ATTR
+ }
+
+ /**
+ * Types of validation outcomes.
+ */
+ public enum ValidationOutcomeType {
+ NO_MODEL, MISSING, UNEXPECTED;
+ }
+
+ private ModelCacheManager modelCacheManager;
+ private List<ModelInstanceMapper> mappings;
+ private InstanceReader instanceReader;
+ private EventReader eventReader;
+
+ /**
+ * Constructor defining injected dependencies.
+ *
+ * @param modelCacheManager
+ * a cache manager for the models
+ * @param modelInstanceMappingReader
+ * a configuration reader to provide model and instance mapping
+ * @param instanceReader
+ * a reader of A&AI instances
+ * @param eventReader
+ * @throws ValidationServiceException
+ */
+ @Inject
+ public ModelDrivenValidator(ModelCacheManager modelCacheManager, ModelInstanceMappingReader modelInstanceMappingReader, InstanceReader instanceReader,
+ EventReader eventReader) throws ValidationServiceException {
+ this.modelCacheManager = modelCacheManager;
+ this.mappings = modelInstanceMappingReader.getMappings();
+ this.instanceReader = instanceReader;
+ this.eventReader = eventReader;
+ }
+
+ @Override
+ public void initialise() throws ValidationServiceException {
+ // Deliberately empty
+ }
+
+ /**
+ * Validates the given event instance against the ECOMP model.
+ *
+ * @param eventInstance
+ * the event instance to be validated
+ * @return {@link Violation} with the results of the object validation
+ * @throws ValidationServiceException
+ */
+ @Override
+ public List<ValidationResult> validate(String eventInstance) throws ValidationServiceException {
+ // Read event json into Entity bean
+ Entity eventEntity = eventReader.getEntity(eventInstance);
+
+ EntityReader reader = new InstanceEntityReader(instanceReader);
+ String entityJson = instanceReader.getInstance(eventEntity.getJson(), mappings);
+ Entity instanceEntity = new Entity(entityJson, instanceReader.getInstanceType(entityJson), eventEntity.getEntityLink(), reader);
+
+ // Get model ID from object instance and retrieve corresponding model.
+ ModelId modelId = new ModelId(ModelId.ATTR_MODEL_ID, instanceReader.getModelId(instanceEntity.getJson()));
+ Node modelElement = modelCacheManager.get(modelId);
+
+ List<Violation> violations = new ArrayList<>();
+
+ if (modelElement == null) {
+ ViolationInfo info = ViolationInfo.valueOf(ModelDrivenValidator.ValidationOutcomeType.NO_MODEL.toString());
+ Map<String, Object> details = new HashMap<>();
+ details.put("No model ID", modelId.getModelId());
+ Violation.Builder builder = new Violation.Builder(instanceEntity).violationType(ViolationType.MODEL);
+ builder.category(info.getCategory()).severity(info.getSeverity()).violationDetails(details)
+ .errorMessage(info.getErrorMessage(modelId.getModelId()));
+ violations.add(builder.build());
+ } else {
+ // Validate model with instance according to mappings.
+ for (ModelInstanceMapper mapping : mappings) {
+ List<Violation> currentViolations = new ArrayList<>();
+
+ // If we are validating related objects, find the first valid child object to begin validating from.
+ Node validModelElement = modelElement;
+ if (MappingType.RELATIONSHIP.equals(mapping.getMappingType()) && !ModelReader.isValidModelType(modelElement, mapping)) {
+ Multimap<String, Node> models = HashMultimap.create();
+ ModelReader.getValuesAndModels(modelElement, mapping, modelCacheManager, models);
+ validModelElement = models.isEmpty() ? modelElement : models.values().iterator().next();
+ }
+
+ validateAllRecursive(validModelElement, instanceEntity, mapping, currentViolations, reader);
+ violations.addAll(currentViolations);
+ }
+ }
+
+ ValidationResult validationResult = new ValidationResult(instanceEntity);
+
+ // This is a shortcut to passing the parent model name all the way down.
+ populateViolationModelNames(violations, instanceEntity);
+
+ validationResult.addViolations(violations);
+
+ return Arrays.asList(validationResult);
+ }
+
+ /*
+ * Recursively validates all child entities starting with the crown widget.
+ */
+ private void validateAllRecursive(Node currentModelNode, Entity entity, ModelInstanceMapper mapping, List<Violation> validations, EntityReader reader)
+ throws ValidationServiceException {
+ String entityLink = null;
+ Multimap<String, Node> modelMap = ModelReader.getValues(currentModelNode, mapping, modelCacheManager);
+ Multimap<String, String> instanceMap = instanceReader.getValues(entity.getJson(), mapping);
+
+ // Validate model with instance according to mappings.
+ // Note: Currently the cardinality of instances are not validated.
+ List<Violation> currentViolations = validateModelInstanceValues(modelMap.keySet(), instanceMap.keySet(), entity, mapping);
+ validations.addAll(currentViolations);
+
+ // Remove erroring objects from the maps so that we don't validate their children.
+ for (Violation currentViolation : currentViolations) {
+ String entityType = (String) currentViolation.getViolationDetails().get(Violation.ENTITY_TYPE_PROPERTY);
+ if (entityType != null) {
+ modelMap.removeAll(entityType);
+ instanceMap.removeAll(entityType);
+ }
+ }
+
+ // Continue down the model hierarchy for objects that did not error in the current layer.
+ for (Entry<String, Node> modelEntry : modelMap.entries()) {
+ // Get the child model.
+ Node childModelNode = modelEntry.getValue();
+ if (childModelNode != null) {
+ // Validate all child instance objects with current child model.
+ Collection<String> childInstanceObjects = instanceMap.get(modelEntry.getKey());
+ for (String childInstanceObject : childInstanceObjects) {
+ Entity childEntity = new Entity(childInstanceObject, instanceReader.getInstanceType(childInstanceObject), entityLink, reader);
+ validateAllRecursive(childModelNode, childEntity, mapping, validations, reader);
+ }
+ }
+ }
+ }
+
+ /**
+ * Compares the List of values found in the model with the values found in the Json and generates validation errors
+ * based on the differences.
+ *
+ * @param modelValues
+ * the values found in the model
+ * @param instanceValues
+ * the values found in the Json.
+ * @param entity
+ * @param modelInstanceMapper
+ * the mappings used to to find the model and instance values
+ * @return List of Validation objects representing the errors found during validation.
+ * @throws ValidationServiceException
+ */
+ private List<Violation> validateModelInstanceValues(Set<String> modelValues, Set<String> instanceValues, Entity entity,
+ ModelInstanceMapper modelInstanceMapper) throws ValidationServiceException {
+ List<Violation> violations = new ArrayList<>();
+
+ Collection<?> missingValues = CollectionUtils.subtract(modelValues, instanceValues);
+ violations.addAll(setViolationDetails(ValidationOutcomeType.MISSING, missingValues, entity, modelInstanceMapper));
+
+ Collection<?> unexpectedValues = CollectionUtils.subtract(instanceValues, modelValues);
+ violations.addAll(setViolationDetails(ValidationOutcomeType.UNEXPECTED, unexpectedValues, entity, modelInstanceMapper));
+
+ return violations;
+ }
+
+ /*
+ * Sets the list of {@link Violation} objects with all the violation details.
+ *
+ * @param outcome
+ *
+ * @param values the values that are causing the violation
+ *
+ * @param entity the entity being validated
+ *
+ * @param modelInstanceMapper the mappings used to to find the model and instance values
+ *
+ * @return list of {@link Violation} objects set by this method
+ *
+ * @throws ValidationServiceException
+ */
+ private List<Violation> setViolationDetails(ValidationOutcomeType outcome, Collection<?> values, Entity entity, ModelInstanceMapper modelInstanceMapper)
+ throws ValidationServiceException {
+
+ List<Violation> violations = new ArrayList<>();
+ Builder builder = new Builder(entity).violationType("Model");
+
+ for (Object value : values) {
+ RuleType ruleType = modelInstanceMapper.getMappingType().equals(MappingType.RELATIONSHIP) ? RuleType.REL : RuleType.ATTR;
+ String category = outcome.toString() + "_" + ruleType;
+
+ ViolationInfo info = ViolationInfo.valueOf(category);
+ builder.category(info.getCategory());
+ builder.severity(info.getSeverity());
+
+ Map<String, Object> details = new HashMap<>();
+ details.put(outcome.toString() + " " + ruleType.toString(), value);
+
+ switch (ruleType) {
+ case ATTR:
+ builder.errorMessage(info.getErrorMessage(value));
+ break;
+ case REL:
+ buildEntityIdDetails(details, entity);
+ builder.errorMessage(info.getErrorMessage(entity.getIds().toString(), entity.getType(), value));
+ break;
+ default:
+ // Do nothing
+ break;
+ }
+ builder.violationDetails(details);
+ violations.add(builder.build());
+ }
+
+ return violations;
+ }
+
+ /*
+ * Add entity IDs to the violation details
+ *
+ * @param details the violation details to populate
+ *
+ * @param entity
+ *
+ * @throws ValidationServiceException
+ */
+ private void buildEntityIdDetails(Map<String, Object> details, Entity entity) throws ValidationServiceException {
+ JsonObject entityIdsObject = new JsonObject();
+ for (EntityId entityId : entity.getIds()) {
+ entityIdsObject.addProperty(entityId.getPrimaryKey(), entityId.getValue());
+ }
+ details.put(Violation.ENTITY_ID_PROPERTY, entityIdsObject);
+ details.put(Violation.ENTITY_TYPE_PROPERTY, entity.getType());
+ details.put(Violation.ENTITY_MODELNAME_PROPERTY, instanceReader.getModelName(entity.getJson()));
+ }
+
+ /*
+ * Sets the model name attribute on all violations in the list. The model name is retrieved from the entity
+ * provided.
+ */
+ private void populateViolationModelNames(List<Violation> violations, Entity entity) {
+ String modelName = instanceReader.getModelName(entity.getJson());
+ for (Violation violation : violations) {
+ violation.setModelName(modelName);
+ }
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/modeldriven/validator/ModelReader.java b/src/main/java/org/onap/aai/validation/modeldriven/validator/ModelReader.java
new file mode 100644
index 0000000..04728a3
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/modeldriven/validator/ModelReader.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 com.google.common.collect.HashMultimap;
+import com.google.common.collect.Multimap;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import org.dom4j.Node;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.modeldriven.ModelCacheManager;
+import org.onap.aai.validation.modeldriven.ModelId;
+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.ModelInstanceMapper.MappingType;
+import org.onap.aai.validation.modeldriven.parser.XMLModelParser;
+
+/**
+ * Reads values from the model.
+ */
+public class ModelReader {
+
+ private static final String ATTRIBUTE_MODELTYPE = "model-type";
+
+ /**
+ * Do not instantiate an object of this class
+ */
+ private ModelReader() {
+ // Deliberately empty
+ }
+
+ /**
+ * Gets the values of a model element as defined by the model-instance mapping configuration. When the mapping
+ * type is "attribute", the multimap will be returned with a null value.
+ *
+ * @param modelElement
+ * the model element from which the values will be extracted
+ * @param mapping
+ * the model-instance mapping object defining the path to the model values
+ * @param modelCacheManager
+ * the model cache manager used to retrieve further models
+ * @return a {@link Multimap} of model values.
+ * @throws ValidationServiceException
+ */
+ public static Multimap<String, Node> getValues(Node modelElement, ModelInstanceMapper mapping, ModelCacheManager modelCacheManager)
+ throws ValidationServiceException {
+ Multimap<String, Node> values = HashMultimap.create();
+
+ if (MappingType.ATTRIBUTE.equals(mapping.getMappingType())) {
+ // Get attributes on current model element.
+ Multimap<String, Node> modelValues = getModelValues(modelElement, mapping, false);
+ if (modelValues.isEmpty()) {
+ throw new ValidationServiceException(ValidationServiceError.MODEL_VALUE_ERROR,
+ mapping.getModel().getValue(), modelElement.asXML());
+ }
+ values.putAll(modelValues);
+ } else {
+ // Get related objects.
+ getValuesAndModels(modelElement, mapping, modelCacheManager, values);
+ }
+
+
+ return values;
+ }
+
+ /**
+ * Returns the model type property of the current model element.
+ *
+ * @param model
+ * The current model element.
+ * @return the model type of the current element or null if not found.
+ */
+ public static String getModelType(Node model) {
+ String modelType = null;
+ List<Node> modelTypeElements = XMLModelParser.getObjectsFromXPath(model, ATTRIBUTE_MODELTYPE);
+ if (!modelTypeElements.isEmpty()) {
+ modelType = modelTypeElements.iterator().next().getText();
+ }
+ return modelType;
+ }
+
+ /**
+ * @param model
+ * @param mapping
+ * @return True if supplied model is of type widget.
+ */
+ public static boolean isValidModelType(Node model, ModelInstanceMapper mapping) {
+ Collection<String> validTypes = mapping.getModel().getFilter().getValid();
+ return validTypes.isEmpty() ? false :validTypes.contains(getModelType(model));
+ }
+
+ /**
+ * Populates a Multimap of models. If a root and filter are defined in the mapping it will navigate the model to find a
+ * valid models according to the filter. If the root property is not defined a model is not returned.
+ *
+ * @param model
+ * the model to be inspected
+ * @param mapping
+ * the model-instance mapping object defining the root model
+ * @param modelCacheManager
+ * the model cache manager used to retrieve further models
+ * @param models
+ * a Multimap of models that will be populated with further models
+ * @throws ValidationServiceException
+ */
+ public static void getValuesAndModels(Node model, ModelInstanceMapper mapping, ModelCacheManager modelCacheManager, Multimap<String, Node> models) throws ValidationServiceException {
+ String root = mapping.getModel().getRoot();
+
+ if (root == null) {
+ return;
+ }
+
+ List<Node> childModelElements = XMLModelParser.getObjectsFromXPath(model, root);
+ for (Node childModel : childModelElements) {
+ // If the child element is a leaf, this could either mean the end of the hierarchy, or that we have
+ // encountered a resource and need to retrieve a separate model to continue the model traversal.
+ List<String> modelNames = getModelValuesList(childModel, mapping);
+ if (!hasChildren(childModel, root) && !isValidModel(childModel, mapping) && mapping.getModel().getId() != null) {
+ childModel = getChildModelNode(modelCacheManager, childModel, mapping);
+ }
+
+ if (isValidModel(childModel, mapping)) {
+ for (String modelName : modelNames) {
+ models.put(modelName, childModel);
+ }
+ } else {
+ getValuesAndModels(childModel, mapping, modelCacheManager, models);
+ }
+ }
+ }
+
+ /**
+ * Find the next child model given a specific node.
+ *
+ * @param modelCacheManager
+ * the model cache manager used to retrieve further models
+ * @param node
+ * the top-level node under which child model nodes are searched
+ * @param rootXPath
+ * the path expression to apply to the node to find child elements
+ * @param modelIdPath
+ * the path expression to apply to the node to find the child model IDs
+ * @return either or the {@code node} if there were no matches for {@code id}
+ * @throws ValidationServiceException
+ */
+ private static Node getChildModelNode(ModelCacheManager modelCacheManager, Node node, ModelInstanceMapper mapping) throws ValidationServiceException {
+ Node childModel = node;
+
+ // Get the model for the specified node to check its type.
+ // Only one model ID is expected, although the API returns a list.
+ List<Node> childModelIds = XMLModelParser.getObjectsFromXPath(node, mapping.getModel().getId());
+
+ if (!childModelIds.isEmpty()) {
+ // Found the child model ID, so retrieve the child model from cache.
+ ModelId modelId = new ModelId(ModelId.ATTR_MODEL_NAME_VERSION_ID, childModelIds.iterator().next().getText());
+ Node fullChildModel = modelCacheManager.get(modelId);
+
+ if (fullChildModel != null && !isValidModelType(fullChildModel, mapping)) {
+ // Child model is not a widget so replace current child model with the full child model
+ // retrieved from the cache.
+ List<Node> fullChildModelElements = XMLModelParser.getObjectsFromXPath(fullChildModel, mapping.getModel().getRoot());
+ // Only one crown widget is expected, although the API returns a list.
+ childModel = fullChildModelElements.isEmpty() ? node : fullChildModelElements.iterator().next();
+ }
+ }
+
+ return childModel;
+ }
+
+ private static Multimap<String, Node> getModelValues(Node model, ModelInstanceMapper mapping, boolean addModel) {
+ Multimap<String, Node> values = HashMultimap.create();
+ List<String> valueStrings = getModelValuesList(model, mapping);
+ for (String value : valueStrings) {
+ values.put(value, addModel ? model : null);
+ }
+ return values;
+ }
+
+ private static List<String> getModelValuesList(Node model, ModelInstanceMapper mapping) {
+ List<String> values = new ArrayList<>();
+ List<Node> valueElements = XMLModelParser.getObjectsFromXPath(model, mapping.getModel().getValue());
+ for (Node node : valueElements) {
+ values.add(node.getText());
+ }
+ return values;
+ }
+
+ private static boolean isValidModel(Node node, ModelInstanceMapper mapping) {
+ Filter filter = mapping.getModel().getFilter();
+ if (filter == null) {
+ return true;
+ }
+
+ List<String> valid = filter.getValid();
+ // If there are no valid values, return false.
+ if (valid.isEmpty()) {
+ return false;
+ }
+
+ String filterXPath = filter.getPath();
+ if (filterXPath == null) {
+ return false;
+ }
+
+ List<Node> filterNodes = XMLModelParser.getObjectsFromXPath(node, filterXPath);
+ for (Node filterNode : filterNodes) {
+ String text = filterNode.getText();
+ if (valid.contains(text)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private static boolean hasChildren(Node parent, String rootXPath) {
+ return !XMLModelParser.getObjectsFromXPath(parent, rootXPath).isEmpty();
+ }
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/modeldriven/validator/ViolationInfo.java b/src/main/java/org/onap/aai/validation/modeldriven/validator/ViolationInfo.java
new file mode 100644
index 0000000..e452d73
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/modeldriven/validator/ViolationInfo.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.modeldriven.validator;
+
+import java.text.MessageFormat;
+import org.onap.aai.validation.controller.ValidationController;
+
+/**
+ * Defines and formats the violation information.
+ */
+public enum ViolationInfo {
+ //@formatter:off
+ NO_MODEL ("NO_MODEL", ValidationController.VALIDATION_ERROR_SEVERITY, "No model ID=[{0}]", "The model [{0}] could not be found"),
+ MISSING_ATTR ("MISSING_ATTR", ValidationController.VALIDATION_ERROR_SEVERITY, "{0} {1}=[{2}]", "Attribute [{0}] is missing in the object instance"),
+ UNEXPECTED_ATTR ("UNEXPECTED_ATTR", ValidationController.VALIDATION_ERROR_SEVERITY, "{0} {1}=[{2}]", "Attribute [{0}] should not be present in the object instance"),
+ MISSING_REL ("MISSING_REL", ValidationController.VALIDATION_ERROR_SEVERITY, "entityId=[{0}] entityType=[{1}], {2} {3}=[{4}]", "Entity {0} of type [{1}] must be related to [{2}]"),
+ UNEXPECTED_REL ("UNEXPECTED_REL", ValidationController.VALIDATION_ERROR_SEVERITY, "entityId=[{0}] entityType=[{1}], {2} {3}=[{4}]", "Entity {0} of type [{1}] must not be related to [{2}]");
+ //@formatter:on
+
+ private String category;
+ private String severity;
+ private String violationDetails;
+ private String errorMessage;
+
+ /**
+ * @param category
+ * @param severity
+ * @param violationDetails
+ * @param errorMessage
+ */
+ private ViolationInfo(String category, String severity, String violationDetails, String errorMessage) {
+ this.category = category;
+ this.severity = severity;
+ this.violationDetails = violationDetails;
+ this.errorMessage = errorMessage;
+ }
+
+ /**
+ * @return
+ */
+ public String getCategory() {
+ return this.category;
+ }
+
+ /**
+ * @return
+ */
+ public String getSeverity() {
+ return this.severity;
+ }
+
+ /**
+ * @param args
+ * @return
+ */
+ public String getViolationDetails(Object... args) {
+ return formatter(this.violationDetails, args);
+ }
+
+ /**
+ * @param args
+ * @return
+ */
+ public String getErrorMessage(Object... args) {
+ return formatter(this.errorMessage, args);
+ }
+
+ private String formatter(String violationInfo, Object... args) {
+ MessageFormat formatter = new MessageFormat("");
+ formatter.applyPattern(violationInfo);
+ return formatter.format(args);
+ }
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/publisher/MessagePublisher.java b/src/main/java/org/onap/aai/validation/publisher/MessagePublisher.java
new file mode 100644
index 0000000..94e1f29
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/publisher/MessagePublisher.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.publisher;
+
+import java.util.Collection;
+import org.onap.aai.validation.exception.ValidationServiceException;
+
+/**
+ * A Publisher of messages.
+ *
+ */
+public interface MessagePublisher {
+
+ /**
+ * Sends a message somewhere.
+ *
+ * @param message
+ * The String message to send.
+ * @throws ValidationServiceException
+ */
+ void publishMessage(String message) throws ValidationServiceException;
+
+ /**
+ * Sends a Collection of messages somewhere.
+ *
+ * @param messages
+ * The String messages to send.
+ * @throws ValidationServiceException
+ */
+ void publishMessages(Collection<String> messages) throws ValidationServiceException;
+
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/publisher/ValidationEventPublisher.java b/src/main/java/org/onap/aai/validation/publisher/ValidationEventPublisher.java
new file mode 100644
index 0000000..0cebbf9
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/publisher/ValidationEventPublisher.java
@@ -0,0 +1,164 @@
+/*
+ * ============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 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.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.factory.DMaaPEventPublisherFactory;
+import org.onap.aai.validation.logging.ApplicationMsgs;
+import org.onap.aai.validation.logging.LogHelper;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import javax.inject.Inject;
+
+/**
+ * Event Publisher
+ *
+ */
+public class ValidationEventPublisher implements MessagePublisher {
+
+ private static LogHelper applicationLogger = LogHelper.INSTANCE;
+
+ private List<Topic> publisherTopics;
+
+ private boolean enablePublishing;
+
+ private long retries;
+
+ private long retriesRemaining;
+
+ private DMaaPEventPublisherFactory dMaapFactory;
+
+
+ /**
+ * Instantiates an Event Publisher instance using properties from config file.
+ *
+ * @param topicConfig
+ * @param topicAdminConfig
+ */
+ @Inject
+ public ValidationEventPublisher(TopicConfig topicConfig, TopicAdminConfig topicAdminConfig) {
+ enablePublishing = topicAdminConfig.isPublishEnable();
+ if (enablePublishing) {
+ publisherTopics = topicConfig.getPublisherTopics();
+ retries = topicAdminConfig.getPublishRetries();
+ }
+ dMaapFactory = new DMaaPEventPublisherFactory();
+ }
+
+ /**
+ * Connect to the event publisher, add the message, and then publish it by closing the publisher.
+ */
+ @Override
+ public void publishMessage(String message) throws ValidationServiceException {
+ Collection<String> messages = new ArrayList<>();
+ messages.add(message);
+ publishMessages(messages);
+ }
+
+ /**
+ * Connect to the event publisher, adds the messages, and then publish them by closing the publisher.
+ */
+ @Override
+ public void publishMessages(Collection<String> messages) throws ValidationServiceException {
+ if (!enablePublishing) {
+ return;
+ } else {
+ applicationLogger.debug("Publishing messages: " + messages);
+ for (Topic topic : publisherTopics) {
+ retriesRemaining = retries;
+ publishMessages(messages, topic);
+ }
+ }
+ }
+
+ private void publishMessages(Collection<String> messages, Topic topic) throws ValidationServiceException {
+
+ DMaaPEventPublisher dMaapEventPublisher = dMaapFactory.createEventPublisher(topic.getHost(), topic.getName(), topic.getUsername(),
+ topic.getPassword(), topic.getTransportType());
+
+ try {
+ // Add our message to the publisher's queue/bus
+ int result = dMaapEventPublisher.sendSync(topic.getPartition(), messages);
+ if (result != messages.size()) {
+ applicationLogger.warn(ApplicationMsgs.UNSENT_MESSAGE_WARN);
+ closeEventPublisher(dMaapEventPublisher);
+ retryOrThrow(messages, topic, new ValidationServiceException(
+ ValidationServiceError.EVENT_CLIENT_INCORRECT_NUMBER_OF_MESSAGES_SENT, result));
+ }
+ } catch (Exception e) {
+ applicationLogger.error(ApplicationMsgs.UNSENT_MESSAGE_ERROR);
+ closeEventPublisher(dMaapEventPublisher);
+ retryOrThrow(messages, topic,
+ new ValidationServiceException(ValidationServiceError.EVENT_CLIENT_SEND_ERROR, e));
+ }
+
+ completeMessageSending(dMaapEventPublisher, topic);
+ }
+
+ /**
+ * Publish the queued messages by closing the publisher.
+ *
+ * @param eventPublisher the publisher to close
+ * @throws AuditException
+ */
+ private void completeMessageSending(DMaaPEventPublisher eventPublisher, Topic topic)
+ throws ValidationServiceException {
+ List<String> unsentMsgs = closeEventPublisher(eventPublisher);
+
+ if (unsentMsgs != null && !unsentMsgs.isEmpty()) {
+ // Log the error, as the exception will not be propagated due to the fact that the Cambria Client throws
+ // an exception first in a separate thread.
+ applicationLogger.error(ApplicationMsgs.EVENT_CLIENT_CLOSE_UNSENT_MESSAGE,
+ ValidationServiceError.EVENT_CLIENT_CLOSE_UNSENT_MESSAGE.getMessage(unsentMsgs));
+
+ retryOrThrow(unsentMsgs, topic, new ValidationServiceException(
+ ValidationServiceError.EVENT_CLIENT_CLOSE_UNSENT_MESSAGE, unsentMsgs));
+ }
+ }
+
+ private void retryOrThrow(Collection<String> messages, Topic topic, ValidationServiceException exceptionToThrow)
+ throws ValidationServiceException {
+ if (retriesRemaining <= 0) {
+ applicationLogger.warn(ApplicationMsgs.SEND_MESSAGE_ABORT_WARN);
+ throw exceptionToThrow;
+ } else {
+ applicationLogger.warn(ApplicationMsgs.SEND_MESSAGE_RETRY_WARN);
+ retriesRemaining--;
+ publishMessages(messages, topic);
+ }
+ }
+
+ private List<String> closeEventPublisher(DMaaPEventPublisher eventPublisher) throws ValidationServiceException {
+ try {
+ return eventPublisher.closeWithUnsent();
+ } catch (Exception e) {
+ throw new ValidationServiceException(ValidationServiceError.EVENT_CLIENT_CLOSE_ERROR, e);
+ }
+ }
+
+ public void setEventPublisherFactory(DMaaPEventPublisherFactory dMaapFactory) {
+ this.dMaapFactory = dMaapFactory;
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/reader/EntityReader.java b/src/main/java/org/onap/aai/validation/reader/EntityReader.java
new file mode 100644
index 0000000..f55af2f
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/reader/EntityReader.java
@@ -0,0 +1,61 @@
+/*
+ * ============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 java.util.List;
+import java.util.Optional;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.reader.data.EntityId;
+
+/**
+ * Interface for extracting values from an entity (in JSON format).
+ *
+ */
+public interface EntityReader {
+
+ /**
+ * Return the value found at the supplied path.
+ *
+ * @param json
+ * the JSON representation of the entity
+ * @param path
+ * specifier of the path to the value within the JSON entity
+ * @return either a primitive object (e.g. String, Integer) or a JSON element
+ * @throws ValidationServiceException
+ */
+ Object getObject(String json, String path) throws ValidationServiceException;
+
+ /**
+ * @param json
+ * the JSON representation of the entity
+ * @param type
+ * the type of the entity
+ * @return the key value(s) identifying the entity
+ * @throws ValidationServiceException
+ */
+ List<EntityId> getIds(String json, String type) throws ValidationServiceException;
+
+ /**
+ * @param json
+ * the JSON representation of the entity
+ * @return the resource version of the entity (if present)
+ * @throws ValidationServiceException
+ */
+ Optional<String> getResourceVersion(String json) throws ValidationServiceException;
+
+}
diff --git a/src/main/java/org/onap/aai/validation/reader/EventEntityReader.java b/src/main/java/org/onap/aai/validation/reader/EventEntityReader.java
new file mode 100644
index 0000000..7f285f8
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/reader/EventEntityReader.java
@@ -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=====================================================
+ */
+package org.onap.aai.validation.reader;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import org.onap.aai.validation.config.EventReaderConfig;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.reader.data.EntityId;
+
+/**
+ * An entity reader for reading A&AI events. This implementation is used by the EventReader
+ *
+ */
+public class EventEntityReader implements EntityReader {
+
+ private JsonReader jsonReader;
+ private OxmReader oxmReader;
+
+ private EventReaderConfig config;
+
+ /**
+ * @param eventReaderConfig
+ * @param jsonReader
+ * @param oxmReader
+ */
+ public EventEntityReader(final EventReaderConfig eventReaderConfig, final JsonReader jsonReader,
+ final OxmReader oxmReader) {
+ this.jsonReader = jsonReader;
+ this.oxmReader = oxmReader;
+ this.config = eventReaderConfig;
+ }
+
+ /**
+ * Parse the supplied json and return the content (values) specified by the supplied path
+ *
+ * @param json
+ * @param path
+ * @return either a String or an Array of objects
+ * @throws ValidationServiceException
+ */
+ @Override
+ public Object getObject(String json, String path) throws ValidationServiceException {
+ return jsonReader.getObject(jsonReader.parse(json), path);
+ }
+
+ public String getEntityResourceVersionPath() {
+ return config.getEntityResourceVersionPath();
+ }
+
+ @Override
+ public List<EntityId> getIds(String json, String type) throws ValidationServiceException {
+ List<EntityId> ids = new ArrayList<>();
+ for (String pk : oxmReader.getPrimaryKeys(type)) {
+ String pkPaths = config.getEntityIdPath(pk);
+ String pkValue = getPropertyForMultiplePaths(json, pkPaths).orElseThrow(
+ () -> new ValidationServiceException(ValidationServiceError.EVENT_READER_MISSING_PROPERTY,
+ pkPaths));
+ ids.add(new EntityId(pk, pkValue));
+ }
+ return ids;
+ }
+
+ /**
+ * Get an entity property from an entity in JSON format.
+ *
+ * @param json the entity
+ * @param path the JSON path to the property
+ * @return an optional property value
+ * @throws ValidationServiceException
+ */
+ public Optional<String> getProperty(String json, String path) throws ValidationServiceException {
+ return jsonReader.get(json, path).stream().findFirst();
+ }
+
+ @Override
+ public Optional<String> getResourceVersion(String json) throws ValidationServiceException {
+ return getPropertyForMultiplePaths(json, getEntityResourceVersionPath());
+ }
+
+ /**
+ * Takes a comma separated list of jsonpaths and applies each one in turn until a value is found.
+ *
+ * @param json The json to search
+ * @param multiplePaths Comma separated list of jsonpath strings
+ * @return The value of the first jsonpath string that returns a value
+ * @throws ValidationServiceException
+ */
+ private Optional<String> getPropertyForMultiplePaths(String json, String multiplePaths)
+ throws ValidationServiceException {
+ Optional<String> propertyValue = Optional.empty();
+ for (String path : multiplePaths.split(",")) {
+ propertyValue = getProperty(json, path);
+ if (propertyValue.isPresent()) {
+ break;
+ }
+ }
+ return propertyValue;
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/reader/EventReader.java b/src/main/java/org/onap/aai/validation/reader/EventReader.java
new file mode 100644
index 0000000..614ccbf
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/reader/EventReader.java
@@ -0,0 +1,215 @@
+/*
+ * ============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 com.jayway.jsonpath.DocumentContext;
+import java.util.List;
+import java.util.Optional;
+import org.onap.aai.validation.config.EventReaderConfig;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.reader.data.Entity;
+import org.onap.aai.validation.util.StringUtils;
+
+/**
+ * Reads event objects.
+ *
+ */
+public class EventReader {
+
+ private EventReaderConfig eventReaderConfig;
+
+ private JsonReader jsonReader;
+
+ private EntityReader entityReader;
+
+ /**
+ *
+ * @param eventReaderConfig the event reader configuration including paths to event properties
+ * @param jsonReader a JSON reader
+ * @param oxmReader an OXM reader to retrieve the primary key names for the entity
+ */
+ public EventReader(final EventReaderConfig eventReaderConfig, final JsonReader jsonReader,
+ final OxmReader oxmReader) {
+ this.eventReaderConfig = eventReaderConfig;
+ this.jsonReader = jsonReader;
+ this.entityReader = new EventEntityReader(eventReaderConfig, jsonReader, oxmReader);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // PUBLIC METHODS
+ ///////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get the domain of the event.
+ *
+ * @param event a JSON String with the event contents
+ * @return the domain of the event
+ * @throws ValidationServiceException
+ */
+ public Optional<String> getEventDomain(String event) throws ValidationServiceException {
+ List<String> readerResult = jsonReader.get(event, eventReaderConfig.getEventDomainPath());
+ return getFirst(readerResult);
+ }
+
+ /**
+ * Get the action of the event.
+ *
+ * @param event a JSON String with the event contents
+ * @return the action of the event
+ * @throws ValidationServiceException
+ */
+ public Optional<String> getEventAction(String event) throws ValidationServiceException {
+ List<String> readerResult = jsonReader.get(event, eventReaderConfig.getEventActionPath());
+ return getFirst(readerResult);
+ }
+
+ /**
+ * Get the type of the event.
+ *
+ * @param event a JSON String with the event contents
+ * @return the type of the event
+ * @throws ValidationServiceException
+ */
+ public Optional<String> getEventType(String event) throws ValidationServiceException {
+ List<String> readerResult = jsonReader.get(event, eventReaderConfig.getEventTypePath());
+ return getFirst(readerResult);
+ }
+
+ /**
+ * Get the entity type of the entity in the event.
+ *
+ * @param event a JSON String with the event contents
+ * @return the type of the entity
+ * @throws ValidationServiceException
+ */
+ public Optional<String> getEntityType(String event) throws ValidationServiceException {
+ List<String> readerResult = jsonReader.get(event, eventReaderConfig.getEntityTypePath());
+ return getFirst(readerResult);
+ }
+
+ /**
+ * Get the entity contained in the event.
+ *
+ * @param event a JSON String with the event contents
+ * @return the entity
+ */
+ public Entity getEntity(String event) throws ValidationServiceException {
+ DocumentContext document = jsonReader.parse(event);
+
+ String entityType = getValue(document, eventReaderConfig.getEntityTypePath())
+ .orElseThrow(() -> new ValidationServiceException(ValidationServiceError.EVENT_READER_MISSING_PROPERTY,
+ eventReaderConfig.getEntityTypePath()));
+ String topEntityType = getValue(document, eventReaderConfig.getTopEntityTypePath()).orElse(entityType);
+ String entityLink = getEntityLink(document);
+ String json = findEntity(event, topEntityType, entityType);
+
+ return new Entity(json, entityType, entityLink, entityReader);
+ }
+
+ /**
+ * Get the value of the JSON property defined by the path.
+ *
+ * @param json a JSON string
+ * @param path the path to a property
+ * @return the value
+ * @throws ValidationServiceException if the value is not present
+ */
+ public String getValue(final String json, final String path) throws ValidationServiceException {
+ return getFirst(jsonReader.get(json, path)).orElseThrow(
+ () -> new ValidationServiceException(ValidationServiceError.EVENT_READER_MISSING_PROPERTY, path));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // PRIVATE METHODS
+ ///////////////////////////////////////////////////////////////////////////
+
+ private String findEntity(String event, String topEntityType, String entityType) throws ValidationServiceException {
+ String json;
+ if (entityType.equals(topEntityType)) {
+ json = getValue(event, eventReaderConfig.getEntityPath());
+ } else {
+ json = findNestedEntity(event, eventReaderConfig.getNestedEntityPath(entityType));
+ }
+ return json;
+ }
+
+ /**
+ * @param event
+ * @param path
+ * @return
+ * @throws ValidationServiceException
+ */
+ private String findNestedEntity(String event, String path) throws ValidationServiceException {
+ List<String> entities = jsonReader.get(event, path);
+ if (entities.isEmpty()) {
+ throw new ValidationServiceException(ValidationServiceError.EVENT_READER_MISSING_PROPERTY, path);
+ } else if (entities.size() > 1) {
+ throw new ValidationServiceException(ValidationServiceError.EVENT_READER_TOO_MANY_ENTITIES);
+ }
+ return entities.get(0);
+ }
+
+ private Optional<String> getFirst(List<String> l) {
+ return l.stream().findFirst();
+ }
+
+ private Optional<String> getValue(final DocumentContext document, final String path) {
+ return getFirst(jsonReader.getAsList(document, path));
+ }
+
+ /**
+ * Gets the entity link from the event but altered by stripping a prefix identified by a delimiter configured in the
+ * event reader properties configuration.
+ *
+ * @param document the parsed JSON event
+ * @return the entity link
+ * @throws ValidationServiceException
+ */
+ private String getEntityLink(DocumentContext document) throws ValidationServiceException {
+ String entityLink = getValue(document, eventReaderConfig.getEntityLinkPath()).orElse("");
+ String strippedEntityLink = null;
+ try {
+ strippedEntityLink = StringUtils.stripPrefixRegex(entityLink, eventReaderConfig.getEntityLinkDelimiter());
+ } catch (ValidationServiceException e) {
+ throw new ValidationServiceException(ValidationServiceError.EVENT_READER_PROPERTY_READ_ERROR, e);
+ }
+ return strippedEntityLink;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // GETTERS AND SETTERS
+ ///////////////////////////////////////////////////////////////////////////
+
+ /**
+ *
+ * @return event configuration
+ */
+ public EventReaderConfig getEventReaderConfig() {
+ return eventReaderConfig;
+ }
+
+ /**
+ *
+ * @param eventReaderConfig event configuration
+ */
+ public void setEventReaderConfig(EventReaderConfig eventReaderConfig) {
+ this.eventReaderConfig = eventReaderConfig;
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/reader/InstanceEntityReader.java b/src/main/java/org/onap/aai/validation/reader/InstanceEntityReader.java
new file mode 100644
index 0000000..0b9fbed
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/reader/InstanceEntityReader.java
@@ -0,0 +1,75 @@
+/*
+ * ============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 com.google.gson.JsonElement;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.modeldriven.validator.InstanceReader;
+import org.onap.aai.validation.modeldriven.validator.InstanceReader.InstanceEntity;
+import org.onap.aai.validation.reader.data.EntityId;
+
+/**
+ * Entity reader implemented using the model-driven instance reader.
+ *
+ */
+public class InstanceEntityReader implements EntityReader {
+
+ private InstanceReader reader;
+
+ /**
+ * @param instanceReader
+ */
+ public InstanceEntityReader(InstanceReader instanceReader) {
+ this.reader = instanceReader;
+ }
+
+ @Override
+ public Object getObject(String json, String attribute) throws ValidationServiceException {
+ throw new ValidationServiceException(ValidationServiceError.INSTANCE_READER_NO_INSTANCE, "Not implemented");
+ }
+
+ @Override
+ public List<EntityId> getIds(String json, String type) throws ValidationServiceException {
+ List<EntityId> ids = new ArrayList<>();
+
+ InstanceEntity entity = reader.getNamedQueryEntity(json);
+
+ List<String> primaryKeys = reader.getOxmReader().getPrimaryKeys(entity.getEntityType());
+
+ if (primaryKeys != null && !primaryKeys.isEmpty()) {
+ for (String pk : primaryKeys) {
+ JsonElement jsonValue = entity.getObject().getAsJsonObject().get(pk);
+ if (jsonValue != null) {
+ ids.add(new EntityId(pk, jsonValue.getAsString()));
+ }
+ }
+ }
+
+ return ids;
+ }
+
+ @Override
+ public Optional<String> getResourceVersion(String json) throws ValidationServiceException {
+ return Optional.of(reader.getResourceVersion(json));
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/reader/JsonReader.java b/src/main/java/org/onap/aai/validation/reader/JsonReader.java
new file mode 100644
index 0000000..9d349ac
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/reader/JsonReader.java
@@ -0,0 +1,186 @@
+/*
+ * ============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 com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.jayway.jsonpath.Configuration;
+import com.jayway.jsonpath.DocumentContext;
+import com.jayway.jsonpath.JsonPath;
+import com.jayway.jsonpath.Option;
+import com.jayway.jsonpath.ReadContext;
+import com.jayway.jsonpath.spi.json.GsonJsonProvider;
+import com.jayway.jsonpath.spi.json.JsonProvider;
+import com.jayway.jsonpath.spi.mapper.GsonMappingProvider;
+import com.jayway.jsonpath.spi.mapper.MappingProvider;
+import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Set;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+
+/**
+ * Reads JSON objects. Supported by the JayWay JsonPath library.
+ */
+public class JsonReader {
+
+ private Configuration jsonPathConfig;
+
+ /**
+ * Initialise the JSON reader.
+ */
+ public JsonReader() {
+ setJsonProvider();
+ this.jsonPathConfig = Configuration.builder().options(Option.SUPPRESS_EXCEPTIONS).build();
+ }
+
+ /**
+ * Parse the JSON.
+ *
+ * @param json
+ * the JSON object
+ * @return a {@link ReadContext} the parsed JSON.
+ * @throws ValidationServiceException
+ */
+ public DocumentContext parse(String json) throws ValidationServiceException {
+ DocumentContext document = null;
+ try {
+ document = JsonPath.using(jsonPathConfig).parse(json);
+ } catch (Exception e) {
+ throw new ValidationServiceException(ValidationServiceError.JSON_READER_PARSE_ERROR, e);
+ }
+ return document;
+ }
+
+ /**
+ * Gets values from JSON objects.
+ *
+ * @param json
+ * the JSON object
+ * @param path
+ * the path to property values. The format must comply with the JayWay JsonPath definition.
+ * @return a List of values found by evaluating the path.
+ * @throws ValidationServiceException
+ */
+ public List<String> get(String json, String path) throws ValidationServiceException {
+ return getAsList(parse(json), path);
+ }
+
+ /**
+ * Gets values from JSON objects. Used in combination with {@link JsonReader#parse(String)} it reduces the number of
+ * times the JSON document is parsed.
+ *
+ * @param document
+ * a {@link DocumentContext} object with the parsed JSON
+ * @param path
+ * the path to property values. The format must comply with the JayWay JsonPath definition.
+ * @return a List of values found by evaluating the path, or an empty list if no values were found
+ */
+ public List<String> getAsList(DocumentContext document, String path) {
+ List<String> result = new ArrayList<>();
+ JsonElement jsonElement = document.read(path);
+ if (jsonElement != null) {
+ if (jsonElement.isJsonPrimitive()) {
+ result.add(jsonElement.getAsString());
+ } else if (jsonElement.isJsonObject()) {
+ result.add(jsonElement.getAsJsonObject().toString());
+ } else if (jsonElement.isJsonArray()) {
+ for (JsonElement obj : jsonElement.getAsJsonArray()) {
+ Object object = jsonElementToObject(obj);
+ result.add(object == null ? null : object.toString());
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Get the value(s) from the specified JSON document
+ *
+ * @param document
+ * a {@link DocumentContext} object with the parsed JSON
+ * @param path
+ * the path to property value(s). The format must comply with the JayWay JsonPath definition.
+ * @return either all the values found by evaluating the path (e.g. as an array), or a String object (only) where
+ * the path evaluates to a single primitive value
+ */
+ public Object getObject(DocumentContext document, String path) {
+ return jsonElementToObject(document.read(path));
+ }
+
+ /**
+ * Convert the JSON element to a String or Array where possible, otherwise return the JSON object.
+ *
+ * @param jsonElement
+ * @return the jsonElement converted to a Java Object
+ */
+ private Object jsonElementToObject(JsonElement jsonElement) {
+ if (jsonElement == null) {
+ return null;
+ } else if (jsonElement.isJsonPrimitive()) {
+ return jsonElement.getAsString();
+ } else if (jsonElement.isJsonObject()) {
+ return jsonElement.getAsJsonObject();
+ } else if (jsonElement.isJsonArray()) {
+ // Convert to a List for simplified handling within rules
+ return jsonArrayToList(jsonElement.getAsJsonArray());
+ } else {
+ return jsonElement;
+ }
+ }
+
+ private List<Object> jsonArrayToList(JsonArray jsonArray) {
+ List<Object> result = new ArrayList<>();
+ for (JsonElement obj : jsonArray) {
+ result.add(jsonElementToObject(obj));
+ }
+ return result;
+ }
+
+ /**
+ * @param document
+ * @param path
+ * @return a JsonElement from the document
+ */
+ public JsonElement getJsonElement(DocumentContext document, String path) {
+ return document.read(path);
+ }
+
+ private void setJsonProvider() {
+ Configuration.setDefaults(new Configuration.Defaults() {
+ private final JsonProvider jsonProvider = new GsonJsonProvider();
+ private final MappingProvider mappingProvider = new GsonMappingProvider();
+
+ @Override
+ public JsonProvider jsonProvider() {
+ return jsonProvider;
+ }
+
+ @Override
+ public MappingProvider mappingProvider() {
+ return mappingProvider;
+ }
+
+ @Override
+ public Set<Option> options() {
+ return EnumSet.noneOf(Option.class);
+ }
+ });
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/reader/OxmConfigTranslator.java b/src/main/java/org/onap/aai/validation/reader/OxmConfigTranslator.java
new file mode 100644
index 0000000..53be6dd
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/reader/OxmConfigTranslator.java
@@ -0,0 +1,100 @@
+/*
+ * ============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 java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.PathMatcher;
+import java.nio.file.Paths;
+import java.util.List;
+import java.util.Map;
+import java.util.ServiceConfigurationError;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.onap.aai.setup.ConfigTranslator;
+import org.onap.aai.setup.SchemaLocationsBean;
+import org.onap.aai.setup.Version;
+
+/**
+ * Determine which OXM and edge rules files to return based on the latest Version
+ *
+ */
+public class OxmConfigTranslator extends ConfigTranslator {
+
+ public OxmConfigTranslator(SchemaLocationsBean bean) {
+ super(bean);
+ }
+
+ @Override
+ public Map<Version, List<String>> getNodeFiles() {
+ String nodeDirectory = bean.getNodeDirectory();
+ if (nodeDirectory == null) {
+ throw new ServiceConfigurationError(
+ "Node(s) directory is empty in the schema location bean (" + bean.getSchemaConfigLocation() + ")");
+ }
+ try {
+ return getVersionMap(Paths.get(nodeDirectory), "*_v*.xml");
+ } catch (IOException e) {
+ throw new ServiceConfigurationError("Failed to read node(s) directory " + getPath(nodeDirectory), e);
+ }
+ }
+
+ @Override
+ public Map<Version, List<String>> getEdgeFiles() {
+ String edgeDirectory = bean.getEdgeDirectory();
+ if (edgeDirectory == null) {
+ throw new ServiceConfigurationError(
+ "Edge(s) directory is empty in the schema location bean (" + bean.getSchemaConfigLocation() + ")");
+ }
+ try {
+ return getVersionMap(Paths.get(edgeDirectory), "*_v*.json");
+ } catch (IOException e) {
+ throw new ServiceConfigurationError("Failed to read edge(s) directory " + getPath(edgeDirectory), e);
+ }
+ }
+
+ private String getPath(String nodeDirectory) {
+ return Paths.get(nodeDirectory).toAbsolutePath().toString();
+ }
+
+ /**
+ * Creates a map containing each OXM Version and the matching OXM file path(s)
+ *
+ * @param folderPath the folder/directory containing the OXM files
+ * @param fileSuffix
+ * @return a new Map object (may be empty)
+ * @throws IOException if there is a problem reading the specified directory path
+ */
+ private Map<Version, List<String>> getVersionMap(Path folderPath, String globPattern) throws IOException {
+ final PathMatcher filter = folderPath.getFileSystem().getPathMatcher("glob:**/" + globPattern);
+ try (final Stream<Path> stream = Files.list(folderPath)) {
+ return stream.filter(filter::matches).map(Path::toString).filter(p -> getVersionFromPath(p) != null)
+ .collect(Collectors.groupingBy(this::getVersionFromPath));
+ }
+ }
+
+ private Version getVersionFromPath(String pathName) {
+ String version = "V" + pathName.replaceAll("\\D+", "");
+ try {
+ return Version.valueOf(version);
+ } catch (IllegalArgumentException e) {
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/reader/OxmReader.java b/src/main/java/org/onap/aai/validation/reader/OxmReader.java
new file mode 100644
index 0000000..b8343f1
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/reader/OxmReader.java
@@ -0,0 +1,99 @@
+/*
+ * ============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 java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.ServiceConfigurationError;
+import org.eclipse.persistence.internal.oxm.mappings.Descriptor;
+import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
+import org.onap.aai.nodes.NodeIngestor;
+import org.onap.aai.setup.Version;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.util.StringUtils;
+
+/**
+ * Reads the primary keys of a specific OXM resource (identified by version).
+ */
+public class OxmReader {
+
+ private NodeIngestor nodeIngestor;
+ private Version version;
+ private Map<String, List<String>> primaryKeysMap = new HashMap<>();
+
+ public OxmReader(NodeIngestor nodeIngestor, Version version) {
+ this.nodeIngestor = nodeIngestor;
+ this.version = version;
+ }
+
+ public OxmReader(NodeIngestor nodeIngestor) {
+ this(nodeIngestor, Version.getLatest());
+ }
+
+ /**
+ * Get the primary keys for a given entity type.
+ *
+ * @param entityType the name of the entity type
+ * @return the primary keys for the entity type
+ * @throws ValidationServiceException
+ */
+ public List<String> getPrimaryKeys(String entityType) throws ValidationServiceException {
+ if (primaryKeysMap.isEmpty()) {
+ throw new ValidationServiceException(ValidationServiceError.OXM_MISSING_KEY, entityType);
+ }
+
+ List<String> primaryKeys = primaryKeysMap.get(entityType);
+ return primaryKeys != null ? primaryKeys : Collections.emptyList();
+ }
+
+ /**
+ * Populate a Map of primary keys for the entity types defined in the OXM.<br>
+ * The primary keys are keyed by the Default Root Element.
+ */
+ public void init() {
+ for (Descriptor<?, ?, ?, ?, ?, ?, ?, ?, ?, ?> descriptor : getObjectDescriptors()) {
+ if (!descriptor.getPrimaryKeyFieldNames().isEmpty()) {
+ primaryKeysMap.put(descriptor.getDefaultRootElement(),
+ StringUtils.stripSuffix(descriptor.getPrimaryKeyFieldNames(), "/text()"));
+ }
+ }
+ }
+
+ /**
+ * Gets a list of descriptors from the OXM. These descriptor objects contain property information about each entity
+ * type.
+ *
+ * @return list of descriptors
+ */
+ @SuppressWarnings("rawtypes")
+ private List<Descriptor> getObjectDescriptors() {
+ DynamicJAXBContext dynamicJaxbContext = nodeIngestor.getContextForVersion(version);
+ if (dynamicJaxbContext == null) {
+ throw new ServiceConfigurationError("OXM Version " + version + " was not ingested.");
+ }
+ return dynamicJaxbContext.getXMLContext().getDescriptors();
+ }
+
+ public Map<String, List<String>> getPrimaryKeysMap() {
+ return primaryKeysMap;
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/reader/data/AttributeValues.java b/src/main/java/org/onap/aai/validation/reader/data/AttributeValues.java
new file mode 100644
index 0000000..78665ef
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/reader/data/AttributeValues.java
@@ -0,0 +1,139 @@
+/*
+ * ============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.data;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Stores a collection of attribute values (retrievable by name).
+ */
+public class AttributeValues {
+
+ private Map<String, Object> map;
+
+ /**
+ * Instantiates a new empty set of attribute values.
+ */
+ public AttributeValues() {
+ this.map = new HashMap<>();
+ }
+
+ /**
+ * Instantiates a new set of attribute values using the provided properties map.
+ *
+ * @param map
+ * the attribute name/value pairs
+ */
+ public AttributeValues(Map<String, Object> map) {
+ this.map = map;
+ }
+
+ /**
+ * Instantiates a new set of attribute values comprising one name/value pair.
+ *
+ * @param key
+ * the attribute name
+ * @param value
+ * the attribute value
+ */
+ public AttributeValues(String key, String value) {
+ this();
+ this.map.put(key, value);
+ }
+
+ @Override
+ public String toString() {
+ return map.toString();
+ }
+
+ /**
+ *
+ * @return the number of attributes stored
+ */
+ public int size() {
+ return this.map.size();
+ }
+
+ /**
+ * Add an attribute name/value pair.
+ *
+ * @param key
+ * the attribute name
+ * @param value
+ * the attribute value
+ */
+ public void put(String key, Object value) {
+ this.map.put(key, value);
+ }
+
+ /**
+ * Add an attribute name with a collection of values.
+ *
+ * @param key
+ * the attribute name
+ * @param valueList
+ * the collection of attribute values
+ */
+ public void put(String key, List<String> valueList) {
+ this.map.put(key, valueList);
+ }
+
+ /**
+ * Removes the attribute
+ *
+ * @param key
+ * the attribute name
+ */
+ public void remove(String key) {
+ this.map.remove(key);
+
+ }
+
+ /**
+ * Overwrites the attribute values, replacing them with the specified attribute to attribute values mappings
+ *
+ * @param map
+ * the name/values to store
+ */
+ public void setMap(Map<String, Object> map) {
+ this.map = map;
+ }
+
+ /**
+ * Gets an attribute value
+ *
+ * @param attrName
+ * the attribute name
+ * @return the object
+ */
+ public Object get(String attrName) {
+ return this.map.get(attrName);
+ }
+
+ /**
+ * Converts the attribute values into a report-friendly format
+ *
+ * @return a Map which is a copy of the AttributeValues, formatted for reporting
+ */
+ public Map<String, Object> generateReport() {
+ return map;
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/reader/data/Entity.java b/src/main/java/org/onap/aai/validation/reader/data/Entity.java
new file mode 100644
index 0000000..415298f
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/reader/data/Entity.java
@@ -0,0 +1,135 @@
+/*
+ * ============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.data;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.reader.EntityReader;
+
+/**
+ * An A&AI entity.
+ */
+public class Entity {
+
+ private String json;
+ private String type;
+ private EntityReader reader;
+ private List<EntityId> ids = new ArrayList<>();
+ private Optional<String> resourceVersion = Optional.empty();
+ private String entityLink;
+
+ /**
+ *
+ * @param json
+ * the full entity JSON supplied in the event
+ * @param entityType
+ * the entity type
+ * @param entityLink
+ * @param entityReader
+ * an {@link EntityReader}
+ */
+ public Entity(final String json, final String entityType, final String entityLink, final EntityReader entityReader) {
+ this.json = json;
+ this.type = entityType;
+ this.entityLink = entityLink;
+ this.reader = entityReader;
+ }
+
+ /**
+ * Get the full entity JSON.
+ *
+ * @return the entity JSON
+ */
+ public String getJson() {
+ return json;
+ }
+
+ /**
+ * Get the entity type.
+ *
+ * @return the entity type
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Get the entity identifiers. More than one identifier may be provided for composite keys.
+ *
+ * @return a list of entity identifiers
+ * @throws ValidationServiceException
+ */
+ public List<EntityId> getIds() throws ValidationServiceException {
+ if (ids.isEmpty()) {
+ ids = reader.getIds(getJson(), getType());
+ }
+ return ids;
+ }
+
+ /**
+ * Get the resource version.
+ *
+ * @return the resource version
+ * @throws ValidationServiceException
+ */
+ public Optional<String> getResourceVersion() throws ValidationServiceException {
+ if (!resourceVersion.isPresent()) {
+ resourceVersion = reader.getResourceVersion(getJson());
+ }
+ return resourceVersion;
+ }
+
+ /**
+ * Get the event entity link.
+ *
+ * @return the event entity link
+ */
+ public String getEntityLink() {
+ return entityLink;
+ }
+
+ /**
+ * Get collection of attributes
+ *
+ * @param attributes
+ * the names of the attributes
+ * @return an {@link AttributeValues} object containing the attribute values
+ * @throws ValidationServiceException
+ */
+ public AttributeValues getAttributeValues(List<String> attributes) throws ValidationServiceException {
+ AttributeValues attributeValues = new AttributeValues();
+
+ if (attributes == null || attributes.isEmpty()) {
+ return attributeValues;
+ }
+
+ for (String attribute : attributes) {
+ attributeValues.put(attribute, reader.getObject(getJson(), attribute));
+ }
+
+ return attributeValues;
+ }
+
+ @Override
+ public String toString() {
+ return json;
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/reader/data/EntityId.java b/src/main/java/org/onap/aai/validation/reader/data/EntityId.java
new file mode 100644
index 0000000..83c1bf6
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/reader/data/EntityId.java
@@ -0,0 +1,91 @@
+/*
+ * ============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.data;
+
+import java.util.Objects;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+
+/**
+ * Describes an identifier for an entity.
+ */
+public class EntityId {
+
+ private String primaryKey;
+ private String value;
+
+ /**
+ * Construct an entity Id
+ */
+ public EntityId() {
+ // Deliberately empty
+ }
+
+ /**
+ * Construct an entity Id (key-value pair)
+ *
+ * @param primaryKey
+ * @param value
+ */
+ public EntityId(String primaryKey, String value) {
+ this.primaryKey = primaryKey;
+ this.value = value;
+ }
+
+ public String getPrimaryKey() {
+ return primaryKey;
+ }
+
+ public void setPrimaryKey(String primaryKey) {
+ this.primaryKey = primaryKey;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(this.primaryKey, this.value);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof EntityId)) {
+ return false;
+ } else if (obj == this) {
+ return true;
+ }
+ EntityId rhs = (EntityId) obj;
+ // @formatter:off
+ return new EqualsBuilder()
+ .append(primaryKey, rhs.primaryKey)
+ .append(value, rhs.value)
+ .isEquals();
+ // @formatter:on
+ }
+
+ @Override
+ public String toString() {
+ return primaryKey + "=" + value;
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/result/ValidationResult.java b/src/main/java/org/onap/aai/validation/result/ValidationResult.java
new file mode 100644
index 0000000..b632a0f
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/result/ValidationResult.java
@@ -0,0 +1,244 @@
+/*
+ * ============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 com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import com.google.gson.annotations.Expose;
+import java.time.Instant;
+import java.time.ZoneOffset;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.UUID;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.reader.data.Entity;
+import org.onap.aai.validation.reader.data.EntityId;
+import org.onap.aai.validation.util.JsonUtil;
+
+/**
+ * The result of an instance validation. This can include zero or more {@link Violation} objects.
+ */
+public class ValidationResult {
+
+ @Expose
+ private String validationId;
+
+ @Expose
+ private String validationTimestamp;
+
+ @Expose
+ private JsonElement entityId;
+
+ @Expose
+ private String entityType;
+
+ @Expose
+ private String entityLink;
+
+ @Expose
+ private String resourceVersion;
+
+ @Expose
+ private JsonElement entity;
+
+
+ @Expose
+ private List<Violation> violations = new ArrayList<>();
+
+ /**
+ * Create the validation payload initialised with an event identifier and a timestamp.
+ *
+ * @param entity
+ * @throws ValidationServiceException
+ */
+ public ValidationResult(Entity entity) throws ValidationServiceException {
+ this.validationId = UUID.randomUUID().toString();
+ this.validationTimestamp =
+ DateTimeFormatter.ofPattern("yyyyMMdd'T'HHmmssX").withZone(ZoneOffset.UTC).format(Instant.now());
+ this.entityId = new JsonObject();
+ for (EntityId id : entity.getIds()) {
+ this.entityId.getAsJsonObject().addProperty(id.getPrimaryKey(), id.getValue());
+ }
+ this.entityType = entity.getType();
+ this.entityLink = entity.getEntityLink();
+ this.resourceVersion = entity.getResourceVersion().orElse(null);
+ this.entity = entity.getJson()!=null ?new JsonParser().parse(entity.getJson()): new JsonObject();
+ }
+
+
+ /**
+ * Add a validation violation.
+ *
+ * @param violation a single {@link Violation} to add to the validation result
+ */
+ public void addViolation(Violation violation) {
+ this.violations.add(violation);
+ }
+
+ /**
+ * Add a list of validation violations.
+ *
+ * @param violations a List of {@link Violation} objects to add to the validation result
+ */
+ public void addViolations(List<Violation> violations) {
+ this.violations.addAll(violations);
+ }
+
+ public String getValidationId() {
+ return validationId;
+ }
+
+ public void setValidationId(String eventId) {
+ this.validationId = eventId;
+ }
+
+ public String getValidationTimestamp() {
+ return validationTimestamp;
+ }
+
+ public void setValidationTimestamp(String timestamp) {
+ this.validationTimestamp = timestamp;
+ }
+
+ public JsonElement getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(JsonElement entityId) {
+ this.entityId = entityId;
+ }
+
+ public String getEntityType() {
+ return entityType;
+ }
+
+ public void setEntityType(String entityType) {
+ this.entityType = entityType;
+ }
+
+ public String getEntityLink() {
+ return entityLink;
+ }
+
+ public void setEntityLink(String uri) {
+ this.entityLink = uri;
+ }
+
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ public void setResourceVersion(String resourceVersion) {
+ this.resourceVersion = resourceVersion;
+ }
+
+ public JsonElement getEntity() {
+ return entity;
+ }
+
+ public void setEntity(JsonElement entity) {
+ this.entity = entity;
+ }
+
+ public List<Violation> getViolations() {
+ return violations;
+ }
+
+ public void setViolations(List<Violation> violations) {
+ this.violations = violations;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(this.entityId, this.entityLink, this.entityType, this.resourceVersion, this.validationId,
+ this.validationTimestamp, this.violations, this.entity);
+ }
+
+ /*
+ * validationId is checked first, as this is meant to be unique
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof ValidationResult)) {
+ return false;
+ } else if (obj == this) {
+ return true;
+ }
+ ValidationResult rhs = (ValidationResult) obj;
+ // @formatter:off
+ return new EqualsBuilder()
+ .append(entityId, rhs.entityId)
+ .append(entityLink, rhs.entityLink)
+ .append(entityType, rhs.entityType)
+ .append(resourceVersion, rhs.resourceVersion)
+ .append(validationId, rhs.validationId)
+ .append(validationTimestamp, rhs.validationTimestamp)
+ .append(violations, rhs.violations)
+ .append(entity, rhs.entity)
+ .isEquals();
+ // @formatter:on
+ }
+
+ @Override
+ public String toString() {
+ return JsonUtil.toJson(this);
+ }
+
+ /**
+ * Create a JSON representation of the object, with each violation's validationRule omitted when it has a null value
+ *
+ * @return this object formatted as a JSON string ready for publishing
+ */
+ public String toJson() {
+ return toString();
+ }
+
+ /**
+ * Create a new object from the JSON representation
+ *
+ * @param json representation of the Validation Result
+ * @return a ValidationResult object
+ */
+ public static ValidationResult fromJson(String json) {
+ ValidationResult validationResult = JsonUtil.toAnnotatedClassfromJson(json, ValidationResult.class);
+ if (validationResult != null) {
+ validationResult.initialiseValues();
+ }
+ return validationResult;
+ }
+
+ /**
+ * Ensure that any unset fields are properly initialised. This is particularly useful when the object has been
+ * deserialised from a JSON string, as any missing/undefined values will not be read by the deserialiser and thus
+ * the corresponding fields will not be set.
+ */
+ private void initialiseValues() {
+ List<Violation> violationList = getViolations();
+ if (violationList != null) {
+ for (Violation violation : violationList) {
+ violation.initialiseValues();
+ }
+ }
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/result/Violation.java b/src/main/java/org/onap/aai/validation/result/Violation.java
new file mode 100644
index 0000000..29baed3
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/result/Violation.java
@@ -0,0 +1,418 @@
+/*
+ * ============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 com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.annotations.Expose;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.reader.data.Entity;
+import org.onap.aai.validation.reader.data.EntityId;
+import org.onap.aai.validation.util.JsonUtil;
+
+/**
+ * A validation violation.
+ */
+public class Violation {
+
+ public static final String ENTITY_TYPE_PROPERTY = "entityType";
+ public static final String ENTITY_ID_PROPERTY = "entityId";
+ public static final String ENTITY_MODELNAME_PROPERTY = "modelName";
+
+ @Expose
+ private final String violationId;
+
+ @Expose
+ private String modelName;
+
+ @Expose
+ private final String category;
+
+ @Expose
+ private final String severity;
+
+ @Expose
+ private final String violationType;
+
+ /**
+ * The rule name (not applicable for model-driven) is not final as the value may be set to null via deserialisation
+ * and we will need to update the field.
+ */
+ @Expose
+ private Optional<String> validationRule;
+
+ @Expose
+ private final JsonElement violationDetails;
+
+ @Expose
+ private String errorMessage;
+
+ /**
+ * rule-based or model-driven?
+ */
+ public enum ViolationType {
+ NONE, RULE, MODEL
+ }
+
+ /**
+ * Builder for a Violation.
+ */
+ public static class Builder {
+
+ private final MessageDigest messageDigest;
+ private final JsonElement entityId;
+ private final String entityType;
+ private final String entityLink;
+ private final String resourceVersion;
+ private String category = null;
+ private String severity = null;
+ private String violationType = null;
+ private Optional<String> validationRule = Optional.empty();
+ private JsonElement violationDetails = new JsonObject();
+ private String errorMessage = null;
+
+ /**
+ * Create a Violation Builder for the supplied entity.
+ *
+ * @param entity
+ * the entity
+ * @throws ValidationServiceException
+ * the validation service exception
+ */
+ public Builder(Entity entity) throws ValidationServiceException {
+ this.entityId = new JsonObject();
+ for (EntityId id : entity.getIds()) {
+ this.entityId.getAsJsonObject().addProperty(id.getPrimaryKey(), id.getValue());
+ }
+ this.entityType = entity.getType();
+ this.entityLink = entity.getEntityLink();
+ this.resourceVersion = entity.getResourceVersion().orElse(null);
+ try {
+ messageDigest = MessageDigest.getInstance("SHA-256");
+ } catch (NoSuchAlgorithmException e) {
+ throw new ValidationServiceException(ValidationServiceError.MESSAGE_DIGEST_ERROR, e);
+ }
+ }
+
+ /**
+ * Category.
+ *
+ * @param val
+ * the val
+ * @return the builder
+ */
+ public Builder category(String val) {
+ category = val;
+ return this;
+ }
+
+ /**
+ * Severity.
+ *
+ * @param val
+ * the val
+ * @return the builder
+ */
+ public Builder severity(String val) {
+ severity = val;
+ return this;
+ }
+
+ /**
+ * Violation type.
+ *
+ * @param val
+ * the val
+ * @return the builder
+ */
+ public Builder violationType(String val) {
+ violationType = val;
+ return this;
+ }
+
+ /**
+ * Violation type.
+ *
+ * @param type
+ * the type
+ * @return the builder
+ */
+ public Builder violationType(ViolationType type) {
+ String name = type.name();
+ // Convert to Camel Case
+ return violationType(name.substring(0, 1).toUpperCase() + name.substring(1, name.length()).toLowerCase());
+ }
+
+ /**
+ * Validation rule.
+ *
+ * @param val
+ * the val
+ * @return the builder
+ */
+ public Builder validationRule(String val) {
+ validationRule = Optional.ofNullable(val);
+ return this;
+ }
+
+ /**
+ * Violation details.
+ *
+ * @param map
+ * the map
+ * @return the builder
+ */
+ public Builder violationDetails(Map<String, Object> map) {
+ violationDetails = JsonUtil.toJsonElement(map);
+ return this;
+ }
+
+ /**
+ * Error message.
+ *
+ * @param val
+ * the val
+ * @return the builder
+ */
+ public Builder errorMessage(String val) {
+ errorMessage = val;
+ return this;
+ }
+
+ /**
+ * Generate violation id.
+ *
+ * @return a deterministic identifier of the violation (from its details) which may be used to compare the
+ * equality of violations which are created at different times
+ * @throws ValidationServiceException
+ * the validation service exception
+ */
+ public String generateViolationId() throws ValidationServiceException {
+ try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
+ StringBuilder result = new StringBuilder();
+ writeObjectToStream(baos);
+ messageDigest.reset(); // Not strictly needed as digest() will cause a reset
+ for (byte byt : messageDigest.digest(baos.toByteArray())) {
+ result.append(Integer.toString((byt & 0xff) + 0x100, 16).substring(1));
+ }
+ return result.toString();
+ } catch (IOException e) {
+ throw new ValidationServiceException(ValidationServiceError.JSON_READER_PARSE_ERROR, e);
+ }
+ }
+
+ /**
+ * Builds the.
+ *
+ * @return a new Violation object
+ * @throws ValidationServiceException
+ * the validation service exception
+ */
+ public Violation build() throws ValidationServiceException {
+ return new Violation(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "Builder [entityId=" + entityId + ", entityType=" + entityType + ", entityLink=" + entityLink + ", resourceVersion=" + resourceVersion
+ + ", category=" + category + ", severity=" + severity + ", violationType=" + violationType + ", validationRule=" + validationRule
+ + ", violationDetails=" + violationDetails + ", errorMessage=" + errorMessage + "]";
+ }
+
+ /**
+ * Stream all fields that are required for generating a deterministic violation ID field. Note that
+ * resourceVersion is not included as this is allowed to vary
+ *
+ * @param baos
+ * the byte array output stream
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ private void writeObjectToStream(ByteArrayOutputStream baos) throws IOException {
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(this.category);
+ oos.writeObject(this.entityId.toString());
+ oos.writeObject(this.entityType);
+ oos.writeObject(this.entityLink);
+ oos.writeObject(this.severity);
+ oos.writeObject(this.validationRule.toString());
+ oos.writeObject(this.violationDetails.toString());
+ oos.writeObject(this.violationType);
+ oos.close();
+ }
+
+ }
+
+ /**
+ * Instantiates a new Violation object via a builder.
+ *
+ * @param builder
+ * the builder storing the Violation values
+ * @throws ValidationServiceException
+ * the validation service exception
+ */
+ private Violation(Builder builder) throws ValidationServiceException {
+ violationId = builder.generateViolationId();
+ category = builder.category;
+ severity = builder.severity;
+ violationType = builder.violationType;
+ validationRule = builder.validationRule;
+ // Clone by serialising and deserialising!
+ violationDetails = JsonUtil.fromJson(JsonUtil.toJson(builder.violationDetails), JsonElement.class);
+ errorMessage = builder.errorMessage;
+ }
+
+ /**
+ * Gets the violation id.
+ *
+ * @return the violation id
+ */
+ public String getViolationId() {
+ return violationId;
+ }
+
+ /**
+ * Gets the model name.
+ *
+ * @return the model name
+ */
+ public String getModelName() {
+ return modelName;
+ }
+
+ /**
+ * Sets the model name.
+ *
+ * @param modelName
+ * the new model name
+ */
+ // Naughty and breaks the builder pattern but it saves a lot of faffing about.
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ /**
+ * Gets the category.
+ *
+ * @return the category
+ */
+ public String getCategory() {
+ return category;
+ }
+
+ /**
+ * Gets the severity.
+ *
+ * @return the severity
+ */
+ public String getSeverity() {
+ return severity;
+ }
+
+ /**
+ * Gets the violation type.
+ *
+ * @return the violation type
+ */
+ public String getViolationType() {
+ return violationType;
+ }
+
+ /**
+ * Gets the violation details.
+ *
+ * @return the violation details
+ */
+ @SuppressWarnings("unchecked")
+ public Map<String, Object> getViolationDetails() {
+ return JsonUtil.toAnnotatedClassfromJson(violationDetails.getAsJsonObject().toString(), Map.class);
+ }
+
+ /**
+ * Gets the error message.
+ *
+ * @return the error message
+ */
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(this.modelName, this.category, this.errorMessage, this.severity, this.validationRule, this.violationDetails, this.violationId, this.violationType);
+ }
+
+ /*
+ * A hand-crafted equivalence relation to compare two Violation objects. Note that the violationId is compared
+ * first, because this value is deterministically generated from the majority of the object's fields.
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof Violation)) {
+ return false;
+ } else if (obj == this) {
+ return true;
+ }
+ Violation rhs = (Violation) obj;
+ // @formatter:off
+ return new EqualsBuilder()
+ .append(modelName, rhs.modelName)
+ .append(category, rhs.category)
+ .append(errorMessage, rhs.errorMessage)
+ .append(severity, rhs.severity)
+ .append(validationRule, rhs.validationRule)
+ .append(violationDetails, rhs.violationDetails)
+ .append(violationId, rhs.violationId)
+ .append(violationType, rhs.violationType)
+ .isEquals();
+ // @formatter:on
+ }
+
+ @Override
+ public String toString() {
+ return JsonUtil.toJson(this);
+ }
+
+ /**
+ * Ensure that any unset fields are properly initialised. This is particularly useful when the object has been
+ * deserialised from a JSON string, as any missing/undefined values will not be read by the deserialiser and thus
+ * the corresponding fields will not be set.
+ */
+ public void initialiseValues() {
+ if (validationRule == null) { // NOSONAR
+ validationRule = Optional.empty();
+ }
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/RuleDrivenValidator.java b/src/main/java/org/onap/aai/validation/ruledriven/RuleDrivenValidator.java
new file mode 100644
index 0000000..476c098
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/RuleDrivenValidator.java
@@ -0,0 +1,278 @@
+/*
+ * ============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;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+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.Locale;
+import java.util.Map;
+import java.util.Optional;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+import org.onap.aai.validation.Validator;
+import org.onap.aai.validation.config.RuleIndexingConfig;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.logging.ApplicationMsgs;
+import org.onap.aai.validation.logging.LogHelper;
+import org.onap.aai.validation.reader.EventReader;
+import org.onap.aai.validation.reader.OxmReader;
+import org.onap.aai.validation.reader.data.AttributeValues;
+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.ViolationType;
+import org.onap.aai.validation.ruledriven.configuration.EntitySection;
+import org.onap.aai.validation.ruledriven.configuration.GroovyConfigurationException;
+import org.onap.aai.validation.ruledriven.configuration.RulesConfigurationLoader;
+import org.onap.aai.validation.ruledriven.rule.Rule;
+
+/**
+ * Validator using explicit rules
+ *
+ */
+public class RuleDrivenValidator implements Validator {
+
+ private static LogHelper applicationLogger = LogHelper.INSTANCE;
+
+ private static final String RULES_CONFIG_FILE_SUFFIX = ".groovy";
+
+ private Path configurationPath;
+ private OxmReader oxmReader;
+ private EventReader eventReader;
+ private Optional<RuleIndexingConfig> ruleIndexingConfig;
+ // Map of event type name against RuleManager for that event type
+ private Map<String, RuleManager> ruleManagers;
+
+
+ /**
+ * Construct a Validator that is configured using rule files
+ *
+ * @param configurationPath path to the Groovy rules files
+ * @param oxmReader required for validating entity types
+ * @param eventReader a reader for extracting entities from each event to be validated
+ */
+ public RuleDrivenValidator(final Path configurationPath, final OxmReader oxmReader,
+ final EventReader eventReader, final RuleIndexingConfig ruleIndexingConfig) {
+ this.configurationPath = configurationPath;
+ this.oxmReader = oxmReader;
+ this.eventReader = eventReader;
+ this.ruleIndexingConfig = Optional.ofNullable(ruleIndexingConfig);
+ this.ruleManagers = null;
+ }
+
+ @Override
+ public void initialise() throws ValidationServiceException {
+ ruleManagers = new HashMap<>();
+ for (String eventType : getSupportedEventTypes()) {
+ ruleManagers.put(eventType.toLowerCase(Locale.getDefault()), loadRulesConfiguration(eventType));
+ }
+ validateRulesConfiguration();
+ }
+
+ private RuleManager loadRulesConfiguration(String eventType) throws ValidationServiceException {
+ StringBuilder rulesText = new StringBuilder();
+ try (Stream<Path> paths = Files.find(configurationPath.resolve(eventType), 1,
+ (path, basicFileAttributes) -> path.toFile().getName().matches(".*\\" + RULES_CONFIG_FILE_SUFFIX));) {
+ paths.forEach(appendFileContent(rulesText));
+ } catch (IOException e) {
+ throw new ValidationServiceException(ValidationServiceError.RULES_FILE_ERROR,
+ configurationPath.toAbsolutePath(), e);
+ }
+
+ try {
+ return RulesConfigurationLoader.loadConfiguration(rulesText.toString());
+ } catch (GroovyConfigurationException e) {
+ throw new ValidationServiceException(ValidationServiceError.RULES_FILE_ERROR, e,
+ configurationPath.toAbsolutePath() + File.separator + "*" + RULES_CONFIG_FILE_SUFFIX);
+ }
+ }
+
+ private void validateRulesConfiguration() throws ValidationServiceException {
+ for (RuleManager ruleManager : ruleManagers.values()) {
+ for (EntitySection entity : ruleManager.getEntities()) {
+ if(ruleIndexingConfig.isPresent() && ruleIndexingConfig.get().skipOxmValidation(entity.getName())) {
+ continue;
+ }
+ if (oxmReader != null && oxmReader.getPrimaryKeys(entity.getName()).isEmpty()) {
+ throw new ValidationServiceException(ValidationServiceError.OXM_MISSING_KEY,
+ entity.getName() + " defined in " + configurationPath.toAbsolutePath() + File.separator
+ + "*" + RULES_CONFIG_FILE_SUFFIX);
+ }
+ }
+ }
+ }
+
+ /**
+ * Helper method to expose the configured rules. This simplifies testing of the validator.
+ *
+ * @param entityType
+ * @param eventType
+ * @return the rules defined for this entityType
+ */
+ public List<Rule> getRulesForEntity(String entityType, String eventType) {
+ return ruleManagers.get(eventType.toLowerCase(Locale.getDefault())).getRulesForEntity(entityType);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.aai.validation.Validator#validate(java.lang.String)
+ */
+ @Override
+ public List<ValidationResult> validate(String event) throws ValidationServiceException {
+ List<ValidationResult> validationResults = new ArrayList<>();
+
+ Entity entity = getEventReader().getEntity(event);
+ Optional<String> eventType = eventReader.getEventType(event);
+ List<Rule> rules = getRulesToApply(entity, eventType).orElse(null);
+ if (rules == null) {
+ throw new ValidationServiceException(ValidationServiceError.RULES_NOT_DEFINED, eventType.orElse(null));
+ }
+ ValidationResult validationResult = new ValidationResult(entity);
+ Violation.Builder builder = new Violation.Builder(entity);
+
+ for (Rule rule : rules) {
+ AttributeValues attributeValues = entity.getAttributeValues(rule.getAttributePaths());
+
+ // Execute the rule for this particular set of attribute values.
+ boolean valid = false;
+ try {
+ valid = rule.execute(attributeValues);
+ } catch (IllegalArgumentException e) {
+ throw new ValidationServiceException(ValidationServiceError.RULE_EXECUTION_ERROR, e, rule,
+ attributeValues);
+ }
+
+ applicationLogger.debug(String.format("%s|%s|\"%s\"|%s", entity.getType(), entity.getIds(), rule.getName(),
+ valid ? "pass" : "fail"));
+
+ if (!valid) {
+ //@formatter:off
+ Violation violation = builder
+ .category(rule.getErrorCategory())
+ .severity(rule.getSeverity())
+ .violationType(ViolationType.RULE)
+ .validationRule(rule.getName())
+ .violationDetails(attributeValues.generateReport())
+ .errorMessage(rule.getErrorMessage())
+ .build();
+ //@formatter:on
+
+ validationResult.addViolation(violation);
+ }
+ }
+ validationResults.add(validationResult);
+
+ return validationResults;
+ }
+
+ private Optional<List<Rule>> getRulesToApply(Entity entity, Optional<String> eventType)
+ throws ValidationServiceException {
+ Optional<List<Rule>> rules = Optional.empty();
+ if (eventType.isPresent()) {
+ Optional<RuleManager> ruleManager = getRuleManager(eventType.get().toLowerCase(Locale.getDefault()));
+ if (ruleManager.isPresent()) {
+ if (ruleIndexingConfig.isPresent() && ruleIndexingConfig.get().getIndexedEvents() != null &&
+ ruleIndexingConfig.get().getIndexedEvents().contains(eventType.get())) {
+ rules = getRulesByIndex(entity, eventType.get(), ruleManager.get());
+ } else {
+ rules = Optional.of(ruleManager.get().getRulesForEntity(entity.getType()));
+ }
+ }
+ }
+ return rules;
+ }
+
+ private Optional<List<Rule>> getRulesByIndex(Entity entity, String eventType, RuleManager ruleManager) {
+ String rulesKey = generateKey(entity, eventType);
+ applicationLogger.debug(String.format("Retrieving indexed rules for key '%s'", rulesKey));
+ Optional<List<Rule>> rules = Optional.of(ruleManager.getRulesForEntity(rulesKey));
+ if (rules.get().isEmpty() && ruleIndexingConfig.isPresent()) {
+ if (ruleIndexingConfig.get().getDefaultIndexKey() == null || ruleIndexingConfig.get().getDefaultIndexKey().isEmpty()) {
+ applicationLogger.debug("Default index value not configured, unable to get rules");
+ applicationLogger.error(ApplicationMsgs.CANNOT_VALIDATE_ERROR, eventType);
+ return rules;
+ }
+ String defaultKey = RuleManager.generateKey(new String[] {ruleIndexingConfig.get().getDefaultIndexKey()});
+ rules = Optional.of(ruleManager.getRulesForEntity(defaultKey));
+ }
+ return rules;
+ }
+
+ private String generateKey(Entity entity, String eventType) {
+ if (!ruleIndexingConfig.isPresent() || ruleIndexingConfig.get().getIndexAttributes() == null ||
+ ruleIndexingConfig.get().getIndexAttributes().isEmpty()) {
+ applicationLogger.debug(String.format(
+ "Event '%s' is configured to use indexed rules but indexing attributes are not configured", eventType));
+ return "";
+ }
+ try {
+ AttributeValues attributeValues = entity.getAttributeValues(ruleIndexingConfig.get().getIndexAttributes());
+ applicationLogger.debug("Generating index using attributes: " + attributeValues.generateReport().toString());
+ Collection<Object> values = attributeValues.generateReport().values();
+ return RuleManager.generateKey(values.stream().toArray(String[]::new));
+ } catch (ValidationServiceException e) {
+ applicationLogger.debug("Failed to retrieve index key attributes from event");
+ applicationLogger.error(ApplicationMsgs.CANNOT_VALIDATE_ERROR, eventType);
+ return "";
+ }
+ }
+
+ private EventReader getEventReader() {
+ return this.eventReader;
+ }
+
+ private Optional<RuleManager> getRuleManager(String eventType) throws ValidationServiceException {
+ if (ruleManagers == null) {
+ initialise();
+ }
+ return Optional.ofNullable(ruleManagers.get(eventType));
+ }
+
+ /**
+ * Read the text content of the specified Path and append this to the specified String
+ *
+ * @param sb StringBuilder for the rule configuration text
+ * @return a Consumer function that appends file content
+ */
+ private Consumer<? super Path> appendFileContent(StringBuilder sb) {
+ return path -> {
+ try {
+ for (String line : Files.readAllLines(path)) {
+ sb.append(line).append("\n");
+ }
+ } catch (IOException e) {
+ applicationLogger.error(ApplicationMsgs.READ_FILE_ERROR, e, path.toString());
+ }
+ };
+ }
+
+ private Collection<String> getSupportedEventTypes() {
+ String[] list = configurationPath.toFile().list((current, name) -> new File(current, name).isDirectory());
+ return list == null ? Collections.emptyList() : Arrays.asList(list);
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/RuleManager.java b/src/main/java/org/onap/aai/validation/ruledriven/RuleManager.java
new file mode 100644
index 0000000..c21ce24
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/RuleManager.java
@@ -0,0 +1,91 @@
+/*
+ * ============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;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+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.rule.GroovyRule;
+import org.onap.aai.validation.ruledriven.rule.Rule;
+
+/**
+ * Helper class storing the relationships from entity type to rules. This class constructs the actual rules from the
+ * supplied configuration.
+ *
+ */
+public class RuleManager {
+
+ private Map<String, List<Rule>> rulesMap = new LinkedHashMap<>();
+ private List<EntitySection> entities;
+
+ /**
+ * Create the rules for each type of entity based on the supplied configuration
+ *
+ * @param entities configuration (all entities)
+ * @throws InstantiationException
+ * @throws IllegalAccessException
+ * @throws GroovyConfigurationException
+ * @throws IOException
+ */
+ public RuleManager(List<EntitySection> entities)
+ throws InstantiationException, IllegalAccessException, GroovyConfigurationException, IOException {
+ this.entities = entities;
+ for (EntitySection entity : entities) {
+ List<Rule> rules = new ArrayList<>();
+ for (RuleSection section : entity.getRules()) {
+ rules.add(new GroovyRule(section));
+ }
+ rulesMap.put(entity.getType(), rules);
+ }
+ }
+
+ public List<EntitySection> getEntities() {
+ return entities;
+ }
+
+ /**
+ * @param entityType
+ * @return the rules configured for this entity type
+ */
+ public List<Rule> getRulesForEntity(String entityType) {
+ List<Rule> rules = rulesMap.get(entityType);
+ return rules == null ? Collections.emptyList() : rules;
+ }
+
+ public static String generateKey(String[] indices) {
+ SortedSet<String> sortedIndices = new TreeSet<>();
+ Collections.addAll(sortedIndices, indices);
+ StringBuilder sb = new StringBuilder();
+ Iterator<String> iterator = sortedIndices.iterator();
+ while (iterator.hasNext()) {
+ sb.append("[");
+ sb.append(iterator.next());
+ sb.append("]");
+ }
+ return sb.toString();
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/configuration/EntitySection.java b/src/main/java/org/onap/aai/validation/ruledriven/configuration/EntitySection.java
new file mode 100644
index 0000000..357ed87
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/configuration/EntitySection.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.ruledriven.configuration;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import org.onap.aai.validation.ruledriven.configuration.build.EntityBuilder;
+
+/**
+ * Rules Configuration: entity {} section.
+ */
+public class EntitySection {
+
+ private String name;
+ private String type;
+ private final SortedSet<String> indices = new TreeSet<>();
+ private final List<RuleSection> rules = new ArrayList<>();
+
+ /**
+ * Rules are specified within an entity section.
+ */
+ public EntitySection() {
+ // Deliberately empty - invoked when an entity section is read from the rules DSL
+ }
+
+ @Override
+ public String toString() {
+ return new EntityBuilder(this).toString();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setType(String entityType) {
+ this.type = entityType;
+ }
+
+ public void setIndices(List<String> indices) {
+ for(String index : indices) {
+ this.indices.add(index.trim());
+ }
+ }
+
+ public void setIndices(String[] indices) {
+ for(String index : indices) {
+ this.indices.add(index.trim());
+ }
+ }
+
+ public SortedSet<String> getIndices() {
+ return this.indices;
+ }
+
+ /**
+ * Adds the rule.
+ *
+ * @param rule
+ * the rule
+ */
+ public void addRule(RuleSection rule) {
+ this.rules.add(rule);
+ }
+
+ /**
+ * <p>
+ * Getter for property {@link #rules}.
+ * </p>
+ *
+ * @return Value for property <tt>rules</tt>.
+ */
+ public List<RuleSection> getRules() {
+ return this.rules;
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/configuration/GroovyConfigurationException.java b/src/main/java/org/onap/aai/validation/ruledriven/configuration/GroovyConfigurationException.java
new file mode 100644
index 0000000..3b1b98a
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/configuration/GroovyConfigurationException.java
@@ -0,0 +1,103 @@
+/*
+ * ============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 groovy.lang.MissingMethodException;
+import groovy.lang.MissingPropertyException;
+import org.codehaus.groovy.control.CompilationFailedException;
+import org.codehaus.groovy.control.MultipleCompilationErrorsException;
+import org.onap.aai.validation.exception.BaseValidationServiceException;
+import org.onap.aai.validation.exception.ValidationServiceError;
+
+/**
+ * Configuration load/parse exceptions
+ *
+ */
+@SuppressWarnings("serial")
+public class GroovyConfigurationException extends BaseValidationServiceException {
+
+ private String invalidToken; // NOSONAR
+ private String configText; // NOSONAR
+
+ /**
+ * @param text
+ */
+ public GroovyConfigurationException(String text) {
+ super(ValidationServiceError.RULE_UNEXPECTED_TOKEN.getId(), ValidationServiceError.RULE_UNEXPECTED_TOKEN.getId() + ", " + text);
+ }
+
+ /**
+ * @param text
+ * @param configuration
+ */
+ public GroovyConfigurationException(String text, String configuration) {
+ super(text);
+ this.configText = configuration;
+ }
+
+ /**
+ * @param e
+ * exception for a missing method
+ * @param configuration
+ */
+ public GroovyConfigurationException(MissingMethodException e, String configuration) {
+ super(ValidationServiceError.RULE_UNEXPECTED_TOKEN.getId(), "Invalid keyword " + e.getMethod(), e);
+ setInvalidToken(e.getMethod());
+ this.configText = configuration;
+ }
+
+ /**
+ * @param e
+ * @param configuration
+ */
+ public GroovyConfigurationException(MissingPropertyException e, String configuration) {
+ super(ValidationServiceError.RULE_UNEXPECTED_TOKEN.getId(), "Invalid keyword " + e.getProperty(), e);
+ setInvalidToken(e.getProperty());
+ this.configText = configuration;
+ }
+
+ /**
+ * @param e
+ */
+ public GroovyConfigurationException(CompilationFailedException e) {
+ super(ValidationServiceError.RULE_UNEXPECTED_TOKEN.getId(), ValidationServiceError.RULE_UNEXPECTED_TOKEN.getId() + ", "
+ + ValidationServiceError.RULE_UNEXPECTED_TOKEN.getMessage() + "; Caused by: " + e.getMessage(), e);
+ }
+
+ /**
+ * @param e
+ * @param configuration
+ */
+ public GroovyConfigurationException(MultipleCompilationErrorsException e, String configuration) {
+ super(ValidationServiceError.RULE_UNEXPECTED_TOKEN.getId(), "", e);
+ this.configText = configuration;
+ }
+
+ public String getInvalidToken() {
+ return invalidToken;
+ }
+
+ public void setInvalidToken(String token) {
+ this.invalidToken = token;
+ }
+
+ public String getConfigText() {
+ return configText;
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/configuration/RuleSection.java b/src/main/java/org/onap/aai/validation/ruledriven/configuration/RuleSection.java
new file mode 100644
index 0000000..b03bcf3
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/configuration/RuleSection.java
@@ -0,0 +1,200 @@
+/*
+ * ============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.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.onap.aai.validation.ruledriven.configuration.build.RuleBuilder;
+
+/**
+ * Rules Configuration: rule {} section.
+ */
+public class RuleSection {
+
+ private String name;
+ private boolean isGenericRule;
+ private String description;
+ private String category;
+ private String errorMessage;
+ private String type;
+ private String objectId;
+ private String severity;
+ private List<String> attributes = new ArrayList<>();
+ private List<String> fields = new ArrayList<>();
+ private String expression;
+
+ /**
+ * Rules may be defined within an entity {} section.
+ */
+ public RuleSection() {
+ isGenericRule = false;
+ }
+
+ /**
+ * @param attribute
+ */
+ public void addAttribute(String attribute) {
+ if (this.attributes == null) {
+ this.attributes = new ArrayList<>();
+ }
+ this.attributes.add(attribute);
+ }
+
+ private void addAttributeMapping(String field) {
+ if (this.fields == null) {
+ this.fields = new ArrayList<>();
+ }
+ this.fields.add(field);
+ }
+
+ private void addAttributeNames(List<String> fieldNames) {
+ for (String attribute : fieldNames) {
+ addAttributeMapping(attribute);
+ }
+ }
+
+ private void addAttributes(List<String> attributes) {
+ for (String attribute : attributes) {
+ addAttribute(attribute);
+ }
+ }
+
+ /**
+ * Make a copy of a generically defined rule so that we can tailor it for our specific entity.
+ *
+ * @param genericRule
+ */
+ public void copyFrom(RuleSection genericRule) {
+ setCategory(genericRule.getCategory());
+ setDescription(genericRule.getDescription());
+ setSeverity(genericRule.getSeverity());
+ setExpression(genericRule.getExpression());
+ setErrorMessage(genericRule.getErrorMessage());
+ if (genericRule.getAttributes() != null) {
+ if (getAttributes().isEmpty()) {
+ addAttributes(genericRule.getAttributes());
+ } else {
+ // Map the attributes
+ addAttributeNames(genericRule.getAttributes());
+ }
+ }
+
+ if (getAttributes().isEmpty()) {
+ throw new IllegalArgumentException("No attributes defined");
+ }
+ }
+
+ public List<String> getAttributes() {
+ return new ArrayList<>(attributes);
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ public String getExpression() {
+ return expression;
+ }
+
+ public List<String> getExpressionFieldNames() {
+ if (fields.size() < attributes.size()) {
+ return attributes;
+ } else {
+ return fields;
+ }
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public String getObjectId() {
+ return objectId;
+ }
+
+ public String getSeverity() {
+ return severity;
+ }
+
+ public boolean isGeneric() {
+ return isGenericRule;
+ }
+
+ public void setAttributes(List<String> attributes) {
+ this.attributes = attributes;
+ }
+
+ public void setAttributes(String[] attributes) {
+ this.attributes = new ArrayList<>(Arrays.asList(attributes));
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public void setErrorMessage(String errorMessage) {
+ this.errorMessage = errorMessage;
+ }
+
+ public void setExpression(String expression) {
+ this.expression = expression;
+ }
+
+ public void setIsGeneric(boolean isGenericRule) {
+ this.isGenericRule = isGenericRule;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setObject(String object) {
+ this.type = object;
+ }
+
+ public void setObjectId(String objectId) {
+ this.objectId = objectId;
+ }
+
+ public void setSeverity(String severity) {
+ this.severity = severity;
+ }
+
+ @Override
+ public String toString() {
+ return new RuleBuilder(this, "").toString();
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/configuration/RulesConfigurationLoader.groovy b/src/main/java/org/onap/aai/validation/ruledriven/configuration/RulesConfigurationLoader.groovy
new file mode 100644
index 0000000..5fabde9
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/configuration/RulesConfigurationLoader.groovy
@@ -0,0 +1,309 @@
+/*
+ * ============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 groovy.lang.Closure
+import groovy.lang.DelegatesTo
+import groovy.lang.ExpandoMetaClass
+import java.io.File
+import java.util.List
+import org.onap.aai.validation.ruledriven.RuleManager
+
+class RulesConfigurationLoader {
+
+ static RuleManager loadConfiguration(File dsl) {
+ return loadConfiguration(dsl.text)
+ }
+
+ static RuleManager loadConfiguration(String dsl) throws GroovyConfigurationException {
+ SettingsSection globalConfiguration = new SettingsSection()
+ def List<EntitySection> entities = []
+ def List<RuleSection> rules = []
+ Script dslScript
+
+ try {
+ dslScript = new GroovyShell().parse(dsl)
+ } catch (org.codehaus.groovy.control.MultipleCompilationErrorsException e) {
+ throw new GroovyConfigurationException(e, dsl)
+ }
+
+ dslScript.metaClass = createEMC(dslScript.class, { ExpandoMetaClass emc ->
+
+ emc.settings = { Closure cl ->
+ cl.delegate = new SettingsDelegate(globalConfiguration)
+ cl.resolveStrategy = Closure.DELEGATE_FIRST
+ cl()
+ }
+
+ emc.entity = { Closure cl ->
+ EntitySection entityConfiguration = new EntitySection()
+ cl.delegate = new EntityDelegate(entityConfiguration)
+ cl.resolveStrategy = Closure.DELEGATE_FIRST
+ cl()
+ entities.add(entityConfiguration)
+ }
+
+ emc.rule = { Closure cl ->
+ RuleSection ruleConfiguration = new RuleSection()
+ cl.delegate = new RuleDelegate(ruleConfiguration)
+ cl.resolveStrategy = Closure.DELEGATE_FIRST
+ cl()
+ rules.add(ruleConfiguration)
+ }
+ })
+
+ try {
+ dslScript.run()
+ } catch (MissingMethodException | MissingPropertyException e) {
+ throw new GroovyConfigurationException(e, dsl)
+ }
+
+ loadGenericRules(entities, rules)
+ checkForDuplicateRules(rules)
+
+ return new RuleManager(entities)
+ }
+
+ static void loadGenericRules(List<EntitySection> entities, List<RuleSection> rules) {
+ for (entity in entities) {
+ for (rule in entity.getRules()) {
+ if (rule.isGeneric()) {
+ def namedRule = rules.find() { item ->
+ item.getName() == rule.getName()
+ }
+ if (namedRule == null) {
+ throw new GroovyConfigurationException("rule '" + rule.getName() + "' is not defined")
+ }
+ try {
+ rule.copyFrom(namedRule)
+ } catch (IllegalArgumentException e) {
+ throw new GroovyConfigurationException("rule '" + rule.getName() + "' has no attributes defined, referenced by entity '" + entity.getName() + "'")
+ }
+ }
+ if (rule.getExpression() == null) {
+ throw new GroovyConfigurationException("rule '" + rule.getName() + "' does not have an expression defined")
+ }
+ }
+ }
+ }
+
+ static void checkForDuplicateRules(List<RuleSection> rules) {
+ def duplicates = rules.countBy{ rule -> rule.name }.grep{ it.value > 1 }.collect{ it.key }
+
+ rules.each { rule ->
+ if (rule.name in duplicates) {
+ throw new GroovyConfigurationException("Generic rule '" + rule.name + "' is duplicated")
+ }
+ }
+ }
+
+ static ExpandoMetaClass createEMC(Class scriptClass, Closure cl) {
+ ExpandoMetaClass emc = new ExpandoMetaClass(scriptClass, false)
+ cl(emc)
+ emc.initialize()
+ return emc
+ }
+}
+
+// Parse the settings {} block
+class SettingsDelegate {
+ private SettingsSection configuration
+
+ SettingsDelegate(SettingsSection configuration) {
+ this.configuration = configuration
+ }
+
+ void environment(String environment) {
+ this.configuration.setEnvironment environment
+ }
+}
+
+// Parse an entity {} block
+class EntityDelegate {
+ private EntitySection configuration
+
+ EntityDelegate(EntitySection configuration) {
+ this.configuration = configuration
+ }
+
+ void name(String name) {
+ this.configuration.setName name
+ }
+
+ void type(String name) {
+ if (!configuration.name) configuration.name = name
+ configuration.type = name
+ configuration.getRules().each { rule ->
+ rule.setObject configuration.type
+ }
+ }
+
+ def indexing(@DelegatesTo(strategy=Closure.DELEGATE_FIRST, value=IndexingDelegate) Closure cl) {
+ cl.delegate = new IndexingDelegate(configuration)
+ cl.resolveStrategy = Closure.DELEGATE_FIRST
+ cl()
+ }
+
+ def validation(@DelegatesTo(strategy=Closure.DELEGATE_FIRST, value=ValidationDelegate) Closure cl) {
+ cl.delegate = new ValidationDelegate(configuration)
+ cl.resolveStrategy = Closure.DELEGATE_FIRST
+ cl()
+ }
+
+ void methodMissing(String name, Object args) {
+ throw new MissingMethodException(name, this.class, args as Object[])
+ }
+
+ def propertyMissing(String name) {
+ throw new MissingMethodException(name, this.class)
+ }
+}
+
+
+// Parse an indexing {} block within an entity block
+class IndexingDelegate {
+ private EntitySection configuration
+
+ IndexingDelegate(EntitySection configuration) {
+ this.configuration = configuration
+ }
+
+ void indices(String... indices) {
+ this.configuration.setIndices indices
+ def index = RuleManager.generateKey(indices)
+ this.configuration.type = index
+ this.configuration.getRules().each { rule ->
+ rule.setObject configuration.type
+ }
+ }
+
+ void methodMissing(String name, Object args) {
+ throw new MissingMethodException(name, this.class, args as Object[])
+ }
+
+ def propertyMissing(String name) {
+ throw new MissingMethodException(name, this.class)
+ }
+}
+
+// Parse a validation {} block within an entity block
+class ValidationDelegate {
+ private EntitySection configuration
+ private String id
+
+ ValidationDelegate(EntitySection configuration) {
+ this.configuration = configuration
+ }
+
+ void useRule(@DelegatesTo(strategy=Closure.DELEGATE_FIRST, value=UseRuleDelegate) Closure cl) {
+ cl.delegate = new UseRuleDelegate(configuration, configuration.type, id)
+ cl.resolveStrategy = Closure.DELEGATE_FIRST
+ cl()
+ }
+
+ void rule(@DelegatesTo(strategy=Closure.DELEGATE_FIRST, value=RuleDelegate) Closure cl) {
+ RuleSection ruleConfiguration = new RuleSection()
+ ruleConfiguration.setObject configuration.type
+ ruleConfiguration.setObjectId this.id
+ cl.delegate = new RuleDelegate(ruleConfiguration)
+ cl.resolveStrategy = Closure.DELEGATE_FIRST
+ cl()
+ configuration.addRule(ruleConfiguration)
+ }
+
+ void methodMissing(String name, Object args) {
+ throw new MissingMethodException(name, this.class, args as Object[])
+ }
+}
+
+// Parse a rule {} block
+class RuleDelegate {
+ private RuleSection configuration
+
+ RuleDelegate(RuleSection configuration) {
+ this.configuration = configuration
+ }
+
+ void name(String name) {
+ this.configuration.setName name
+ }
+
+ void category(String category) {
+ this.configuration.setCategory category
+ }
+
+ void description(String description) {
+ this.configuration.setDescription description
+ }
+
+ void errorText(String text) {
+ this.configuration.setErrorMessage text
+ }
+
+ void severity(String severity) {
+ this.configuration.setSeverity severity
+ }
+
+ void attributes(String... attributesList) {
+ this.configuration.setAttributes attributesList
+ }
+
+ void validate(String validate) {
+ this.configuration.setExpression validate
+ }
+
+ void methodMissing(String name, Object args) {
+ throw new MissingMethodException(name, this.class, args as Object[])
+ }
+
+ def propertyMissing(String name) {
+ throw new MissingMethodException(name, this.class)
+ }
+}
+
+class UseRuleDelegate {
+ private EntitySection configuration
+ private String objectName
+ private String id
+ private RuleSection ruleConfig
+
+ UseRuleDelegate(EntitySection configuration, String objectName, String id) {
+ this.configuration = configuration
+ this.objectName = objectName
+ this.id = id
+ }
+
+ void name(String name) {
+ ruleConfig = new RuleSection()
+ ruleConfig.setIsGeneric true;
+ ruleConfig.setName name;
+ ruleConfig.setObject this.objectName
+ ruleConfig.setObjectId this.id
+ this.configuration.addRule ruleConfig
+ }
+
+ void attributes(String[] attributes) {
+ if (ruleConfig.attributes.empty) {
+ attributes.each {ruleConfig.addAttribute it}
+ }
+ }
+
+ def propertyMissing(String name) {
+ throw new MissingMethodException(name, this.class)
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/configuration/SettingsSection.java b/src/main/java/org/onap/aai/validation/ruledriven/configuration/SettingsSection.java
new file mode 100644
index 0000000..d59d07d
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/configuration/SettingsSection.java
@@ -0,0 +1,48 @@
+/*
+ * ============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.onap.aai.validation.ruledriven.configuration.build.EntityBuilder;
+
+/**
+ * Parse the settings configuration block.
+ */
+public class SettingsSection {
+
+ private String environment;
+
+ public SettingsSection() {
+ // Deliberately empty
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(new EntityBuilder());
+ return sb.toString();
+ }
+
+ public String getEnvironment() {
+ return environment;
+ }
+
+ public void setEnvironment(String environment) {
+ this.environment = environment;
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/ContentBuilder.java b/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/ContentBuilder.java
new file mode 100644
index 0000000..320e29e
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/ContentBuilder.java
@@ -0,0 +1,198 @@
+/*
+ * ============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.build;
+
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+
+
+/**
+ * Helper class for building internal configuration settings.
+ */
+public class ContentBuilder {
+
+ private final String contentName;
+ protected List<ContentBuilder> items = new ArrayList<>();
+ private StringBuilder content = new StringBuilder();
+ protected String indent = "";
+
+ /**
+ * Construct an empty section.
+ */
+ public ContentBuilder() {
+ this.contentName = null;
+ }
+
+ /**
+ * Instantiates a new content builder.
+ *
+ * @param contentName
+ * the content name
+ */
+ public ContentBuilder(String contentName) {
+ this.contentName = contentName;
+ }
+
+ @Override
+ public String toString() {
+ return build();
+ }
+
+ /**
+ * Builds the configuration section
+ *
+ * @return the configuration as a string
+ */
+ public String build() {
+ StringBuilder sb = new StringBuilder();
+ appendPrefix(sb);
+ // Build child items
+ for (ContentBuilder item : items) {
+ sb.append(item.build());
+ }
+ // Any ad-hoc content goes here
+ sb.append(content);
+ appendSuffix(sb);
+ return sb.toString();
+ }
+
+ /**
+ * Adds the content.
+ *
+ * @param item
+ * the item
+ */
+ public void addContent(ContentBuilder item) {
+ items.add(item);
+ }
+
+ /**
+ * Adds the content.
+ *
+ * @param stringContent
+ * the string content
+ */
+ public void addContent(String stringContent) {
+ content.append(stringContent);
+ }
+
+ /**
+ * Append content as a new line.
+ *
+ * @param stringContent
+ * the string
+ */
+ public void appendLine(String stringContent) {
+ content.append(indent).append(stringContent).append(System.lineSeparator());
+ }
+
+ /**
+ * Append properties.
+ *
+ * @param props
+ * the props
+ */
+ public void appendProperties(Properties props) {
+ @SuppressWarnings("unchecked")
+ Enumeration<String> e = (Enumeration<String>) props.propertyNames();
+ while (e.hasMoreElements()) {
+ String key = e.nextElement();
+ appendValue(key, props.get(key));
+ }
+ }
+
+ /**
+ * Append value.
+ *
+ * @param key
+ * the key
+ * @param value
+ * the value
+ * @return
+ */
+ public ContentBuilder appendValue(String key, Object value) {
+ if (value == null) {
+ return this;
+ }
+
+ addContent(indent + "\t" + key + " ");
+
+ if (value instanceof String) {
+ addStringValue((String) value);
+ } else if (value instanceof Number) {
+ addStringValue(value.toString());
+ } else if (value instanceof List<?>) {
+ boolean first = true;
+ for (Object element : (List<?>) value) {
+ if (!first) {
+ addContent(", ");
+ }
+ addStringValue((String) element);
+ first = false;
+ }
+ } else if (value instanceof Properties) {
+ appendLine("{");
+ appendProperties((Properties) value);
+ appendLine("}");
+ } else {
+ throw new IllegalArgumentException(key);
+ }
+ addContent(System.lineSeparator());
+
+ return this;
+ }
+
+ /**
+ * Adds the string value.
+ *
+ * @param value
+ * the value
+ */
+ private void addStringValue(String value) {
+ addContent("'" + value + "'");
+ }
+
+ /**
+ * Append suffix.
+ *
+ * @param sb
+ * the sb
+ */
+ private void appendSuffix(StringBuilder sb) {
+ if (contentName != null) {
+ sb.append(indent).append("}").append(System.lineSeparator());
+ }
+ }
+
+ /**
+ * Append prefix.
+ *
+ * @param sb
+ * the sb
+ */
+ private void appendPrefix(StringBuilder sb) {
+ if (contentName != null) {
+ sb.append(indent);
+ sb.append(contentName);
+ sb.append(" {").append(System.lineSeparator());
+ }
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/EntityBuilder.java b/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/EntityBuilder.java
new file mode 100644
index 0000000..166ae50
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/EntityBuilder.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.ruledriven.configuration.build;
+
+import java.util.Properties;
+import org.onap.aai.validation.ruledriven.configuration.EntitySection;
+import org.onap.aai.validation.ruledriven.configuration.RuleSection;
+
+/**
+ * Builder for entity config section
+ *
+ */
+public class EntityBuilder extends ContentBuilder {
+
+ /**
+ * Create an empty entity section
+ */
+ public EntityBuilder() {
+ super("entity");
+ }
+
+ /**
+ * @param auditConfiguration
+ */
+ public EntityBuilder(EntitySection auditConfiguration) {
+ this();
+ appendValue("name", auditConfiguration.getName());
+
+ for (RuleSection rule : auditConfiguration.getRules()) {
+ addContent(new ValidationBuilder(rule).toString());
+ }
+ }
+
+ /**
+ * Add an empty validation section to this entity
+ *
+ * @return
+ */
+ public ValidationBuilder validation() {
+ ValidationBuilder item = new ValidationBuilder();
+ addContent(item);
+ return item;
+ }
+
+ /**
+ * @param props
+ * @return
+ */
+ public ValidationBuilder validation(Properties props) {
+ ValidationBuilder item = validation();
+ item.appendProperties(props);
+ return item;
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/RuleBuilder.java b/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/RuleBuilder.java
new file mode 100644
index 0000000..07fb5b4
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/RuleBuilder.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.build;
+
+import org.onap.aai.validation.ruledriven.configuration.RuleSection;
+
+/**
+ * Builder for rule config section.
+ */
+public class RuleBuilder extends ContentBuilder {
+
+ /**
+ * Instantiates a new rule builder.
+ */
+ public RuleBuilder() {
+ super("rule");
+ }
+
+ /**
+ * Instantiates a new rule builder using the existing rule configuration
+ *
+ * @param ruleConfig
+ * the rule configuration to clone
+ * @param indent
+ * the indent/prefix for the section
+ */
+ public RuleBuilder(RuleSection ruleConfig, String indent) {
+ this();
+ this.indent = indent;
+ if (ruleConfig.isGeneric()) {
+ appendLine(indent + "\t// Generic Rule");
+ }
+ appendValue("name", ruleConfig.getName());
+ appendValue("category", ruleConfig.getCategory());
+ appendValue("description", ruleConfig.getDescription());
+ appendValue("severity", ruleConfig.getSeverity());
+ if (ruleConfig.isGeneric()) {
+ appendLine(indent + "\t// Passing " + ruleConfig.getAttributes());
+ }
+ appendValue("attributes", ruleConfig.getExpressionFieldNames());
+ appendValue("validate", ruleConfig.getExpression());
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/UseRuleBuilder.java b/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/UseRuleBuilder.java
new file mode 100644
index 0000000..fe72bac
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/UseRuleBuilder.java
@@ -0,0 +1,46 @@
+/*
+ * ============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.build;
+
+import org.onap.aai.validation.ruledriven.configuration.RuleSection;
+
+/**
+ * Content Builder for a useRule section
+ *
+ */
+public class UseRuleBuilder extends ContentBuilder {
+
+ /**
+ * Build a useRule section
+ */
+ public UseRuleBuilder() {
+ super("useRule");
+ }
+
+ /**
+ * @param ruleConfig
+ * @param indent
+ */
+ public UseRuleBuilder(RuleSection ruleConfig, String indent) {
+ this();
+ this.indent = indent;
+ appendValue("name", ruleConfig.getName());
+ appendValue("attributes", ruleConfig.getAttributes());
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/ValidationBuilder.java b/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/ValidationBuilder.java
new file mode 100644
index 0000000..44f3c4c
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/configuration/build/ValidationBuilder.java
@@ -0,0 +1,78 @@
+/*
+ * ============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.build;
+
+import org.onap.aai.validation.ruledriven.configuration.RuleSection;
+
+/**
+ * Builder for validation config section
+ *
+ */
+public class ValidationBuilder extends ContentBuilder {
+ /**
+ * Create an empty validation section
+ */
+ public ValidationBuilder() {
+ super("validation");
+ indent = "\t";
+ }
+
+ /**
+ * Create a validation section using the existing rule configuration
+ *
+ * @param ruleConfig
+ */
+ public ValidationBuilder(RuleSection ruleConfig) {
+ this();
+ appendValue("object", ruleConfig.getType());
+ appendValue("objectId", ruleConfig.getObjectId());
+ if (ruleConfig.isGeneric()) {
+ addContent(new UseRuleBuilder(ruleConfig, indent + "\t").toString());
+ } else {
+ addContent(new RuleBuilder(ruleConfig, indent + "\t").toString());
+ }
+ }
+
+ /**
+ * Add a useRule section
+ *
+ * @param name
+ * @return the new useRule section
+ */
+ public UseRuleBuilder useRule(String name) {
+ UseRuleBuilder item = new UseRuleBuilder();
+ item.indent = "\t\t";
+ item.appendValue("name", name);
+ addContent(item);
+ return item;
+ }
+
+ /**
+ * Add a rule section comprising the specified name item
+ *
+ * @param name
+ * @return
+ */
+ public RuleBuilder rule(String name) {
+ RuleBuilder item = new RuleBuilder();
+ item.indent = "\t\t";
+ item.appendValue("name", name);
+ addContent(item);
+ return item;
+ }
+} \ No newline at end of file
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/rule/GroovyRule.java b/src/main/java/org/onap/aai/validation/ruledriven/rule/GroovyRule.java
new file mode 100644
index 0000000..b151f6b
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/rule/GroovyRule.java
@@ -0,0 +1,323 @@
+/*
+ * ============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 groovy.lang.GroovyClassLoader;
+import groovy.lang.GroovyObject;
+import groovy.lang.MetaMethod;
+import groovy.lang.MissingMethodException;
+import groovy.lang.MissingPropertyException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Scanner;
+import java.util.regex.Pattern;
+import org.codehaus.groovy.control.CompilationFailedException;
+import org.codehaus.groovy.runtime.InvokerInvocationException;
+import org.onap.aai.cl.api.Logger;
+import org.onap.aai.validation.logging.LogHelper;
+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.util.StringUtils;
+
+/**
+ * Rule based on a Groovy script
+ *
+ */
+public class GroovyRule implements Rule {
+
+ private static final Logger applicationLogger = LogHelper.INSTANCE;
+
+ /**
+ * Do not allow special characters (e.g. ?) in an attribute name. Hyphens and underscores are accepted.
+ */
+ private static final Pattern ATTRIBUTE_NAME_WHITELIST = Pattern.compile("^[a-zA-Z0-9-_.\\*\\[\\]]*$");
+ private static final Pattern ATTRIBUTE_NAME_BLACKLIST = Pattern.compile("^(|null)$");
+
+ private String errorCategory;
+ private String errorMessage;
+ private String severity;
+ private List<String> attributes;
+ private List<String> attributePaths; // where in the JSON entity to read the attributes from
+
+ private String methodName;
+ private GroovyObject groovyObject;
+ private List<String> originalFields;
+ private String originalExpression;
+ private String groovyExpression; // NOSONAR stored for debugging purposes
+ private boolean ruleIsValid = true;
+ private String name;
+
+
+ /**
+ * @param ruleConfig
+ * @throws InstantiationException
+ * @throws IllegalAccessException
+ * @throws IOException
+ * @throws GroovyConfigurationException
+ */
+ public GroovyRule(RuleSection ruleConfig)
+ throws InstantiationException, IllegalAccessException, IOException, GroovyConfigurationException {
+ setName(ruleConfig.getName());
+ setErrorCategory(ruleConfig.getCategory());
+ setErrorMessage(ruleConfig.getErrorMessage());
+ setSeverity(ruleConfig.getSeverity());
+ setAttributes(ruleConfig.getAttributes());
+ setAttributePaths(ruleConfig.getAttributes());
+
+ this.originalFields = new ArrayList<>();
+ for (String field : ruleConfig.getExpressionFieldNames()) {
+ originalFields.add(StringUtils.stripPrefix(field, "."));
+ }
+
+ Class<?> groovyClass = createRule(ruleConfig.getExpressionFieldNames(), ruleConfig.getExpression());
+
+ if (groovyClass != null) {
+ groovyObject = (GroovyObject) groovyClass.newInstance();
+
+ for (MetaMethod method : groovyObject.getMetaClass().getMethods()) {
+ if (method.getName().startsWith("rule")) {
+ methodName = method.getName();
+ }
+ }
+
+ try {
+ executeWithSampleData();
+ } catch (IllegalArgumentException e) { // NOSONAR
+ if (e.getCause() instanceof InvokerInvocationException
+ && e.getCause().getCause() instanceof MissingMethodException) {
+ applicationLogger
+ .debug("WARNING: Rule \"" + getName() + "\" does not accept \"1\" for all input values");
+ } else {
+ ruleIsValid = false;
+ }
+ }
+ } else {
+ ruleIsValid = false;
+ }
+ }
+
+ public boolean isValid() {
+ return ruleIsValid;
+ }
+
+ /**
+ * Run the rule expression on the specified attribute values
+ *
+ * @param attributeValues
+ * @return
+ */
+ @Override
+ public Boolean execute(AttributeValues attributeValues) {
+ // Obtain the values of each of the attributes to pass into the rule
+ List<Object> valueList = new ArrayList<>();
+ for (String attrName : this.attributePaths) {
+ valueList.add(attributeValues.get(attrName));
+ }
+ Object[] attrValuesArray = valueList.toArray();
+ return execute(attrValuesArray);
+ }
+
+ /**
+ * Apply the rule to some attribute(s)
+ *
+ * @param values
+ *
+ * @param groovyObject an instance/object of a Groovy class that implements one or more rule methods
+ * @return the Boolean result of evaluating the expression
+ */
+ @Override
+ public Boolean execute(Object... values) {
+ Object result = null;
+ try {
+ result = groovyObject.invokeMethod(getRuleMethod(), values);
+ } catch (MissingPropertyException | MissingMethodException | InvokerInvocationException e) {
+ throw new IllegalArgumentException(e);
+ } catch (NullPointerException e) {
+ throw new IllegalArgumentException("Argument is null", e);
+ }
+
+ if (result instanceof Number) {
+ return !result.equals(0);
+ } else {
+ return (Boolean) result;
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "GroovyRule \"" + name + "\" " + attributePaths + " -> " + originalFields + " {" + originalExpression
+ + "}";
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public String getErrorCategory() {
+ return errorCategory;
+ }
+
+ public void setErrorCategory(String errorCategory) {
+ this.errorCategory = errorCategory;
+ }
+
+ @Override
+ public String getErrorMessage() {
+ return errorMessage;
+ }
+
+ public void setErrorMessage(String errorMessage) {
+ this.errorMessage = errorMessage;
+ }
+
+ @Override
+ public String getSeverity() {
+ return severity;
+ }
+
+ public void setSeverity(String severity) {
+ this.severity = severity;
+ }
+
+ @Override
+ public List<String> getAttributePaths() {
+ return attributePaths;
+ }
+
+ private String getRuleMethod() {
+ return methodName;
+ }
+
+ private void setAttributePaths(List<String> attributePaths) {
+ this.attributePaths = attributePaths;
+ }
+
+ private void setAttributes(List<String> attributes) {
+ this.attributes = new ArrayList<>();
+ for (String attribute : attributes) {
+ // Strip any prefixes containing the . character
+ this.attributes.add(attribute.substring(attribute.lastIndexOf('.') + 1));
+ }
+ }
+
+ /**
+ * @param fields
+ * @param expression
+ * @return
+ * @throws IOException
+ * @throws GroovyConfigurationException
+ */
+ private Class<?> createRule(List<String> fields, String expression)
+ throws IOException, GroovyConfigurationException {
+ originalExpression = expression;
+ groovyExpression = expression;
+ String methodParams = "";
+
+ int i = 1;
+ for (String attribute : fields) {
+ if (isValidAttributeName(attribute)) {
+ String fieldName = "field" + i++;
+ methodParams = appendParameter(methodParams, fieldName);
+ // Strip any prefixes from the attribute name in case of JayWay expression attributes.
+ attribute = StringUtils.stripPrefix(attribute, ".");
+ String regex = "\\b" + attribute + "\\b(?!\\()";
+ groovyExpression = groovyExpression.replaceAll(regex, fieldName);
+ } else {
+ ruleIsValid = false;
+ return null;
+ }
+ }
+
+ return loadGroovyClass("def rule(" + methodParams + ") {" + groovyExpression + "}");
+ }
+
+ private String appendParameter(String methodParams, String fieldName) {
+ StringBuilder newParams = new StringBuilder();
+ if (methodParams.length() > 0) {
+ newParams.append(methodParams).append(", ");
+ }
+ newParams.append("Object ").append(fieldName);
+ return newParams.toString();
+ }
+
+ private boolean isValidAttributeName(String attributeName) {
+ if (ATTRIBUTE_NAME_BLACKLIST.matcher(attributeName).matches()) {
+ return false;
+ }
+
+ if (!ATTRIBUTE_NAME_WHITELIST.matcher(attributeName).matches()) {
+ return false;
+ }
+
+ // Make sure that the attribute name is NOT purely a number
+ try (Scanner sc = new Scanner(attributeName.trim())) {
+ if (sc.hasNextInt()) {
+ sc.nextInt(); // Consume the integer
+ return sc.hasNext(); // Name is valid if there is more content
+ }
+ }
+
+ return true; // Not an integer
+ }
+
+ private void executeWithSampleData() {
+ Object[] values = new Object[attributes.size()];
+ int i = 0;
+ for (String attribute : attributes) {
+ if (attribute.contains("[*]")) {
+ values[i++] = Arrays.asList("{}");
+ } else {
+ values[i++] = "1";
+ }
+ }
+ execute(values);
+ }
+
+ /**
+ * Load and parse a Groovy script to create an anonymous class
+ *
+ * @param script a file containing the Groovy scripting language
+ * @return the Java Class for accessing the Groovy methods
+ * @throws IOException
+ * @throws GroovyConfigurationException
+ */
+ @SuppressWarnings("rawtypes")
+ private static Class loadGroovyClass(String expression) throws IOException, GroovyConfigurationException {
+ ClassLoader parent = GroovyRule.class.getClassLoader();
+ GroovyClassLoader loader = new GroovyClassLoader(parent);
+ Class groovyClass;
+ try {
+ groovyClass = loader.parseClass(expression);
+ } catch (CompilationFailedException e) {
+ throw new GroovyConfigurationException(e);
+ } finally {
+ loader.close();
+ }
+ return groovyClass;
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/ruledriven/rule/Rule.java b/src/main/java/org/onap/aai/validation/ruledriven/rule/Rule.java
new file mode 100644
index 0000000..1196db0
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/ruledriven/rule/Rule.java
@@ -0,0 +1,81 @@
+/*
+ * ============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 java.util.List;
+import org.onap.aai.validation.reader.data.AttributeValues;
+
+/**
+ * A rule that accepts one or more attributes and returns a Boolean result (when executed)
+ */
+public interface Rule {
+
+ /**
+ * Gets the name of the rule
+ *
+ * @return the name
+ */
+ String getName();
+
+ /**
+ * Gets the error message.
+ *
+ * @return the error message
+ */
+ String getErrorMessage();
+
+ /**
+ * Gets the error category.
+ *
+ * @return the error category
+ */
+ String getErrorCategory();
+
+ /**
+ * Gets the severity.
+ *
+ * @return the severity
+ */
+ String getSeverity();
+
+ /**
+ * Gets the paths to the attributes to pass to the rule
+ *
+ * @return the attribute paths
+ */
+ List<String> getAttributePaths();
+
+ /**
+ * Execute the rule.
+ *
+ * @param values
+ * the attribute values to pass to the rule
+ * @return a boolean representing the rule evaluation (meaning success/failure)
+ */
+ Boolean execute(AttributeValues values);
+
+ /**
+ * Execute the rule.
+ *
+ * @param values
+ * the attribute values to pass to the rule
+ * @return a boolean representing the rule evaluation (meaning success/failure)
+ */
+ Boolean execute(Object... values);
+
+}
diff --git a/src/main/java/org/onap/aai/validation/services/EventPollingService.java b/src/main/java/org/onap/aai/validation/services/EventPollingService.java
new file mode 100644
index 0000000..8b38031
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/services/EventPollingService.java
@@ -0,0 +1,121 @@
+/*
+ * ============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 java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import javax.inject.Inject;
+
+import org.springframework.stereotype.Service;
+
+import org.onap.aai.event.client.DMaaPEventConsumer;
+import org.onap.aai.validation.config.TopicConfig;
+import org.onap.aai.validation.config.TopicConfig.Topic;
+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.logging.ApplicationMsgs;
+import org.onap.aai.validation.logging.LogHelper;
+import org.onap.aai.validation.logging.LogHelper.MdcParameter;
+import com.google.common.collect.Iterables;
+
+/**
+ * Event Polling Service
+ *
+ */
+@Service
+public class EventPollingService implements Runnable {
+
+ private static final LogHelper applicationLogger = LogHelper.INSTANCE;
+
+ private List<DMaaPEventConsumer> consumers;
+
+ private ValidationController validationController;
+
+ /**
+ * Instantiates an EventPollingService instance using the supplied configuration.
+ *
+ * @param topicConfig
+ * @throws ValidationServiceException
+ */
+ @Inject
+ public EventPollingService(TopicConfig topicConfig) throws ValidationServiceException {
+ consumers = new ArrayList<>();
+ for (Topic topic : topicConfig.getConsumerTopics()) {
+ try {
+ consumers.add(new DMaaPEventConsumer(topic.getHost(), topic.getName(), topic.getUsername(),
+ topic.getPassword(), topic.getConsumerGroup(), topic.getConsumerId(),
+ DMaaPEventConsumer.DEFAULT_MESSAGE_WAIT_TIMEOUT, DMaaPEventConsumer.DEFAULT_MESSAGE_LIMIT,
+ topic.getTransportType()));
+ } catch (MalformedURLException e) {
+ throw new ValidationServiceException(ValidationServiceError.EVENT_CLIENT_CONSUMER_INIT_ERROR, e);
+ }
+ }
+ }
+
+ @Override
+ public void run() {
+ applicationLogger.info(ApplicationMsgs.POLL_EVENTS);
+ try {
+ for (DMaaPEventConsumer consumer : consumers) {
+ for (String event : consumeEvents(consumer)) {
+ // The event does not have a transaction ID so create one for logging purposes
+ applicationLogger.setContextValue(MdcParameter.REQUEST_ID, UUID.randomUUID().toString());
+ validationController.execute(event, "topic");
+ }
+ }
+ } catch (Exception e) {
+ // This could be a temporary issue, so the exception is swallowed
+ applicationLogger.error(ApplicationMsgs.INVOKE_EVENT_CONSUMER_ERROR, e);
+ } catch (Throwable t) { // NOSONAR
+ // E.g. We may catch an IllegalArgumentException caused by invalid configuration
+ applicationLogger.error(ApplicationMsgs.INVOKE_EVENT_CONSUMER_ERROR, t);
+
+ // Add these details to the status report available via the controller
+ validationController.recordThrowable(t);
+
+ // For non IO exceptions, rethrow in order to cause the executor to stop scheduling
+ throw t;
+ } finally {
+ applicationLogger.clearContextValue(MdcParameter.REQUEST_ID);
+ }
+ }
+
+ /* Getters and Setters for Spring injection */
+
+ public ValidationController getValidationController() {
+ return validationController;
+ }
+
+ public void setValidationController(ValidationController validationController) throws ValidationServiceException {
+ this.validationController = validationController;
+ // Instruct the validation controller to load and validate its configuration
+ this.validationController.initialise();
+ }
+
+ private Iterable<String> consumeEvents(DMaaPEventConsumer consumer) throws Exception {
+ applicationLogger.clearContextValue(MdcParameter.REQUEST_ID);
+ applicationLogger.debug("Querying consumer " + consumer);
+ Iterable<String> events = consumer.consume();
+ applicationLogger.info(ApplicationMsgs.NUMBER_OF_MESSAGES_CONSUMED, Integer.toString(Iterables.size(events)));
+ return events;
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/services/InfoService.java b/src/main/java/org/onap/aai/validation/services/InfoService.java
new file mode 100644
index 0000000..5f2b625
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/services/InfoService.java
@@ -0,0 +1,57 @@
+/*
+ * ============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 org.onap.aai.validation.controller.ValidationController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Information Service for the Validation Controller. Return status details to the caller.
+ *
+ */
+@RestController
+@RequestMapping("/services/validation-service/v1/core/core-service")
+public class InfoService {
+
+ @Autowired
+ private ValidationController validationController;
+
+ public ValidationController getValidationController() {
+ return validationController;
+ }
+
+ public void setValidationController(ValidationController validationController) {
+ this.validationController = validationController;
+ }
+
+ /**
+ * @param format is an optional setting - html requests an HTML format
+ * @return a formatted status report
+ */
+ @RequestMapping(value = "/info", method = RequestMethod.GET, produces = "text/plain")
+ @ResponseBody
+ public String getInfo() {
+ validationController.incrementInfoCount();
+ return "Status: Up\n" + validationController.statusReport().toString() + "\n";
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/services/RequestHeaders.java b/src/main/java/org/onap/aai/validation/services/RequestHeaders.java
new file mode 100644
index 0000000..1d12600
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/services/RequestHeaders.java
@@ -0,0 +1,53 @@
+/*
+ * ============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 org.springframework.http.HttpHeaders;
+
+/**
+ * Bean to represent the ONAP request/transaction IDs required for EELF logging.
+ *
+ */
+public class RequestHeaders {
+
+ // ONAP request ID a.k.a. transaction ID or correlation ID
+ public static final String HEADER_REQUEST_ID = "X-ECOMP-RequestID";
+ public static final String HEADER_SERVICE_INSTANCE_ID = "X-ECOMP-ServiceInstanceID";
+
+ private String requestId;
+ private String instanceId;
+
+ public RequestHeaders(HttpHeaders headers) {
+ requestId = headers.getFirst(RequestHeaders.HEADER_REQUEST_ID);
+ instanceId = headers.getFirst(RequestHeaders.HEADER_SERVICE_INSTANCE_ID);
+ }
+
+ public String getRequestId() {
+ return requestId;
+ }
+
+ public String getInstanceId() {
+ return instanceId;
+ }
+
+ @Override
+ public String toString() {
+ return "RequestHeaders [requestId=" + requestId + ", instanceId=" + instanceId + "]";
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/services/ValidateService.java b/src/main/java/org/onap/aai/validation/services/ValidateService.java
new file mode 100644
index 0000000..4ef5e7f
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/services/ValidateService.java
@@ -0,0 +1,77 @@
+/*
+ * ============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 javax.servlet.http.HttpServletRequest;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Validates an event (containing details of an entity) and synchronously returns the details of the validation
+ * result(s) including any violations that were detected. Note that in the current version there is expected to be one
+ * and only one validation result per event.
+ */
+@RestController
+@RequestMapping("/services/validation-service/v1/app")
+public interface ValidateService { // NOSONAR
+ /**
+ * Validate an event and, if successful, return the result(s) in JSON format. Note that not every event is validated
+ * and so the set of results may be empty. In the event of an error/exception then plain text is returned containing
+ * the exception details.
+ *
+ * <h4>The HTTP message body must be comprised of a single JSON object containing the following members (nested JSON
+ * elements)</h4> <B>event-header</B> a JSON object which contains the following members:
+ * <ul>
+ * <li><B>domain</B> the value must match with the event domain expected by the Validation Service
+ * <li><B>action</B> the value must not be present in the list of excluded event actions (default list: DELETE)</li>
+ * <li><B>event-type</B> the value must match with one of the expected event types (either for rule-driven or for
+ * model-driven validation)</li>
+ * <li><B>top-entity-type</B> indicating the type of the entity member (see below)</li>
+ * <li><B>entity-type</B> the value must match with an A&AI entity defined by the OXM model. This value identifies
+ * the object to be validated</li>
+ * <li><B>entity-link</B> the value indicates the source of the entity. This is expected to begin with the text
+ * https://host/aai/vX/</li>
+ * </ul>
+ * <B> entity</B> a JSON object representing the top-level entity. This object must contain the single entity
+ * instance to be validated, either
+ * <ul>
+ * <li>contained by a parent entity of a different type (indicated by top-entity-type)</li>
+ * <li>or as a stand-alone JSON object (entity-type will have the same value as top-entity-type)</li>
+ * </ul>
+ *
+ * @param event a JSON object representing an event
+ * @return an HTTP Response containing either a JSON array of ValidationResult objects or a plain-text error message
+ *
+ * @responseMessage 200 Success
+ * @responseMessage 400 Bad Request
+ * @responseMessage 500 Internal Server Error
+ *
+ */
+ @RequestMapping(value = "/validate", method = RequestMethod.POST, produces = {"application/json", "text/plain"})
+ @ResponseBody
+ public ResponseEntity<String> validate(@RequestHeader HttpHeaders headers, HttpServletRequest servletRequest,
+ @RequestBody String event);
+
+ public ResponseEntity<String> validate(String event);
+}
diff --git a/src/main/java/org/onap/aai/validation/services/ValidateServiceImpl.java b/src/main/java/org/onap/aai/validation/services/ValidateServiceImpl.java
new file mode 100644
index 0000000..54f8b5a
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/services/ValidateServiceImpl.java
@@ -0,0 +1,160 @@
+/*
+ * ============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 java.util.Optional;
+import java.util.UUID;
+import javax.inject.Inject;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
+import org.onap.aai.auth.AAIMicroServiceAuth;
+import org.onap.aai.validation.controller.ValidationController;
+import org.onap.aai.validation.controller.ValidationController.Result;
+import org.onap.aai.validation.logging.ApplicationMsgs;
+import org.onap.aai.validation.logging.LogHelper;
+import org.onap.aai.validation.logging.LogHelper.MdcParameter;
+import org.onap.aai.validation.logging.LogHelper.StatusCode;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.servlet.HandlerMapping;
+
+/**
+ * Validation Service HTTP interface implementation.
+ *
+ */
+public class ValidateServiceImpl implements ValidateService {
+
+ private static final LogHelper applicationLogger = LogHelper.INSTANCE;
+
+ /**
+ * This message is returned in the HTTP Response when an event is filtered (deliberately not validated).
+ */
+ public static final String DEFAULT_MESSAGE_FOR_FILTERED_EVENTS =
+ "No validation results available. The action value may have caused the event to be filtered. Otherwise the event type or domain may be invalid.";
+
+ /**
+ * Events are passed to the controller which will execute the validation(s).
+ */
+ private ValidationController controller;
+ private AAIMicroServiceAuth aaiMicroServiceAuth;
+
+ /**
+ * @param controller
+ */
+ @Inject
+ public ValidateServiceImpl(final ValidationController controller, final AAIMicroServiceAuth aaiMicroServiceAuth) {
+ this.controller = controller;
+ this.aaiMicroServiceAuth = aaiMicroServiceAuth;
+ }
+
+ @Override
+ public ResponseEntity<String> validate(@RequestHeader HttpHeaders headers, HttpServletRequest servletRequest,
+ @RequestBody String event) {
+ applicationLogger.startAudit(headers, servletRequest);
+ applicationLogger.info(ApplicationMsgs.MESSAGE_VALIDATION_REQUEST, headers + event);
+
+ String path = (String) servletRequest.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
+
+ if (applicationLogger.isDebugEnabled()) {
+ applicationLogger.debug(String.format(
+ "Received request. Path \"%s\", HttpHeaders \"%s\", ServletRequest \"%s\", Request Body \"%s\"",
+ path, headers, servletRequest.getMethod(), event));
+ }
+
+ // Additional name/value pairs according to EELF guidelines
+ applicationLogger.setContextValue("Protocol", "https");
+ applicationLogger.setContextValue("Method", "POST");
+ applicationLogger.setContextValue("Path", path);
+ applicationLogger.setContextValue("Query", servletRequest.getQueryString());
+
+ RequestHeaders requestHeaders = new RequestHeaders(headers);
+ String requestId = requestHeaders.getRequestId();
+ if (requestId == null) {
+ requestId = UUID.randomUUID().toString();
+ applicationLogger.info(ApplicationMsgs.MISSING_REQUEST_ID, requestId);
+ applicationLogger.setContextValue(MdcParameter.REQUEST_ID, requestId);
+ }
+
+ ResponseEntity<String> response;
+
+ try {
+ boolean authorized =
+ aaiMicroServiceAuth.validateRequest(servletRequest, servletRequest.getMethod(), "validate");
+
+ if (!authorized) {
+ response = ResponseEntity.status(HttpStatus.UNAUTHORIZED)
+ .body("User not authorized to perform the operation.");
+ } else {
+ response = validate(event);
+ }
+ } catch (Exception e) {
+ applicationLogger.error(ApplicationMsgs.PROCESS_REQUEST_ERROR, e);
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(
+ "Error while processing request. Please check the validation service logs for more details.\n");
+ }
+
+ StatusCode statusDescription;
+ int statusCode = response.getStatusCodeValue();
+ if (Response.Status.Family.familyOf(statusCode).equals(Response.Status.Family.SUCCESSFUL)) {
+ statusDescription = StatusCode.COMPLETE;
+ } else {
+ statusDescription = StatusCode.ERROR;
+ }
+ applicationLogger.logAudit(statusDescription, Integer.toString(statusCode),
+ response.getStatusCode().getReasonPhrase(), response.getBody());
+
+ return response;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.aai.validation.services.ValidateService#validate(java.lang.String)
+ */
+ @Override
+ public ResponseEntity<String> validate(String event) {
+
+ try {
+ // Attempt to validate the event
+ Result result = controller.execute(event, "http");
+
+ if (result.validationSuccessful()) {
+ return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON)
+ .body(result.getValidationResultAsJson());
+ } else {
+ Optional<String> errorText = result.getErrorText();
+ if (!errorText.isPresent() || errorText.get().isEmpty()) {
+ errorText = Optional.of(DEFAULT_MESSAGE_FOR_FILTERED_EVENTS);
+ } else {
+ applicationLogger.error(ApplicationMsgs.MALFORMED_REQUEST_ERROR, event);
+ }
+ return ResponseEntity.badRequest().body(errorText.orElse(""));
+ }
+ } catch (Exception e) {
+ // Unchecked runtime exception - this is intended to catch potential programming errors.
+ applicationLogger.error(ApplicationMsgs.PROCESS_REQUEST_ERROR, e);
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(
+ "Error while processing request. Please check the validation service logs for more details.\n" + e);
+ }
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/servlet/StartupServlet.java b/src/main/java/org/onap/aai/validation/servlet/StartupServlet.java
new file mode 100644
index 0000000..01fdc31
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/servlet/StartupServlet.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.servlet;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+
+import org.onap.aai.cl.api.Logger;
+import org.onap.aai.validation.config.TopicAdminConfig;
+import org.onap.aai.validation.logging.ApplicationMsgs;
+import org.onap.aai.validation.logging.LogHelper;
+import org.onap.aai.validation.services.EventPollingService;
+import org.springframework.stereotype.Service;
+
+/**
+ * Main application service
+ *
+ */
+@Service
+public class StartupServlet {
+
+ private static final Logger applicationLogger = LogHelper.INSTANCE;
+
+ private static final long DEFAULT_POLLING_INTERVAL = 10;
+
+ private final EventPollingService eventPollingService;
+ private final TopicAdminConfig topicAdminConfig;
+
+ /**
+ * @param eventPollingService
+ * @param topicAdminConfig
+ */
+ @Inject
+ public StartupServlet(EventPollingService eventPollingService, TopicAdminConfig topicAdminConfig) {
+ this.eventPollingService = eventPollingService;
+ this.topicAdminConfig = topicAdminConfig;
+ }
+
+ /**
+ * Called from Spring
+ */
+ @PostConstruct
+ public void init() {
+ applicationLogger.info(ApplicationMsgs.STARTUP_SERVLET_INIT);
+
+ // Schedule a polling service if consuming is enabled.
+ boolean consumingEnabled = topicAdminConfig.isConsumeEnable();
+ if (consumingEnabled) {
+ Long consumerPollingIntervalSeconds = topicAdminConfig.getConsumePollingIntervalSeconds();
+
+ long interval;
+ if (consumerPollingIntervalSeconds == null) {
+ applicationLogger.info(ApplicationMsgs.POLLING_INTERVAL_CONFIG_NOT_PRESENT,
+ Long.toString(DEFAULT_POLLING_INTERVAL));
+ interval = DEFAULT_POLLING_INTERVAL;
+ } else {
+ interval = consumerPollingIntervalSeconds;
+ }
+
+ applicationLogger.info(ApplicationMsgs.POLLING_FOR_EVENTS, Long.toString(interval));
+ Executors.newSingleThreadScheduledExecutor().scheduleWithFixedDelay(eventPollingService, 0, interval,
+ TimeUnit.SECONDS);
+ } else {
+ applicationLogger.info(ApplicationMsgs.POLLING_DISABLED);
+ }
+
+ applicationLogger.info(ApplicationMsgs.STARTUP_SERVLET_INIT_SUCCESS);
+ }
+
+ public EventPollingService getEventPollingService() {
+ return eventPollingService;
+ }
+
+ public TopicAdminConfig getTopicAdminConfig() {
+ return topicAdminConfig;
+ }
+}
diff --git a/src/main/java/org/onap/aai/validation/util/GsonUtil.java b/src/main/java/org/onap/aai/validation/util/GsonUtil.java
new file mode 100644
index 0000000..f6525c8
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/util/GsonUtil.java
@@ -0,0 +1,124 @@
+/*
+ * ============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 com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonToken;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.Optional;
+
+/**
+ * Static utility class
+ *
+ */
+public class GsonUtil {
+
+ /**
+ * All methods are static.
+ */
+ private GsonUtil() {
+ // Do not instantiate
+ }
+
+ /**
+ * Tell Gson how to handle Optional fields. This factory builds a Type Adapter for a class wrapped with Optional
+ *
+ */
+ public static class OptionalTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Override
+ public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
+ Class<T> rawType = (Class<T>) type.getRawType();
+ if (rawType != Optional.class) {
+ return null;
+ }
+ final ParameterizedType parameterizedType = (ParameterizedType) type.getType();
+ final Type actualType = parameterizedType.getActualTypeArguments()[0];
+ return new OptionalTypeAdapter(gson.getAdapter(TypeToken.get(actualType)));
+ }
+ }
+
+ /**
+ * Implementation of the Optional Type Adapter
+ *
+ * @param <E>
+ */
+ public static class OptionalTypeAdapter<E> extends TypeAdapter<Optional<E>> {
+
+ private final TypeAdapter<E> adapter;
+
+ public static final TypeAdapterFactory FACTORY = new OptionalTypeAdapterFactory();
+
+ /**
+ * @param adapter
+ */
+ public OptionalTypeAdapter(TypeAdapter<E> adapter) {
+ this.adapter = adapter;
+ }
+
+ @Override
+ public void write(JsonWriter out, Optional<E> value) throws IOException {
+ if (value != null && value.isPresent()) { // NOSONAR
+ adapter.write(out, value.get());
+ } else {
+ boolean nullsAllowed = out.getSerializeNulls();
+ if (nullsAllowed) {
+ out.setSerializeNulls(false);
+ }
+ out.nullValue();
+ if (nullsAllowed) {
+ out.setSerializeNulls(true);
+ }
+ }
+ }
+
+ @Override
+ public Optional<E> read(JsonReader in) throws IOException {
+ final JsonToken peek = in.peek();
+ if (peek != JsonToken.NULL) {
+ return Optional.ofNullable(adapter.read(in));
+ }
+ return Optional.empty();
+ }
+
+ }
+
+ /**
+ * @return a new GsonBuilder with standard settings
+ */
+ public static GsonBuilder createGsonBuilder() {
+ return new GsonBuilder().disableHtmlEscaping().serializeNulls().excludeFieldsWithoutExposeAnnotation()
+ .registerTypeAdapterFactory(OptionalTypeAdapter.FACTORY);
+ }
+
+ /**
+ * @return a new Gson instance
+ */
+ public static Gson createGson() {
+ return createGsonBuilder().create();
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/util/JsonUtil.java b/src/main/java/org/onap/aai/validation/util/JsonUtil.java
new file mode 100644
index 0000000..910eb63
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/util/JsonUtil.java
@@ -0,0 +1,94 @@
+/*
+ * ============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 com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import java.util.Map;
+
+/**
+ * Wrapper to hide the actual JSON API.
+ */
+public class JsonUtil {
+
+ // General purpose. Excludes null values.
+ private static final Gson gsonDefault = new Gson();
+
+ // Only serialises fields with the Expose annotation
+ private static final Gson gsonForAnnotatedClasses = GsonUtil.createGson();
+
+ /**
+ * Purely a static class.
+ */
+ private JsonUtil() {
+ // Deliberately empty
+ }
+
+ /**
+ * Serialise the annotated object to a JSON string.
+ *
+ * @param obj
+ * the object to serialise
+ * @return the JSON representation of the object
+ */
+ public static String toJson(Object obj) {
+ return gsonForAnnotatedClasses.toJson(obj);
+ }
+
+ /**
+ * Deserialise the annotated object from a JSON string.
+ *
+ * @param <T>
+ * the type of the object
+ * @param json
+ * the JSON string
+ * @param classOfT
+ * the class of type T
+ * @return a new object instance
+ */
+ public static <T> T toAnnotatedClassfromJson(String json, Class<T> classOfT) {
+ return gsonForAnnotatedClasses.fromJson(json, classOfT);
+ }
+
+ /**
+ * Deserialise the object from a JSON string.
+ *
+ * @param <T>
+ * the type of the object
+ * @param json
+ * the JSON string
+ * @param classOfT
+ * the class of type T
+ * @return a new object instance
+ */
+ public static <T> T fromJson(String json, Class<T> classOfT) {
+ return gsonDefault.fromJson(json, classOfT);
+ }
+
+ /**
+ * To json element.
+ *
+ * @param map
+ * the map
+ * @return the json element
+ */
+ public static JsonElement toJsonElement(Map<String, Object> map) {
+ return gsonForAnnotatedClasses.toJsonTree(map).getAsJsonObject();
+ }
+
+}
diff --git a/src/main/java/org/onap/aai/validation/util/StringUtils.java b/src/main/java/org/onap/aai/validation/util/StringUtils.java
new file mode 100644
index 0000000..d50b5bf
--- /dev/null
+++ b/src/main/java/org/onap/aai/validation/util/StringUtils.java
@@ -0,0 +1,100 @@
+/*
+ * ============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 java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+import org.onap.aai.cl.api.Logger;
+import org.onap.aai.validation.exception.ValidationServiceError;
+import org.onap.aai.validation.exception.ValidationServiceException;
+import org.onap.aai.validation.logging.ApplicationMsgs;
+import org.onap.aai.validation.logging.LogHelper;
+
+/**
+ * Utility class for String manipulation.
+ */
+public class StringUtils {
+
+ private static final Logger applicationLogger = LogHelper.INSTANCE;
+
+ /**
+ * All methods are static.
+ */
+ private StringUtils() {
+ // Do not instantiate
+ }
+
+ /**
+ * Utility method to strip a prefix or set of prefixes (identified by a delimiter sequence) from the string. This is
+ * achieved by finding the index of the last prefix delimiter in the string and removing all characters before and
+ * including this index.
+ *
+ * @param string the String to strip prefixes from
+ * @param prefixDelimiter the String that acts as the delimiter for the prefix(es)
+ * @return the String minus the prefixes
+ */
+ public static String stripPrefix(String string, String prefixDelimiter) {
+ return string.contains(prefixDelimiter)
+ ? string.substring(string.lastIndexOf(prefixDelimiter) + prefixDelimiter.length()) : string;
+ }
+
+ /**
+ * Strips a prefix identified by a delimiter. This is achieved by splitting the string in two around matches of the
+ * first occurrence of the given regular expression.
+ *
+ * @param string a String from which to strip a prefix
+ * @param regex the delimiting regular expression
+ * @return
+ * @throws ValidationServiceException If there is a problem with the provided regular expression.
+ */
+ public static String stripPrefixRegex(String string, String regex) throws ValidationServiceException {
+ String[] strings = validParameters(string, regex) ? string.split(regex, 2) : new String[0];
+ return strings.length == 2 ? strings[1] : string;
+ }
+
+ /**
+ * Process a list of strings and strip the given suffix from each string in the list.
+ *
+ * @param stringList a list of strings
+ * @param suffix a suffix to be removed from the strings
+ * @return stripped list of strings.
+ */
+ public static List<String> stripSuffix(List<String> stringList, String suffix) {
+ List<String> result = new ArrayList<>();
+ for (String str : stringList) {
+ String stripped = str.endsWith(suffix) ? str.substring(0, str.indexOf(suffix)) : str;
+ result.add(stripped);
+ }
+ return result;
+ }
+
+ private static boolean validParameters(String string, String regex) throws ValidationServiceException {
+ if (string != null && !string.isEmpty() && regex != null && !regex.isEmpty()) {
+ try {
+ Pattern.compile(regex);
+ return true;
+ } catch (PatternSyntaxException e) {
+ applicationLogger.error(ApplicationMsgs.STRING_UTILS_INVALID_REGEX, regex);
+ throw new ValidationServiceException(ValidationServiceError.STRING_UTILS_INVALID_REGEX, e, regex);
+ }
+ }
+ return false;
+ }
+}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
new file mode 100644
index 0000000..44df999
--- /dev/null
+++ b/src/main/resources/application.properties
@@ -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=====================================================
+
+# Note that the start.sh script sets the following System Properties
+# We provide default values here for testing purposes
+APP_HOME=.
+CONFIG_HOME=appconfig-local
+com.att.eelf.logging.path=src/main/resources
+com.att.eelf.logging.file=logback.xml
+logback.configurationFile=${com.att.eelf.logging.path}/${com.att.eelf.logging.file}
+
+schemaIngestPropLoc=${CONFIG_HOME}/schemaIngest.properties
+
+server.port=9501
+server.ssl.client-auth=want
+server.ssl.key-store=${CONFIG_HOME}/auth/tomcat_keystore
+# Work-around for missing Java certificates file "cacerts". This default value should be overridden.
+server.ssl.trust-store=${CONFIG_HOME}/auth/tomcat_keystore
+
+server.tomcat.max-threads=200
+# The minimum number of threads always kept alive
+server.tomcat.min-spare-threads=25
+
+# Spring Boot logging
+logging.config=${logback.configurationFile}
+
+consumer.topic.names=poa-rule-validation
+publisher.topic.names=poa-audit-result
+
+topics.properties.location=${CONFIG_HOME}/topics/
+
diff --git a/src/main/resources/event-reader.properties b/src/main/resources/event-reader.properties
new file mode 100644
index 0000000..a064c39
--- /dev/null
+++ b/src/main/resources/event-reader.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=====================================================
+
+# Event relative paths.
+event.domain.path=$.event-header.domain
+event.action.path=$.event-header.action
+event.type.path=$.event-header.event-type
+event.entity.type.path=$.event-header.entity-type
+event.entity.type.top.path=$.event-header.top-entity-type
+event.entity.link.path=$.event-header.entity-link
+event.entity.link.delimiter=\/aai\/v[0-9]*\/
+event.entity.path=$.entity
+event.entity.nested.path=$.entity..{0}[*]
+
+# Entity relative paths. The JSON is the entity.
+# Comma separated list of paths to cope with different entity JSON formats.
+entity.id.path=$.{0},$.vertex.properties.{0}
+entity.resource.version.path=$.resource-version,$.vertex.properties.resource-version \ No newline at end of file
diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml
new file mode 100644
index 0000000..01861c1
--- /dev/null
+++ b/src/main/resources/logback.xml
@@ -0,0 +1,179 @@
+<?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="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() &lt; 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/main/resources/validation-service-beans.xml b/src/main/resources/validation-service-beans.xml
new file mode 100644
index 0000000..4482c6e
--- /dev/null
+++ b/src/main/resources/validation-service-beans.xml
@@ -0,0 +1,204 @@
+<?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-4.2.xsd">
+
+ <bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor" />
+
+ <!-- ////////////////////////////////////////////////////////////////// -->
+ <!-- PROPERTY AND CONFIGURATION FILES -->
+ <!-- ////////////////////////////////////////////////////////////////// -->
+ <context:property-placeholder location="classpath:event-reader.properties" ignore-unresolvable="true" />
+ <context:property-placeholder location="file:${CONFIG_HOME}/aai-environment.properties" ignore-unresolvable="true" />
+ <context:property-placeholder location="file:${CONFIG_HOME}/validation-service.properties" ignore-unresolvable="true" />
+ <context:property-placeholder location="file:${CONFIG_HOME}/validation-service-auth.properties" ignore-unresolvable="true" />
+ <context:property-placeholder location="file:${CONFIG_HOME}/rule-indexing.properties" ignore-unresolvable="true" ignore-resource-not-found="true" />
+ <context:property-placeholder location="file:${schemaIngestPropLoc}" ignore-unresolvable="true" />
+
+ <bean id="mappingFile" class="org.apache.commons.io.IOUtils" factory-method="toString">
+ <constructor-arg value="file:${APP_HOME}/bundleconfig/etc/appprops/model-instance-mapping.json_conf" type="java.io.InputStream" />
+ </bean>
+
+ <!-- ////////////////////////////////////////////////////////////////// -->
+ <!-- CONFIG BEANS -->
+ <!-- ////////////////////////////////////////////////////////////////// -->
+ <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="entityLinkDelimiter" value="${event.entity.link.delimiter}" />
+ <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>
+
+ <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="topicAdminConfig" class="org.onap.aai.validation.config.TopicAdminConfig">
+ <property name="publishEnable" value="${topic.publish.enable}" />
+ <property name="publishRetries" value="${topic.publish.retries}" />
+ <property name="consumeEnable" value="${topic.consume.enable}" />
+ <property name="consumePollingIntervalSeconds" value="${topic.consume.polling.interval.seconds}" />
+ </bean>
+
+ <bean id="validationControllerConfig" class="org.onap.aai.validation.config.ValidationControllerConfig">
+ <property name="eventDomain" value="${event.domain}" />
+ <property name="excludedEventActions" value="#{'${event.action.exclude}'.split(',')}" />
+ <property name="eventTypeRule" value="#{'${event.type.rule}'.split(',')}" />
+ <property name="eventTypeModel" value="#{'${event.type.model}'.split(',')}" />
+ </bean>
+
+ <bean id="ruleIndexingConfig" class="org.onap.aai.validation.config.RuleIndexingConfig">
+ <property name="indexedEvents" value="#{'${rule.indexing.events}'.split(',')}" />
+ <property name="excludedOxmValidationEvents" value="#{'${rule.indexing.exclude.oxm.validation}'.split(',')}" />
+ <property name="indexAttributes" value="#{'${rule.indexing.key.attributes}'.split(',')}" />
+ <property name="defaultIndexKey" value="${rule.indexing.default.key}" />
+ </bean>
+
+ <bean id="validationServiceAuthConfig" class="org.onap.aai.validation.config.ValidationServiceAuthConfig">
+ <property name="authenticationDisable" value="${auth.authentication.disable}" />
+ <property name="authPolicyFile" value="${auth.policy.file}" />
+ </bean>
+
+ <!-- ////////////////////////////////////////////////////////////////// -->
+ <!-- READER BEANS -->
+ <!-- ////////////////////////////////////////////////////////////////// -->
+ <bean id="schemaLocationsBean" class="org.onap.aai.setup.SchemaLocationsBean">
+ <property name="nodeDirectory" value="${nodeDir}" />
+ <property name="edgeDirectory" value="${edgeDir}" />
+ </bean>
+
+ <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="V${aai.oxm.version}" />
+ </bean>
+
+ <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 -->
+ <!-- ////////////////////////////////////////////////////////////////// -->
+ <bean id="messagePublisher" class="org.onap.aai.validation.publisher.ValidationEventPublisher">
+ <constructor-arg ref="topicAdminConfig" />
+ </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>
+
+ <bean id="eventPollingService" class="org.onap.aai.validation.services.EventPollingService">
+ <property name="validationController" ref="validationController" />
+ </bean>
+
+ <bean id="startupServlet" class="org.onap.aai.validation.servlet.StartupServlet" init-method="init">
+ <constructor-arg ref="eventPollingService" />
+ <constructor-arg ref="topicAdminConfig" />
+ </bean>
+
+ <bean id="rulesConfigurationPath" class="java.nio.file.Paths" factory-method="get">
+ <constructor-arg value="${APP_HOME}/bundleconfig/etc/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 ref="ruleIndexingConfig"/>
+ </bean>
+
+ <bean id="restClient" class="org.onap.aai.validation.data.client.RestClient">
+ <constructor-arg ref="restConfig" />
+ </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>
+
+ <bean id="aaiMicroServiceAuth" class="org.onap.aai.auth.AAIMicroServiceAuth">
+ <constructor-arg ref="validationServiceAuthConfig" />
+ </bean>
+
+ <bean id="validateService" class="org.onap.aai.validation.services.ValidateServiceImpl">
+ <constructor-arg ref="validationController" />
+ <constructor-arg ref="aaiMicroServiceAuth" />
+ </bean>
+</beans>
diff --git a/src/main/resources/validation-service-logging-resources.properties b/src/main/resources/validation-service-logging-resources.properties
new file mode 100644
index 0000000..2cdc2e8
--- /dev/null
+++ b/src/main/resources/validation-service-logging-resources.properties
@@ -0,0 +1,178 @@
+# ============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=====================================================
+#
+#Resource key=Error Code|Message text|Resolution text |Description text
+#######
+#Newlines can be utilized to add some clarity ensuring continuing line
+#has atleast one leading space
+#ResourceKey=\
+# ERR0000E\
+# Sample error msg txt\
+# Sample resolution msg\
+# Sample description txt
+#
+######
+#Error code classification category
+#000 Info/Debug
+#100 Permission errors
+#200 Availability errors/Timeouts
+#300 Data errors
+#400 Schema Interface type/validation errors
+#500 Business process errors
+#900 Unknown errors
+#
+########################################################################
+
+MESSAGE_VALIDATION_REQUEST=\
+ LOG0001I|\
+ Validation request payload: {0}|\
+ No resolution required|\
+ |\
+
+POLL_EVENTS=\
+ LOG0002I|\
+ *** Polling for events ***|\
+
+NUMBER_OF_MESSAGES_CONSUMED=\
+ LOG0003I|\
+ Number of messages consumed: {0}|\
+
+STARTUP_SERVLET_INIT=\
+ LOG0004I|\
+ ---------- StartupServlet Initializing ----------|\
+
+POLLING_INTERVAL_CONFIG_NOT_PRESENT=\
+ LOG0005I|\
+ Polling interval config not present, using default interval of {0} seconds|\
+
+POLLING_FOR_EVENTS=\
+ LOG0006I|\
+ ---------- Starting to poll for events. Interval = {0} seconds. ----------|\
+
+POLLING_DISABLED=\
+ LOG0007I|\
+ ---------- Event polling is disabled ----------|\
+
+STARTUP_SERVLET_INIT_SUCCESS=\
+ LOG0008I|\
+ ---------- StartupServlet Initialized successfully ----------|\
+
+EVENT_CLIENT_CLOSE_UNSENT_MESSAGE=\
+ LOG0009I|\
+ {0}|\
+
+LOAD_PROPERTIES=\
+ LOG0010I|\
+ Loading properties - {0}|\
+
+FILE_LOAD_INTO_MAP=\
+ LOG0011I|\
+ File {0} is loaded into the map and the corresponding system properties have been refreshed|\
+
+MESSAGE_AUDIT=\
+ LOG0012I|\
+ {0}|\
+ |\
+
+MESSAGE_METRIC=\
+ LOG0013I|\
+ {0}|\
+ |\
+
+MISSING_REQUEST_ID=\
+ LOG0014I|\
+ Missing request ID. Assigned {0}|\
+
+MESSAGE_PUBLISH_ERROR=\
+ LOG0201E|\
+ Error while publishing validation result: {0}|\
+ |\
+
+INVOKE_EVENT_CONSUMER_ERROR=\
+ LOG0202E|\
+ Error invoking the Event Consumer|\
+
+UNSENT_MESSAGE_WARN=\
+ LOG0203W|\
+ Not all events were successfully sent|\
+
+UNSENT_MESSAGE_ERROR=\
+ LOG0204E|\
+ Error sending events|\
+
+SEND_MESSAGE_ABORT_WARN=\
+ LOG0205W|\
+ Retries exhausted, aborting|\
+
+SEND_MESSAGE_RETRY_WARN=\
+ LOG0206W|\
+ Retrying to send events|\
+
+READ_FILE_ERROR=\
+ LOG0300E|\
+ Error reading file {0}|\
+
+FILE_ARG_NULL_ERROR=\
+ LOG0301E|\
+ File argument is null|\
+
+FILE_LOAD_INTO_MAP_ERROR=\
+ LOG0302E|\
+ File {0} cannot be loaded into the map {1}|\
+
+CREATE_PROPERTY_MAP_ERROR=\
+ LOG0303E|\
+ Error creating property map|\
+
+FILE_MONITOR_BLOCK_ERROR=\
+ LOG0304E|\
+ Error in the file monitor block|\
+
+READ_FILE_STREAM_ERROR=\
+ LOG0305E|\
+ Error reading the file stream|\
+
+STRING_UTILS_INVALID_REGEX=\
+ LOG0306E|\
+ Invalid regular expression: {0}|\
+
+OXM_LOAD_ERROR=\
+ LOG0401E|\
+ OXM load error|\
+ Check the OXM files are well formed and present and retry|\
+ The OXM files are missing and or corrupt|\
+
+OXM_MISSING_KEY_ERROR=\
+ LOG0402E|\
+ Graph object {0} primary key missing|\
+ Check request is valid and retry|\
+ The Graph object is missing the primary key(s)|\
+
+CANNOT_VALIDATE_ERROR=\
+ LOG0901E|\
+ Error during validation of event: {0}|\
+ |\
+
+CANNOT_VALIDATE_HANDLE_EXCEPTION_ERROR=\
+ LOG0902E|\
+ Error during handling the exception for an event that could not be validated: {0}|\
+ |\
+
+MALFORMED_REQUEST_ERROR=\
+ LOG1000E|\
+ Malformed request.|\
+
+PROCESS_REQUEST_ERROR=LOG1001E|Error while processing request.| \ No newline at end of file
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() &lt; 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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;AI needs to receive this data from the PO deployment team and administer it using the provisioningTool.sh into A&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;AI will populate this object through an M&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;AI needs to receive this data from the PO deployment team and administer it using the provisioningTool.sh into A&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;AI will populate this object through an M&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;AI needs to receive this data from the PO deployment team and administer it using the provisioningTool.sh into A&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;AI will populate this object through an M&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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